Skip to content

Commit cf424ef

Browse files
committed
Merge tag 'for-5.18/fbdev-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev
Pull fbdev fixes and updates from Helge Deller: "A bunch of outstanding fbdev patches - all trivial and small" * tag 'for-5.18/fbdev-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev: video: fbdev: clps711x-fb: Use syscon_regmap_lookup_by_phandle video: fbdev: mmp: replace usage of found with dedicated list iterator variable video: fbdev: sh_mobile_lcdcfb: Remove sh_mobile_lcdc_check_var() declaration video: fbdev: i740fb: Error out if 'pixclock' equals zero video: fbdev: i740fb: use memset_io() to clear screen video: fbdev: s3fb: Error out if 'pixclock' equals zero video: fbdev: arkfb: Error out if 'pixclock' equals zero video: fbdev: tridentfb: Error out if 'pixclock' equals zero video: fbdev: vt8623fb: Error out if 'pixclock' equals zero video: fbdev: kyro: Error out if 'lineclock' equals zero video: fbdev: neofb: Fix the check of 'var->pixclock' video: fbdev: imxfb: Fix missing of_node_put in imxfb_probe video: fbdev: omap: Make it CCF clk API compatible video: fbdev: aty/matrox/...: Prepare cleanup of powerpc's asm/prom.h video: fbdev: pm2fb: Fix a kernel-doc formatting issue linux/fb.h: Spelling s/palette/palette/ video: fbdev: sis: fix potential NULL dereference in sisfb_post_sis300() video: fbdev: pxafb: use if else instead video: fbdev: udlfb: properly check endpoint type video: fbdev: of: display_timing: Remove a redundant zeroing of memory
2 parents 4fad37d + 6fbe0cc commit cf424ef

29 files changed

Lines changed: 60 additions & 45 deletions

drivers/video/fbdev/arkfb.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -566,6 +566,9 @@ static int arkfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
566566
{
567567
int rv, mem, step;
568568

569+
if (!var->pixclock)
570+
return -EINVAL;
571+
569572
/* Find appropriate format */
570573
rv = svga_match_format (arkfb_formats, var, NULL);
571574
if (rv < 0)

drivers/video/fbdev/aty/aty128fb.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@
6868
#ifdef CONFIG_PPC_PMAC
6969
#include <asm/machdep.h>
7070
#include <asm/pmac_feature.h>
71-
#include <asm/prom.h>
7271
#include "../macmodes.h"
7372
#endif
7473

drivers/video/fbdev/aty/atyfb_base.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@
7979

8080
#ifdef __powerpc__
8181
#include <asm/machdep.h>
82-
#include <asm/prom.h>
8382
#include "../macmodes.h"
8483
#endif
8584
#ifdef __sparc__

drivers/video/fbdev/aty/radeon_pm.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222

2323
#ifdef CONFIG_PPC_PMAC
2424
#include <asm/machdep.h>
25-
#include <asm/prom.h>
2625
#include <asm/pmac_feature.h>
2726
#endif
2827

drivers/video/fbdev/aty/radeonfb.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
#include <asm/io.h>
2323

24-
#if defined(CONFIG_PPC) || defined(CONFIG_SPARC)
24+
#ifdef CONFIG_SPARC
2525
#include <asm/prom.h>
2626
#endif
2727

drivers/video/fbdev/clps711x-fb.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,8 +268,7 @@ static int clps711x_fb_probe(struct platform_device *pdev)
268268
goto out_fb_release;
269269
}
270270

271-
cfb->syscon =
272-
syscon_regmap_lookup_by_compatible("cirrus,ep7209-syscon1");
271+
cfb->syscon = syscon_regmap_lookup_by_phandle(np, "syscon");
273272
if (IS_ERR(cfb->syscon)) {
274273
ret = PTR_ERR(cfb->syscon);
275274
goto out_fb_release;

drivers/video/fbdev/controlfb.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,6 @@
4747
#include <linux/nvram.h>
4848
#include <linux/adb.h>
4949
#include <linux/cuda.h>
50-
#ifdef CONFIG_PPC_PMAC
51-
#include <asm/prom.h>
52-
#endif
5350
#ifdef CONFIG_BOOTX_TEXT
5451
#include <asm/btext.h>
5552
#endif

drivers/video/fbdev/i740fb.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -657,6 +657,9 @@ static int i740fb_decode_var(const struct fb_var_screeninfo *var,
657657

658658
static int i740fb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
659659
{
660+
if (!var->pixclock)
661+
return -EINVAL;
662+
660663
switch (var->bits_per_pixel) {
661664
case 8:
662665
var->red.offset = var->green.offset = var->blue.offset = 0;
@@ -740,7 +743,7 @@ static int i740fb_set_par(struct fb_info *info)
740743
if (i)
741744
return i;
742745

743-
memset(info->screen_base, 0, info->screen_size);
746+
memset_io(info->screen_base, 0, info->screen_size);
744747

745748
vga_protect(par);
746749

drivers/video/fbdev/imxfb.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -925,10 +925,12 @@ static int imxfb_probe(struct platform_device *pdev)
925925
sizeof(struct imx_fb_videomode), GFP_KERNEL);
926926
if (!fbi->mode) {
927927
ret = -ENOMEM;
928+
of_node_put(display_np);
928929
goto failed_of_parse;
929930
}
930931

931932
ret = imxfb_of_read_mode(&pdev->dev, display_np, fbi->mode);
933+
of_node_put(display_np);
932934
if (ret)
933935
goto failed_of_parse;
934936
}

drivers/video/fbdev/kyro/fbdev.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -494,6 +494,8 @@ static int kyrofb_set_par(struct fb_info *info)
494494
info->var.hsync_len +
495495
info->var.left_margin)) / 1000;
496496

497+
if (!lineclock)
498+
return -EINVAL;
497499

498500
/* time for a frame in ns (precision in 32bpp) */
499501
frameclock = lineclock * (info->var.yres +

0 commit comments

Comments
 (0)