Skip to content

Commit a3671bd

Browse files
committed
Merge tag 'fbdev-for-6.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev
Pull fbdev fixes from Helge Deller: "The majority of lines changed is due to a code style cleanup in the pnmtologo helper program. Arnd removed the omap1 osk driver and the SIS fb driver is now orphaned. Other than that it's the usual bunch of small fixes and cleanups, e.g. prevent possible divide-by-zero in various fb drivers if the pixclock is zero and various conversions to devm_platform*() and of_property*() functions: - Drop omap1 osk driver - Various potential divide by zero pixclock fixes - Add pixelclock and fb_check_var() to stifb - Code style cleanups and indenting fixes" * tag 'fbdev-for-6.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev: fbdev: Use of_property_present() for testing DT property presence fbdev: au1200fb: Fix potential divide by zero fbdev: lxfb: Fix potential divide by zero fbdev: intelfb: Fix potential divide by zero fbdev: nvidia: Fix potential divide by zero fbdev: stifb: Provide valid pixelclock and add fb_check_var() checks fbdev: omapfb: remove omap1 osk driver fbdev: xilinxfb: Use devm_platform_get_and_ioremap_resource() fbdev: wm8505fb: Use devm_platform_ioremap_resource() fbdev: pxa3xx-gcu: Use devm_platform_get_and_ioremap_resource() fbdev: Use of_property_read_bool() for boolean properties fbdev: clps711x-fb: Use devm_platform_get_and_ioremap_resource() fbdev: tgafb: Fix potential divide by zero MAINTAINERS: orphan SIS FRAMEBUFFER DRIVER fbdev: omapfb: cleanup inconsistent indentation drivers: video: logo: add SPDX comment, remove GPL notice in pnmtologo.c drivers: video: logo: fix code style issues in pnmtologo.c
2 parents 5342933 + 29413f0 commit a3671bd

File tree

22 files changed

+409
-462
lines changed

22 files changed

+409
-462
lines changed

MAINTAINERS

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19150,9 +19150,7 @@ W: http://www.brownhat.org/sis900.html
1915019150
F: drivers/net/ethernet/sis/sis900.*
1915119151

1915219152
SIS FRAMEBUFFER DRIVER
19153-
M: Thomas Winischhofer <thomas@winischhofer.net>
19154-
S: Maintained
19155-
W: http://www.winischhofer.net/linuxsisvga.shtml
19153+
S: Orphan
1915619154
F: Documentation/fb/sisfb.rst
1915719155
F: drivers/video/fbdev/sis/
1915819156
F: include/video/sisfb.h

drivers/video/fbdev/amba-clcd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -854,7 +854,7 @@ static struct clcd_board *clcdfb_of_get_board(struct amba_device *dev)
854854
board->caps = CLCD_CAP_ALL;
855855
board->check = clcdfb_check;
856856
board->decode = clcdfb_decode;
857-
if (of_find_property(node, "memory-region", NULL)) {
857+
if (of_property_present(node, "memory-region")) {
858858
board->setup = clcdfb_of_vram_setup;
859859
board->mmap = clcdfb_of_vram_mmap;
860860
board->remove = clcdfb_of_vram_remove;

drivers/video/fbdev/au1200fb.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1040,6 +1040,9 @@ static int au1200fb_fb_check_var(struct fb_var_screeninfo *var,
10401040
u32 pixclock;
10411041
int screen_size, plane;
10421042

1043+
if (!var->pixclock)
1044+
return -EINVAL;
1045+
10431046
plane = fbdev->plane;
10441047

10451048
/* Make sure that the mode respect all LCD controller and

drivers/video/fbdev/bw2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ static int bw2_probe(struct platform_device *op)
306306
if (!par->regs)
307307
goto out_release_fb;
308308

309-
if (!of_find_property(dp, "width", NULL)) {
309+
if (!of_property_present(dp, "width")) {
310310
err = bw2_do_default_mode(par, info, &linebytes);
311311
if (err)
312312
goto out_unmap_regs;

drivers/video/fbdev/cg3.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ static int cg3_probe(struct platform_device *op)
393393

394394
cg3_blank(FB_BLANK_UNBLANK, info);
395395

396-
if (!of_find_property(dp, "width", NULL)) {
396+
if (!of_property_present(dp, "width")) {
397397
err = cg3_do_default_mode(par);
398398
if (err)
399399
goto out_unmap_screen;

drivers/video/fbdev/clps711x-fb.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,8 +238,7 @@ static int clps711x_fb_probe(struct platform_device *pdev)
238238
info->fix.mmio_start = res->start;
239239
info->fix.mmio_len = resource_size(res);
240240

241-
res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
242-
info->screen_base = devm_ioremap_resource(dev, res);
241+
info->screen_base = devm_platform_get_and_ioremap_resource(pdev, 1, &res);
243242
if (IS_ERR(info->screen_base)) {
244243
ret = PTR_ERR(info->screen_base);
245244
goto out_fb_release;

drivers/video/fbdev/geode/lxfb_core.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,9 @@ static void get_modedb(struct fb_videomode **modedb, unsigned int *size)
235235

236236
static int lxfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
237237
{
238+
if (!var->pixclock)
239+
return -EINVAL;
240+
238241
if (var->xres > 1920 || var->yres > 1440)
239242
return -EINVAL;
240243

drivers/video/fbdev/intelfb/intelfbdrv.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1222,6 +1222,9 @@ static int intelfb_check_var(struct fb_var_screeninfo *var,
12221222

12231223
dinfo = GET_DINFO(info);
12241224

1225+
if (!var->pixclock)
1226+
return -EINVAL;
1227+
12251228
/* update the pitch */
12261229
if (intelfbhw_validate_mode(dinfo, var) != 0)
12271230
return -EINVAL;

drivers/video/fbdev/nvidia/nvidia.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -764,6 +764,8 @@ static int nvidiafb_check_var(struct fb_var_screeninfo *var,
764764
int pitch, err = 0;
765765

766766
NVTRACE_ENTER();
767+
if (!var->pixclock)
768+
return -EINVAL;
767769

768770
var->transp.offset = 0;
769771
var->transp.length = 0;

drivers/video/fbdev/offb.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -549,10 +549,10 @@ static void offb_init_nodriver(struct platform_device *parent, struct device_nod
549549
int foreign_endian = 0;
550550

551551
#ifdef __BIG_ENDIAN
552-
if (of_get_property(dp, "little-endian", NULL))
552+
if (of_property_read_bool(dp, "little-endian"))
553553
foreign_endian = FBINFO_FOREIGN_ENDIAN;
554554
#else
555-
if (of_get_property(dp, "big-endian", NULL))
555+
if (of_property_read_bool(dp, "big-endian"))
556556
foreign_endian = FBINFO_FOREIGN_ENDIAN;
557557
#endif
558558

0 commit comments

Comments
 (0)