mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-10 07:10:27 +00:00
fbdev fixes for v4.19-rc7:
- fix OMAPFB_MEMORY_READ ioctl to not leak kernel memory in omapfb driver (Tomi Valkeinen) - add missing prepare/unprepare clock operations in pxa168fb driver (Lubomir Rintel) - add nobgrt option in efifb driver to disable ACPI BGRT logo restore (Hans de Goede) - fix spelling mistake in fall-through annotation in stifb driver (Gustavo A. R. Silva) - fix URL for uvesafb repository in the documentation (Adam Jackson) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABCAAGBQJbszAJAAoJEH4ztj+gR8ILxKMQAKXBLSbOtbPOBlYpbgOldIYM Lq5iDojT7V9wHc1zll2DGu6dQ/W79jJFDgXdOocszo5wF8Wb8/UHZymGlYf8Uri1 mGP6zFiaosa0DDoDLF+sgV2/GWYy8dOCPkNPibP6b/dDAlAd5KjEy1p0yo77Cpri 7gCLNoKD8vWp9OIEW7b8evqSJMYAkDjs65P8VhmGNLrHQrTHyjro/0kHPREGmbMh aVn1tjJkL2mX12WAKFqo/GVFxEY6/dVayOoLrSqiedi96KabyipMIB80sVYsEYW6 xmxQ12BGq0lSxxA/o639t9xqOyotS+Yj+dVXZXhAmFBc96Bw27pZm9As0ilFFsNz uP/knLO6DL5zLQnAcKzy02db+ZzbDuV9JJF0Bex9z1uQWJmLN+HCg6CSc262/FhQ bde22gKNVp+5yM61oK9WwbRVJ5uc/70BTmWrK8nNnIhgo6MkTYvb6oBSIqkmjrIc CNlMDN3gtLLjPAMaTZirLPadohFGOtpIB62TLBnLttTjYMukw2b/p3UGjrFi7re0 VAIFfWL9nj/f1pLvofLy/QIRHiKqmN8F9P08EyKOudEzPemKqscIVR+gPweIPmIK LghssFY3x9gIlikDyigIt41XkY6XxXgNyH3hSiNs8ONWJi7YaNj/d2t0/HQVOHBL xyltV/qlZHbg2JR1tEcJ =xome -----END PGP SIGNATURE----- Merge tag 'fbdev-v4.19-rc7' of https://github.com/bzolnier/linux Bartlomiej writes: "fbdev fixes for v4.19-rc7: - fix OMAPFB_MEMORY_READ ioctl to not leak kernel memory in omapfb driver (Tomi Valkeinen) - add missing prepare/unprepare clock operations in pxa168fb driver (Lubomir Rintel) - add nobgrt option in efifb driver to disable ACPI BGRT logo restore (Hans de Goede) - fix spelling mistake in fall-through annotation in stifb driver (Gustavo A. R. Silva) - fix URL for uvesafb repository in the documentation (Adam Jackson)" * tag 'fbdev-v4.19-rc7' of https://github.com/bzolnier/linux: video/fbdev/stifb: Fix spelling mistake in fall-through annotation uvesafb: Fix URLs in the documentation efifb: BGRT: Add nobgrt option fbdev/omapfb: fix omapfb_memory_read infoleak pxa168fb: prepare the clock
This commit is contained in:
commit
1d2ba7fee2
@ -15,7 +15,8 @@ than x86. Check the v86d documentation for a list of currently supported
|
|||||||
arches.
|
arches.
|
||||||
|
|
||||||
v86d source code can be downloaded from the following website:
|
v86d source code can be downloaded from the following website:
|
||||||
http://dev.gentoo.org/~spock/projects/uvesafb
|
|
||||||
|
https://github.com/mjanusz/v86d
|
||||||
|
|
||||||
Please refer to the v86d documentation for detailed configuration and
|
Please refer to the v86d documentation for detailed configuration and
|
||||||
installation instructions.
|
installation instructions.
|
||||||
@ -177,7 +178,7 @@ from the Video BIOS if you set pixclock to 0 in fb_var_screeninfo.
|
|||||||
|
|
||||||
--
|
--
|
||||||
Michal Januszewski <spock@gentoo.org>
|
Michal Januszewski <spock@gentoo.org>
|
||||||
Last updated: 2009-03-30
|
Last updated: 2017-10-10
|
||||||
|
|
||||||
Documentation of the uvesafb options is loosely based on vesafb.txt.
|
Documentation of the uvesafb options is loosely based on vesafb.txt.
|
||||||
|
|
||||||
|
@ -15395,7 +15395,7 @@ S: Maintained
|
|||||||
UVESAFB DRIVER
|
UVESAFB DRIVER
|
||||||
M: Michal Januszewski <spock@gentoo.org>
|
M: Michal Januszewski <spock@gentoo.org>
|
||||||
L: linux-fbdev@vger.kernel.org
|
L: linux-fbdev@vger.kernel.org
|
||||||
W: http://dev.gentoo.org/~spock/projects/uvesafb/
|
W: https://github.com/mjanusz/v86d
|
||||||
S: Maintained
|
S: Maintained
|
||||||
F: Documentation/fb/uvesafb.txt
|
F: Documentation/fb/uvesafb.txt
|
||||||
F: drivers/video/fbdev/uvesafb.*
|
F: drivers/video/fbdev/uvesafb.*
|
||||||
|
@ -42,6 +42,7 @@ struct bmp_dib_header {
|
|||||||
u32 colors_important;
|
u32 colors_important;
|
||||||
} __packed;
|
} __packed;
|
||||||
|
|
||||||
|
static bool use_bgrt = true;
|
||||||
static bool request_mem_succeeded = false;
|
static bool request_mem_succeeded = false;
|
||||||
static u64 mem_flags = EFI_MEMORY_WC | EFI_MEMORY_UC;
|
static u64 mem_flags = EFI_MEMORY_WC | EFI_MEMORY_UC;
|
||||||
|
|
||||||
@ -160,6 +161,9 @@ static void efifb_show_boot_graphics(struct fb_info *info)
|
|||||||
void *bgrt_image = NULL;
|
void *bgrt_image = NULL;
|
||||||
u8 *dst = info->screen_base;
|
u8 *dst = info->screen_base;
|
||||||
|
|
||||||
|
if (!use_bgrt)
|
||||||
|
return;
|
||||||
|
|
||||||
if (!bgrt_tab.image_address) {
|
if (!bgrt_tab.image_address) {
|
||||||
pr_info("efifb: No BGRT, not showing boot graphics\n");
|
pr_info("efifb: No BGRT, not showing boot graphics\n");
|
||||||
return;
|
return;
|
||||||
@ -290,6 +294,8 @@ static int efifb_setup(char *options)
|
|||||||
screen_info.lfb_width = simple_strtoul(this_opt+6, NULL, 0);
|
screen_info.lfb_width = simple_strtoul(this_opt+6, NULL, 0);
|
||||||
else if (!strcmp(this_opt, "nowc"))
|
else if (!strcmp(this_opt, "nowc"))
|
||||||
mem_flags &= ~EFI_MEMORY_WC;
|
mem_flags &= ~EFI_MEMORY_WC;
|
||||||
|
else if (!strcmp(this_opt, "nobgrt"))
|
||||||
|
use_bgrt = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -496,6 +496,9 @@ static int omapfb_memory_read(struct fb_info *fbi,
|
|||||||
if (!access_ok(VERIFY_WRITE, mr->buffer, mr->buffer_size))
|
if (!access_ok(VERIFY_WRITE, mr->buffer, mr->buffer_size))
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
|
|
||||||
|
if (mr->w > 4096 || mr->h > 4096)
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
if (mr->w * mr->h * 3 > mr->buffer_size)
|
if (mr->w * mr->h * 3 > mr->buffer_size)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
@ -509,7 +512,7 @@ static int omapfb_memory_read(struct fb_info *fbi,
|
|||||||
mr->x, mr->y, mr->w, mr->h);
|
mr->x, mr->y, mr->w, mr->h);
|
||||||
|
|
||||||
if (r > 0) {
|
if (r > 0) {
|
||||||
if (copy_to_user(mr->buffer, buf, mr->buffer_size))
|
if (copy_to_user(mr->buffer, buf, r))
|
||||||
r = -EFAULT;
|
r = -EFAULT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -712,7 +712,7 @@ static int pxa168fb_probe(struct platform_device *pdev)
|
|||||||
/*
|
/*
|
||||||
* enable controller clock
|
* enable controller clock
|
||||||
*/
|
*/
|
||||||
clk_enable(fbi->clk);
|
clk_prepare_enable(fbi->clk);
|
||||||
|
|
||||||
pxa168fb_set_par(info);
|
pxa168fb_set_par(info);
|
||||||
|
|
||||||
@ -767,7 +767,7 @@ static int pxa168fb_probe(struct platform_device *pdev)
|
|||||||
failed_free_cmap:
|
failed_free_cmap:
|
||||||
fb_dealloc_cmap(&info->cmap);
|
fb_dealloc_cmap(&info->cmap);
|
||||||
failed_free_clk:
|
failed_free_clk:
|
||||||
clk_disable(fbi->clk);
|
clk_disable_unprepare(fbi->clk);
|
||||||
failed_free_fbmem:
|
failed_free_fbmem:
|
||||||
dma_free_coherent(fbi->dev, info->fix.smem_len,
|
dma_free_coherent(fbi->dev, info->fix.smem_len,
|
||||||
info->screen_base, fbi->fb_start_dma);
|
info->screen_base, fbi->fb_start_dma);
|
||||||
@ -807,7 +807,7 @@ static int pxa168fb_remove(struct platform_device *pdev)
|
|||||||
dma_free_wc(fbi->dev, PAGE_ALIGN(info->fix.smem_len),
|
dma_free_wc(fbi->dev, PAGE_ALIGN(info->fix.smem_len),
|
||||||
info->screen_base, info->fix.smem_start);
|
info->screen_base, info->fix.smem_start);
|
||||||
|
|
||||||
clk_disable(fbi->clk);
|
clk_disable_unprepare(fbi->clk);
|
||||||
|
|
||||||
framebuffer_release(info);
|
framebuffer_release(info);
|
||||||
|
|
||||||
|
@ -1157,7 +1157,7 @@ static int __init stifb_init_fb(struct sti_struct *sti, int bpp_pref)
|
|||||||
dev_name);
|
dev_name);
|
||||||
goto out_err0;
|
goto out_err0;
|
||||||
}
|
}
|
||||||
/* fall though */
|
/* fall through */
|
||||||
case S9000_ID_ARTIST:
|
case S9000_ID_ARTIST:
|
||||||
case S9000_ID_HCRX:
|
case S9000_ID_HCRX:
|
||||||
case S9000_ID_TIMBER:
|
case S9000_ID_TIMBER:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user