aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-10-02 08:19:43 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-10-02 08:19:43 -0400
commit1d2ba7fee28b3a47cca8e8f4f94a22d30b2b3a6f (patch)
tree6c62aa8c1c36d6001dc545b4766cdfbf07f147e4
parent5e0b19ac332b92356ef7145a4ddfb571cf66ab99 (diff)
parent7c968791f7753bf0e52a21729498509ea3dd751b (diff)
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
-rw-r--r--Documentation/fb/uvesafb.txt5
-rw-r--r--MAINTAINERS2
-rw-r--r--drivers/video/fbdev/efifb.c6
-rw-r--r--drivers/video/fbdev/omap2/omapfb/omapfb-ioctl.c5
-rw-r--r--drivers/video/fbdev/pxa168fb.c6
-rw-r--r--drivers/video/fbdev/stifb.c2
6 files changed, 18 insertions, 8 deletions
diff --git a/Documentation/fb/uvesafb.txt b/Documentation/fb/uvesafb.txt
index f6362d88763b..aa924196c366 100644
--- a/Documentation/fb/uvesafb.txt
+++ b/Documentation/fb/uvesafb.txt
@@ -15,7 +15,8 @@ than x86. Check the v86d documentation for a list of currently supported
15arches. 15arches.
16 16
17v86d source code can be downloaded from the following website: 17v86d source code can be downloaded from the following website:
18 http://dev.gentoo.org/~spock/projects/uvesafb 18
19 https://github.com/mjanusz/v86d
19 20
20Please refer to the v86d documentation for detailed configuration and 21Please refer to the v86d documentation for detailed configuration and
21installation instructions. 22installation instructions.
@@ -177,7 +178,7 @@ from the Video BIOS if you set pixclock to 0 in fb_var_screeninfo.
177 178
178-- 179--
179 Michal Januszewski <spock@gentoo.org> 180 Michal Januszewski <spock@gentoo.org>
180 Last updated: 2009-03-30 181 Last updated: 2017-10-10
181 182
182 Documentation of the uvesafb options is loosely based on vesafb.txt. 183 Documentation of the uvesafb options is loosely based on vesafb.txt.
183 184
diff --git a/MAINTAINERS b/MAINTAINERS
index 42a2f31b7334..d63705445bf8 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -15395,7 +15395,7 @@ S: Maintained
15395UVESAFB DRIVER 15395UVESAFB DRIVER
15396M: Michal Januszewski <spock@gentoo.org> 15396M: Michal Januszewski <spock@gentoo.org>
15397L: linux-fbdev@vger.kernel.org 15397L: linux-fbdev@vger.kernel.org
15398W: http://dev.gentoo.org/~spock/projects/uvesafb/ 15398W: https://github.com/mjanusz/v86d
15399S: Maintained 15399S: Maintained
15400F: Documentation/fb/uvesafb.txt 15400F: Documentation/fb/uvesafb.txt
15401F: drivers/video/fbdev/uvesafb.* 15401F: drivers/video/fbdev/uvesafb.*
diff --git a/drivers/video/fbdev/efifb.c b/drivers/video/fbdev/efifb.c
index 3946649b85c8..ba906876cc45 100644
--- a/drivers/video/fbdev/efifb.c
+++ b/drivers/video/fbdev/efifb.c
@@ -42,6 +42,7 @@ struct bmp_dib_header {
42 u32 colors_important; 42 u32 colors_important;
43} __packed; 43} __packed;
44 44
45static bool use_bgrt = true;
45static bool request_mem_succeeded = false; 46static bool request_mem_succeeded = false;
46static u64 mem_flags = EFI_MEMORY_WC | EFI_MEMORY_UC; 47static u64 mem_flags = EFI_MEMORY_WC | EFI_MEMORY_UC;
47 48
@@ -160,6 +161,9 @@ static void efifb_show_boot_graphics(struct fb_info *info)
160 void *bgrt_image = NULL; 161 void *bgrt_image = NULL;
161 u8 *dst = info->screen_base; 162 u8 *dst = info->screen_base;
162 163
164 if (!use_bgrt)
165 return;
166
163 if (!bgrt_tab.image_address) { 167 if (!bgrt_tab.image_address) {
164 pr_info("efifb: No BGRT, not showing boot graphics\n"); 168 pr_info("efifb: No BGRT, not showing boot graphics\n");
165 return; 169 return;
@@ -290,6 +294,8 @@ static int efifb_setup(char *options)
290 screen_info.lfb_width = simple_strtoul(this_opt+6, NULL, 0); 294 screen_info.lfb_width = simple_strtoul(this_opt+6, NULL, 0);
291 else if (!strcmp(this_opt, "nowc")) 295 else if (!strcmp(this_opt, "nowc"))
292 mem_flags &= ~EFI_MEMORY_WC; 296 mem_flags &= ~EFI_MEMORY_WC;
297 else if (!strcmp(this_opt, "nobgrt"))
298 use_bgrt = false;
293 } 299 }
294 } 300 }
295 301
diff --git a/drivers/video/fbdev/omap2/omapfb/omapfb-ioctl.c b/drivers/video/fbdev/omap2/omapfb/omapfb-ioctl.c
index ef69273074ba..a3edb20ea4c3 100644
--- a/drivers/video/fbdev/omap2/omapfb/omapfb-ioctl.c
+++ b/drivers/video/fbdev/omap2/omapfb/omapfb-ioctl.c
@@ -496,6 +496,9 @@ static int omapfb_memory_read(struct fb_info *fbi,
496 if (!access_ok(VERIFY_WRITE, mr->buffer, mr->buffer_size)) 496 if (!access_ok(VERIFY_WRITE, mr->buffer, mr->buffer_size))
497 return -EFAULT; 497 return -EFAULT;
498 498
499 if (mr->w > 4096 || mr->h > 4096)
500 return -EINVAL;
501
499 if (mr->w * mr->h * 3 > mr->buffer_size) 502 if (mr->w * mr->h * 3 > mr->buffer_size)
500 return -EINVAL; 503 return -EINVAL;
501 504
@@ -509,7 +512,7 @@ static int omapfb_memory_read(struct fb_info *fbi,
509 mr->x, mr->y, mr->w, mr->h); 512 mr->x, mr->y, mr->w, mr->h);
510 513
511 if (r > 0) { 514 if (r > 0) {
512 if (copy_to_user(mr->buffer, buf, mr->buffer_size)) 515 if (copy_to_user(mr->buffer, buf, r))
513 r = -EFAULT; 516 r = -EFAULT;
514 } 517 }
515 518
diff --git a/drivers/video/fbdev/pxa168fb.c b/drivers/video/fbdev/pxa168fb.c
index def3a501acd6..d059d04c63ac 100644
--- a/drivers/video/fbdev/pxa168fb.c
+++ b/drivers/video/fbdev/pxa168fb.c
@@ -712,7 +712,7 @@ static int pxa168fb_probe(struct platform_device *pdev)
712 /* 712 /*
713 * enable controller clock 713 * enable controller clock
714 */ 714 */
715 clk_enable(fbi->clk); 715 clk_prepare_enable(fbi->clk);
716 716
717 pxa168fb_set_par(info); 717 pxa168fb_set_par(info);
718 718
@@ -767,7 +767,7 @@ static int pxa168fb_probe(struct platform_device *pdev)
767failed_free_cmap: 767failed_free_cmap:
768 fb_dealloc_cmap(&info->cmap); 768 fb_dealloc_cmap(&info->cmap);
769failed_free_clk: 769failed_free_clk:
770 clk_disable(fbi->clk); 770 clk_disable_unprepare(fbi->clk);
771failed_free_fbmem: 771failed_free_fbmem:
772 dma_free_coherent(fbi->dev, info->fix.smem_len, 772 dma_free_coherent(fbi->dev, info->fix.smem_len,
773 info->screen_base, fbi->fb_start_dma); 773 info->screen_base, fbi->fb_start_dma);
@@ -807,7 +807,7 @@ static int pxa168fb_remove(struct platform_device *pdev)
807 dma_free_wc(fbi->dev, PAGE_ALIGN(info->fix.smem_len), 807 dma_free_wc(fbi->dev, PAGE_ALIGN(info->fix.smem_len),
808 info->screen_base, info->fix.smem_start); 808 info->screen_base, info->fix.smem_start);
809 809
810 clk_disable(fbi->clk); 810 clk_disable_unprepare(fbi->clk);
811 811
812 framebuffer_release(info); 812 framebuffer_release(info);
813 813
diff --git a/drivers/video/fbdev/stifb.c b/drivers/video/fbdev/stifb.c
index 045e8afe398b..9e88e3f594c2 100644
--- a/drivers/video/fbdev/stifb.c
+++ b/drivers/video/fbdev/stifb.c
@@ -1157,7 +1157,7 @@ static int __init stifb_init_fb(struct sti_struct *sti, int bpp_pref)
1157 dev_name); 1157 dev_name);
1158 goto out_err0; 1158 goto out_err0;
1159 } 1159 }
1160 /* fall though */ 1160 /* fall through */
1161 case S9000_ID_ARTIST: 1161 case S9000_ID_ARTIST:
1162 case S9000_ID_HCRX: 1162 case S9000_ID_HCRX:
1163 case S9000_ID_TIMBER: 1163 case S9000_ID_TIMBER: