From 2194f9576097543e26fa690abaa7166754fccabe Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Mon, 11 Jul 2022 17:35:48 +0200 Subject: video: fbdev: amiga: Simplify amifb_pan_display() The fb_pan_display() function in the core already takes care of validating most panning parameters before calling the driver's .fb_pan_display() callback, and of updating the panning state afterwards, so there is no need to repeat that in the driver. Remove the duplicate code. Signed-off-by: Geert Uytterhoeven Signed-off-by: Helge Deller --- drivers/video/fbdev/amifb.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'drivers/video') diff --git a/drivers/video/fbdev/amifb.c b/drivers/video/fbdev/amifb.c index 6e07a97bbd31..d88265dbebf4 100644 --- a/drivers/video/fbdev/amifb.c +++ b/drivers/video/fbdev/amifb.c @@ -2540,27 +2540,16 @@ static int amifb_blank(int blank, struct fb_info *info) static int amifb_pan_display(struct fb_var_screeninfo *var, struct fb_info *info) { - if (var->vmode & FB_VMODE_YWRAP) { - if (var->yoffset < 0 || - var->yoffset >= info->var.yres_virtual || var->xoffset) - return -EINVAL; - } else { + if (!(var->vmode & FB_VMODE_YWRAP)) { /* * TODO: There will be problems when xpan!=1, so some columns * on the right side will never be seen */ if (var->xoffset + info->var.xres > - upx(16 << maxfmode, info->var.xres_virtual) || - var->yoffset + info->var.yres > info->var.yres_virtual) + upx(16 << maxfmode, info->var.xres_virtual)) return -EINVAL; } ami_pan_var(var, info); - info->var.xoffset = var->xoffset; - info->var.yoffset = var->yoffset; - if (var->vmode & FB_VMODE_YWRAP) - info->var.vmode |= FB_VMODE_YWRAP; - else - info->var.vmode &= ~FB_VMODE_YWRAP; return 0; } -- cgit v1.2.3 From bf64b99c377b1c577fad2c58d06d76ec5039d276 Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Mon, 11 Jul 2022 17:37:52 +0200 Subject: video: fbdev: sa1100fb: Remove unused sa1100fb_setup() sa1100fb_setup() has been unused since the beginning of Linux git history. Signed-off-by: Geert Uytterhoeven Signed-off-by: Helge Deller --- drivers/video/fbdev/sa1100fb.c | 41 ----------------------------------------- 1 file changed, 41 deletions(-) (limited to 'drivers/video') diff --git a/drivers/video/fbdev/sa1100fb.c b/drivers/video/fbdev/sa1100fb.c index e31cf63b0a62..017c8efe8267 100644 --- a/drivers/video/fbdev/sa1100fb.c +++ b/drivers/video/fbdev/sa1100fb.c @@ -1224,47 +1224,6 @@ int __init sa1100fb_init(void) return platform_driver_register(&sa1100fb_driver); } -int __init sa1100fb_setup(char *options) -{ -#if 0 - char *this_opt; - - if (!options || !*options) - return 0; - - while ((this_opt = strsep(&options, ",")) != NULL) { - - if (!strncmp(this_opt, "bpp:", 4)) - current_par.max_bpp = - simple_strtoul(this_opt + 4, NULL, 0); - - if (!strncmp(this_opt, "lccr0:", 6)) - lcd_shadow.lccr0 = - simple_strtoul(this_opt + 6, NULL, 0); - if (!strncmp(this_opt, "lccr1:", 6)) { - lcd_shadow.lccr1 = - simple_strtoul(this_opt + 6, NULL, 0); - current_par.max_xres = - (lcd_shadow.lccr1 & 0x3ff) + 16; - } - if (!strncmp(this_opt, "lccr2:", 6)) { - lcd_shadow.lccr2 = - simple_strtoul(this_opt + 6, NULL, 0); - current_par.max_yres = - (lcd_shadow. - lccr0 & LCCR0_SDS) ? ((lcd_shadow. - lccr2 & 0x3ff) + - 1) * - 2 : ((lcd_shadow.lccr2 & 0x3ff) + 1); - } - if (!strncmp(this_opt, "lccr3:", 6)) - lcd_shadow.lccr3 = - simple_strtoul(this_opt + 6, NULL, 0); - } -#endif - return 0; -} - module_init(sa1100fb_init); MODULE_DESCRIPTION("StrongARM-1100/1110 framebuffer driver"); MODULE_LICENSE("GPL"); -- cgit v1.2.3 From f45566fb1a1dbaa1a984ca0a41e57ce35fc3aa38 Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Mon, 11 Jul 2022 17:39:30 +0200 Subject: video: fbdev: cirrusfb: Make cirrusfb_zorro_unregister() static cirrusfb_zorro_unregister() is only used locally, hence make it static. Signed-off-by: Geert Uytterhoeven Signed-off-by: Helge Deller --- drivers/video/fbdev/cirrusfb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/video') diff --git a/drivers/video/fbdev/cirrusfb.c b/drivers/video/fbdev/cirrusfb.c index 51e072c03e1c..a41a75841e10 100644 --- a/drivers/video/fbdev/cirrusfb.c +++ b/drivers/video/fbdev/cirrusfb.c @@ -2301,7 +2301,7 @@ err_release_fb: return error; } -void cirrusfb_zorro_unregister(struct zorro_dev *z) +static void cirrusfb_zorro_unregister(struct zorro_dev *z) { struct fb_info *info = zorro_get_drvdata(z); -- cgit v1.2.3 From 6a7d270e901965b0f8643db885cdc2e6e93b8621 Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Mon, 11 Jul 2022 17:41:11 +0200 Subject: video: fbdev: Make *fb_setup() and *fb_init() static The various *fb_setup() and *fb_init() functions are only used locally, so they should be static. Most of them do not need forward declarations, so remove these where appropriate. Signed-off-by: Geert Uytterhoeven Signed-off-by: Helge Deller --- drivers/video/fbdev/68328fb.c | 7 ++----- drivers/video/fbdev/atafb.c | 2 +- drivers/video/fbdev/dnfb.c | 2 +- drivers/video/fbdev/fm2fb.c | 4 ++-- drivers/video/fbdev/hpfb.c | 4 ++-- drivers/video/fbdev/q40fb.c | 2 +- drivers/video/fbdev/skeletonfb.c | 6 ++---- drivers/video/fbdev/valkyriefb.c | 10 +++------- 8 files changed, 14 insertions(+), 23 deletions(-) (limited to 'drivers/video') diff --git a/drivers/video/fbdev/68328fb.c b/drivers/video/fbdev/68328fb.c index 9811f1bad8d4..7db03ed77c76 100644 --- a/drivers/video/fbdev/68328fb.c +++ b/drivers/video/fbdev/68328fb.c @@ -84,9 +84,6 @@ static const struct fb_fix_screeninfo mc68x328fb_fix __initconst = { /* * Interface used by the world */ -int mc68x328fb_init(void); -int mc68x328fb_setup(char *); - static int mc68x328fb_check_var(struct fb_var_screeninfo *var, struct fb_info *info); static int mc68x328fb_set_par(struct fb_info *info); @@ -403,7 +400,7 @@ static int mc68x328fb_mmap(struct fb_info *info, struct vm_area_struct *vma) #endif } -int __init mc68x328fb_setup(char *options) +static int __init mc68x328fb_setup(char *options) { if (!options || !*options) return 1; @@ -414,7 +411,7 @@ int __init mc68x328fb_setup(char *options) * Initialisation */ -int __init mc68x328fb_init(void) +static int __init mc68x328fb_init(void) { #ifndef MODULE char *option = NULL; diff --git a/drivers/video/fbdev/atafb.c b/drivers/video/fbdev/atafb.c index 52a35b661643..102c727cedc0 100644 --- a/drivers/video/fbdev/atafb.c +++ b/drivers/video/fbdev/atafb.c @@ -2981,7 +2981,7 @@ static void __init atafb_setup_user(char *spec) } } -int __init atafb_setup(char *options) +static int __init atafb_setup(char *options) { char *this_opt; int temp; diff --git a/drivers/video/fbdev/dnfb.c b/drivers/video/fbdev/dnfb.c index 3688f9165848..18405c402ec1 100644 --- a/drivers/video/fbdev/dnfb.c +++ b/drivers/video/fbdev/dnfb.c @@ -280,7 +280,7 @@ static struct platform_device dnfb_device = { .name = "dnfb", }; -int __init dnfb_init(void) +static int __init dnfb_init(void) { int ret; diff --git a/drivers/video/fbdev/fm2fb.c b/drivers/video/fbdev/fm2fb.c index 3b727d528fde..942e382cf1cf 100644 --- a/drivers/video/fbdev/fm2fb.c +++ b/drivers/video/fbdev/fm2fb.c @@ -293,7 +293,7 @@ static int fm2fb_probe(struct zorro_dev *z, const struct zorro_device_id *id) return 0; } -int __init fm2fb_setup(char *options) +static int __init fm2fb_setup(char *options) { char *this_opt; @@ -309,7 +309,7 @@ int __init fm2fb_setup(char *options) return 0; } -int __init fm2fb_init(void) +static int __init fm2fb_init(void) { char *option = NULL; diff --git a/drivers/video/fbdev/hpfb.c b/drivers/video/fbdev/hpfb.c index 8d418abdd767..cdd44e5deafe 100644 --- a/drivers/video/fbdev/hpfb.c +++ b/drivers/video/fbdev/hpfb.c @@ -375,7 +375,7 @@ static struct dio_driver hpfb_driver = { .remove = hpfb_remove_one, }; -int __init hpfb_init(void) +static int __init hpfb_init(void) { unsigned int sid; unsigned char i; @@ -415,7 +415,7 @@ int __init hpfb_init(void) return 0; } -void __exit hpfb_cleanup_module(void) +static void __exit hpfb_cleanup_module(void) { dio_unregister_driver(&hpfb_driver); } diff --git a/drivers/video/fbdev/q40fb.c b/drivers/video/fbdev/q40fb.c index 079a2a7fb2c5..964bc88bb89c 100644 --- a/drivers/video/fbdev/q40fb.c +++ b/drivers/video/fbdev/q40fb.c @@ -133,7 +133,7 @@ static struct platform_device q40fb_device = { .name = "q40fb", }; -int __init q40fb_init(void) +static int __init q40fb_init(void) { int ret = 0; diff --git a/drivers/video/fbdev/skeletonfb.c b/drivers/video/fbdev/skeletonfb.c index d119b1d08007..8ab9a3fbd281 100644 --- a/drivers/video/fbdev/skeletonfb.c +++ b/drivers/video/fbdev/skeletonfb.c @@ -131,8 +131,6 @@ static struct fb_info info; */ static struct xxx_par __initdata current_par; -int xxxfb_init(void); - /** * xxxfb_open - Optional function. Called when the framebuffer is * first accessed. @@ -886,7 +884,7 @@ static struct pci_driver xxxfb_driver = { MODULE_DEVICE_TABLE(pci, xxxfb_id_table); -int __init xxxfb_init(void) +static int __init xxxfb_init(void) { /* * For kernel boot options (in 'video=xxxfb:' format) @@ -967,7 +965,7 @@ static struct platform_device *xxxfb_device; * Only necessary if your driver takes special options, * otherwise we fall back on the generic fb_setup(). */ -int __init xxxfb_setup(char *options) +static int __init xxxfb_setup(char *options) { /* Parse user specified options (`video=xxxfb:') */ } diff --git a/drivers/video/fbdev/valkyriefb.c b/drivers/video/fbdev/valkyriefb.c index a6c9d4f26669..1007023a5e88 100644 --- a/drivers/video/fbdev/valkyriefb.c +++ b/drivers/video/fbdev/valkyriefb.c @@ -90,11 +90,7 @@ struct fb_info_valkyrie { u32 pseudo_palette[16]; }; -/* - * Exported functions - */ -int valkyriefb_init(void); -int valkyriefb_setup(char*); +static int valkyriefb_setup(char*); static int valkyriefb_check_var(struct fb_var_screeninfo *var, struct fb_info *info); @@ -302,7 +298,7 @@ static void __init valkyrie_choose_mode(struct fb_info_valkyrie *p) default_vmode, default_cmode); } -int __init valkyriefb_init(void) +static int __init valkyriefb_init(void) { struct fb_info_valkyrie *p; unsigned long frame_buffer_phys, cmap_regs_phys; @@ -549,7 +545,7 @@ static int __init valkyrie_init_info(struct fb_info *info, /* * Parse user specified options (`video=valkyriefb:') */ -int __init valkyriefb_setup(char *options) +static int __init valkyriefb_setup(char *options) { char *this_opt; -- cgit v1.2.3 From f3bd0c2b637e3c4f733ff5ac5175cbcef96c2671 Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Mon, 11 Jul 2022 17:50:25 +0200 Subject: video: fbdev: atari: Simplify atafb_pan_display() The fb_pan_display() function in the core already takes care of validating the panning parameters before calling the driver's .fb_pan_display() callback, and of updating the panning state afterwards, so there is no need to repeat that in the driver. Remove the duplicate code. Signed-off-by: Geert Uytterhoeven Tested-by: Michael Schmitz Signed-off-by: Helge Deller --- drivers/video/fbdev/atafb.c | 29 ++--------------------------- 1 file changed, 2 insertions(+), 27 deletions(-) (limited to 'drivers/video') diff --git a/drivers/video/fbdev/atafb.c b/drivers/video/fbdev/atafb.c index 102c727cedc0..c0683d2a4efa 100644 --- a/drivers/video/fbdev/atafb.c +++ b/drivers/video/fbdev/atafb.c @@ -2407,35 +2407,10 @@ static void atafb_set_disp(struct fb_info *info) static int atafb_pan_display(struct fb_var_screeninfo *var, struct fb_info *info) { - int xoffset = var->xoffset; - int yoffset = var->yoffset; - int err; - - if (var->vmode & FB_VMODE_YWRAP) { - if (yoffset < 0 || yoffset >= info->var.yres_virtual || xoffset) - return -EINVAL; - } else { - if (xoffset + info->var.xres > info->var.xres_virtual || - yoffset + info->var.yres > info->var.yres_virtual) - return -EINVAL; - } - - if (fbhw->pan_display) { - err = fbhw->pan_display(var, info); - if (err) - return err; - } else + if (!fbhw->pan_display) return -EINVAL; - info->var.xoffset = xoffset; - info->var.yoffset = yoffset; - - if (var->vmode & FB_VMODE_YWRAP) - info->var.vmode |= FB_VMODE_YWRAP; - else - info->var.vmode &= ~FB_VMODE_YWRAP; - - return 0; + return fbhw->pan_display(var, info); } /* -- cgit v1.2.3 From 211f88e83f5095a91cab78b98b443c5c6c10e837 Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Mon, 11 Jul 2022 17:50:26 +0200 Subject: video: fbdev: atari: Remove bogus FB_VMODE_YWRAP flags Vertical wrap is not supported (fb_fix_screeninfo.ywrapstep = 0), hence there is no point in setting the FB_VMODE_YWRAP flag in video modes. Signed-off-by: Geert Uytterhoeven Tested-by: Michael Schmitz Signed-off-by: Helge Deller --- drivers/video/fbdev/atafb.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'drivers/video') diff --git a/drivers/video/fbdev/atafb.c b/drivers/video/fbdev/atafb.c index c0683d2a4efa..172ef547ff6f 100644 --- a/drivers/video/fbdev/atafb.c +++ b/drivers/video/fbdev/atafb.c @@ -467,27 +467,27 @@ static struct fb_videomode atafb_modedb[] __initdata = { { /* 320x200, 15 kHz, 60 Hz (ST low) */ "st-low", 60, 320, 200, 32000, 32, 16, 31, 14, 96, 4, - 0, FB_VMODE_NONINTERLACED | FB_VMODE_YWRAP + 0, FB_VMODE_NONINTERLACED }, { /* 640x200, 15 kHz, 60 Hz (ST medium) */ "st-mid", 60, 640, 200, 32000, 32, 16, 31, 14, 96, 4, - 0, FB_VMODE_NONINTERLACED | FB_VMODE_YWRAP + 0, FB_VMODE_NONINTERLACED }, { /* 640x400, 30.25 kHz, 63.5 Hz (ST high) */ "st-high", 63, 640, 400, 32000, 128, 0, 40, 14, 128, 4, - 0, FB_VMODE_NONINTERLACED | FB_VMODE_YWRAP + 0, FB_VMODE_NONINTERLACED }, { /* 320x480, 15 kHz, 60 Hz (TT low) */ "tt-low", 60, 320, 480, 31041, 120, 100, 8, 16, 140, 30, - 0, FB_VMODE_NONINTERLACED | FB_VMODE_YWRAP + 0, FB_VMODE_NONINTERLACED }, { /* 640x480, 29 kHz, 57 Hz (TT medium) */ "tt-mid", 60, 640, 480, 31041, 120, 100, 8, 16, 140, 30, - 0, FB_VMODE_NONINTERLACED | FB_VMODE_YWRAP + 0, FB_VMODE_NONINTERLACED }, { /* 1280x960, 72 kHz, 72 Hz (TT high) */ "tt-high", 57, 1280, 960, 7760, 260, 60, 36, 4, 192, 4, - 0, FB_VMODE_NONINTERLACED | FB_VMODE_YWRAP + 0, FB_VMODE_NONINTERLACED }, /* @@ -497,11 +497,11 @@ static struct fb_videomode atafb_modedb[] __initdata = { { /* 640x480, 31 kHz, 60 Hz (VGA) */ "vga", 63.5, 640, 480, 32000, 18, 42, 31, 11, 96, 3, - 0, FB_VMODE_NONINTERLACED | FB_VMODE_YWRAP + 0, FB_VMODE_NONINTERLACED }, { /* 640x400, 31 kHz, 70 Hz (VGA) */ "vga70", 70, 640, 400, 32000, 18, 42, 31, 11, 96, 3, - FB_SYNC_VERT_HIGH_ACT | FB_SYNC_COMP_HIGH_ACT, FB_VMODE_NONINTERLACED | FB_VMODE_YWRAP + FB_SYNC_VERT_HIGH_ACT | FB_SYNC_COMP_HIGH_ACT, FB_VMODE_NONINTERLACED }, /* @@ -511,7 +511,7 @@ static struct fb_videomode atafb_modedb[] __initdata = { { /* 896x608, 31 kHz, 60 Hz (Falcon High) */ "falh", 60, 896, 608, 32000, 18, 42, 31, 1, 96,3, - 0, FB_VMODE_NONINTERLACED | FB_VMODE_YWRAP + 0, FB_VMODE_NONINTERLACED }, }; -- cgit v1.2.3 From c7ef5e285c842bdca1121512967400443e565456 Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Mon, 11 Jul 2022 17:50:27 +0200 Subject: video: fbdev: atari: Fix inverse handling Currently, the "inverse" option does not do anything, as it just sets a flag, which is further unused. Fix this by calling fb_invert_cmaps() instead, like other drivers do. As this only affects the console colormap, this does not affect X. Update the documentation to match the actual behavior. Signed-off-by: Geert Uytterhoeven Tested-by: Michael Schmitz Signed-off-by: Helge Deller --- Documentation/m68k/kernel-options.rst | 4 ++-- drivers/video/fbdev/atafb.c | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) (limited to 'drivers/video') diff --git a/Documentation/m68k/kernel-options.rst b/Documentation/m68k/kernel-options.rst index cabd9419740d..2008a20b4329 100644 --- a/Documentation/m68k/kernel-options.rst +++ b/Documentation/m68k/kernel-options.rst @@ -367,8 +367,8 @@ activated by a "external:" sub-option. 4.1.2) inverse -------------- -Invert the display. This affects both, text (consoles) and graphics -(X) display. Usually, the background is chosen to be black. With this +Invert the display. This affects only text consoles. +Usually, the background is chosen to be black. With this option, you can make the background white. 4.1.3) font diff --git a/drivers/video/fbdev/atafb.c b/drivers/video/fbdev/atafb.c index 172ef547ff6f..39c3b860a797 100644 --- a/drivers/video/fbdev/atafb.c +++ b/drivers/video/fbdev/atafb.c @@ -236,8 +236,6 @@ static int *MV300_reg = MV300_reg_8bit; #endif /* ATAFB_EXT */ -static int inverse; - /* * struct fb_ops { * * open/release and usage marking @@ -2971,7 +2969,7 @@ static int __init atafb_setup(char *options) default_par = temp; mode_option = this_opt; } else if (!strcmp(this_opt, "inverse")) - inverse = 1; + fb_invert_cmaps(); else if (!strncmp(this_opt, "hwscroll_", 9)) { hwscroll = simple_strtoul(this_opt + 9, NULL, 10); if (hwscroll < 0) -- cgit v1.2.3 From 35fa155e836833fdd5744c5237aca7e2c2c31e03 Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Mon, 11 Jul 2022 17:50:28 +0200 Subject: video: fbdev: atari: Fix ext_setcolreg() The red, green, and blue color values are 16-bit, while the external graphics hardware registers are 8-bit. Add the missing conversion from 16-bit to 8-bit. Signed-off-by: Geert Uytterhoeven Tested-by: Michael Schmitz Signed-off-by: Helge Deller --- drivers/video/fbdev/atafb.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'drivers/video') diff --git a/drivers/video/fbdev/atafb.c b/drivers/video/fbdev/atafb.c index 39c3b860a797..a36cd8f1f420 100644 --- a/drivers/video/fbdev/atafb.c +++ b/drivers/video/fbdev/atafb.c @@ -2206,6 +2206,10 @@ static int ext_setcolreg(unsigned int regno, unsigned int red, if (regno > 255) return 1; + red >>= 8; + green >>= 8; + blue >>= 8; + switch (external_card_type) { case IS_VGA: OUTB(0x3c8, regno); -- cgit v1.2.3 From 4a13bcd8ccd5cc063969620e68f068a83cccc55a Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Mon, 11 Jul 2022 17:50:29 +0200 Subject: video: fbdev: atari: Remove unneeded casts from void * There is no need to cast fb_info.par to "struct atafb_par *", as the former has type "void *". Remove the casts, as they make it impossible to validate types. Signed-off-by: Geert Uytterhoeven Tested-by: Michael Schmitz Signed-off-by: Helge Deller --- drivers/video/fbdev/atafb.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'drivers/video') diff --git a/drivers/video/fbdev/atafb.c b/drivers/video/fbdev/atafb.c index a36cd8f1f420..f20535ea3e54 100644 --- a/drivers/video/fbdev/atafb.c +++ b/drivers/video/fbdev/atafb.c @@ -1639,7 +1639,7 @@ static irqreturn_t falcon_vbl_switcher(int irq, void *dummy) static int falcon_pan_display(struct fb_var_screeninfo *var, struct fb_info *info) { - struct atafb_par *par = (struct atafb_par *)info->par; + struct atafb_par *par = info->par; int xoffset; int bpp = info->var.bits_per_pixel; @@ -2263,7 +2263,7 @@ static void set_screen_base(void *s_base) static int pan_display(struct fb_var_screeninfo *var, struct fb_info *info) { - struct atafb_par *par = (struct atafb_par *)info->par; + struct atafb_par *par = info->par; if (!fbhw->set_screen_base || (!ATARIHW_PRESENT(EXTD_SHIFTER) && var->xoffset)) @@ -2432,7 +2432,7 @@ atafb_pan_display(struct fb_var_screeninfo *var, struct fb_info *info) static void atafb_fillrect(struct fb_info *info, const struct fb_fillrect *rect) { - struct atafb_par *par = (struct atafb_par *)info->par; + struct atafb_par *par = info->par; int x2, y2; u32 width, height; @@ -2475,7 +2475,7 @@ static void atafb_fillrect(struct fb_info *info, const struct fb_fillrect *rect) static void atafb_copyarea(struct fb_info *info, const struct fb_copyarea *area) { - struct atafb_par *par = (struct atafb_par *)info->par; + struct atafb_par *par = info->par; int x2, y2; u32 dx, dy, sx, sy, width, height; int rev_copy = 0; @@ -2529,7 +2529,7 @@ static void atafb_copyarea(struct fb_info *info, const struct fb_copyarea *area) static void atafb_imageblit(struct fb_info *info, const struct fb_image *image) { - struct atafb_par *par = (struct atafb_par *)info->par; + struct atafb_par *par = info->par; int x2, y2; unsigned long *dst; int dst_idx; @@ -2672,7 +2672,7 @@ static int atafb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) * hw par just decoded */ static int atafb_set_par(struct fb_info *info) { - struct atafb_par *par = (struct atafb_par *)info->par; + struct atafb_par *par = info->par; /* Decode wanted screen parameters */ fbhw->decode_var(&info->var, par); -- cgit v1.2.3 From 3ee5e2280343472de16a9048d6b9049c66d572e3 Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Mon, 11 Jul 2022 17:50:30 +0200 Subject: video: fbdev: atari: Remove unneeded casts to void * Arbitrary pointers can be passed to functions accepting "void *" without casting. Remove the casts, as they make it impossible to validate types. Signed-off-by: Geert Uytterhoeven Tested-by: Michael Schmitz Signed-off-by: Helge Deller --- drivers/video/fbdev/atafb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/video') diff --git a/drivers/video/fbdev/atafb.c b/drivers/video/fbdev/atafb.c index f20535ea3e54..fbc333d5615d 100644 --- a/drivers/video/fbdev/atafb.c +++ b/drivers/video/fbdev/atafb.c @@ -2599,14 +2599,14 @@ atafb_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg) switch (cmd) { #ifdef FBCMD_GET_CURRENTPAR case FBCMD_GET_CURRENTPAR: - if (copy_to_user((void *)arg, (void *)¤t_par, + if (copy_to_user((void *)arg, ¤t_par, sizeof(struct atafb_par))) return -EFAULT; return 0; #endif #ifdef FBCMD_SET_CURRENTPAR case FBCMD_SET_CURRENTPAR: - if (copy_from_user((void *)¤t_par, (void *)arg, + if (copy_from_user(¤t_par, (void *)arg, sizeof(struct atafb_par))) return -EFAULT; ata_set_par(¤t_par); -- cgit v1.2.3 From f0b38ea59ad262c0c6f65b48283c778bff9829b4 Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Mon, 11 Jul 2022 17:50:31 +0200 Subject: video: fbdev: atari: Fix TT High video mode vertical refresh The vertical refresh rate for the TT High video mode (1280x960) is wrong. Fortunately this field is not really used. Signed-off-by: Geert Uytterhoeven Tested-by: Michael Schmitz Signed-off-by: Helge Deller --- drivers/video/fbdev/atafb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/video') diff --git a/drivers/video/fbdev/atafb.c b/drivers/video/fbdev/atafb.c index fbc333d5615d..528478f6f308 100644 --- a/drivers/video/fbdev/atafb.c +++ b/drivers/video/fbdev/atafb.c @@ -484,7 +484,7 @@ static struct fb_videomode atafb_modedb[] __initdata = { 0, FB_VMODE_NONINTERLACED }, { /* 1280x960, 72 kHz, 72 Hz (TT high) */ - "tt-high", 57, 1280, 960, 7760, 260, 60, 36, 4, 192, 4, + "tt-high", 72, 1280, 960, 7760, 260, 60, 36, 4, 192, 4, 0, FB_VMODE_NONINTERLACED }, -- cgit v1.2.3 From 39101f1314ba38fca8b2ab8ed42622529d18342e Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Mon, 11 Jul 2022 17:50:32 +0200 Subject: video: fbdev: atari: Fix VGA modes The pixclock values in the vga and vga70 modes are wrong, as they should use the 25.175 MHz clock instead of the 32 MHz clock. Swap the left and right margins to match f25.{right,left} (struct pixel_clock declares them in a different order), and update the hsync lengths to match what the driver programs by default. Correct the (wrong) floating-point vrefresh value for the vga mode. Signed-off-by: Geert Uytterhoeven Tested-by: Michael Schmitz Signed-off-by: Helge Deller --- drivers/video/fbdev/atafb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/video') diff --git a/drivers/video/fbdev/atafb.c b/drivers/video/fbdev/atafb.c index 528478f6f308..46a00e0ad5e7 100644 --- a/drivers/video/fbdev/atafb.c +++ b/drivers/video/fbdev/atafb.c @@ -494,11 +494,11 @@ static struct fb_videomode atafb_modedb[] __initdata = { { /* 640x480, 31 kHz, 60 Hz (VGA) */ - "vga", 63.5, 640, 480, 32000, 18, 42, 31, 11, 96, 3, + "vga", 60, 640, 480, 39721, 42, 18, 31, 11, 100, 3, 0, FB_VMODE_NONINTERLACED }, { /* 640x400, 31 kHz, 70 Hz (VGA) */ - "vga70", 70, 640, 400, 32000, 18, 42, 31, 11, 96, 3, + "vga70", 70, 640, 400, 39721, 42, 18, 31, 11, 100, 3, FB_SYNC_VERT_HIGH_ACT | FB_SYNC_COMP_HIGH_ACT, FB_VMODE_NONINTERLACED }, -- cgit v1.2.3 From 435347edfe900fc29850014898d843cdabb306da Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Mon, 11 Jul 2022 17:50:33 +0200 Subject: video: fbdev: atari: Remove unused definitions and variables Several definitions and variables are unused. Some variables are set but further unused. Remove them. Signed-off-by: Geert Uytterhoeven Tested-by: Michael Schmitz Signed-off-by: Helge Deller --- drivers/video/fbdev/atafb.c | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'drivers/video') diff --git a/drivers/video/fbdev/atafb.c b/drivers/video/fbdev/atafb.c index 46a00e0ad5e7..e8b178e732e2 100644 --- a/drivers/video/fbdev/atafb.c +++ b/drivers/video/fbdev/atafb.c @@ -1070,8 +1070,6 @@ static int falcon_decode_var(struct fb_var_screeninfo *var, xstretch = 2; /* Double pixel width only for hicolor */ /* Default values are used for vert./hor. timing if no pixelclock given. */ if (var->pixclock == 0) { - int linesize; - /* Choose master pixelclock depending on hor. timing */ plen = 1 * xstretch; if ((plen * xres + f25.right + f25.hsync + f25.left) * @@ -1090,7 +1088,6 @@ static int falcon_decode_var(struct fb_var_screeninfo *var, left_margin = pclock->left / plen; right_margin = pclock->right / plen; hsync_len = pclock->hsync / plen; - linesize = left_margin + xres + right_margin + hsync_len; upper_margin = 31; lower_margin = 11; vsync_len = 3; @@ -2419,17 +2416,6 @@ atafb_pan_display(struct fb_var_screeninfo *var, struct fb_info *info) * generic drawing routines; imageblit needs updating for image depth > 1 */ -#if BITS_PER_LONG == 32 -#define BYTES_PER_LONG 4 -#define SHIFT_PER_LONG 5 -#elif BITS_PER_LONG == 64 -#define BYTES_PER_LONG 8 -#define SHIFT_PER_LONG 6 -#else -#define Please update me -#endif - - static void atafb_fillrect(struct fb_info *info, const struct fb_fillrect *rect) { struct atafb_par *par = info->par; @@ -2531,8 +2517,6 @@ static void atafb_imageblit(struct fb_info *info, const struct fb_image *image) { struct atafb_par *par = info->par; int x2, y2; - unsigned long *dst; - int dst_idx; const char *src; u32 dx, dy, width, height, pitch; @@ -2559,10 +2543,6 @@ static void atafb_imageblit(struct fb_info *info, const struct fb_image *image) if (image->depth == 1) { // used for font data - dst = (unsigned long *) - ((unsigned long)info->screen_base & ~(BYTES_PER_LONG - 1)); - dst_idx = ((unsigned long)info->screen_base & (BYTES_PER_LONG - 1)) * 8; - dst_idx += dy * par->next_line * 8 + dx; src = image->data; pitch = (image->width + 7) / 8; while (height--) { -- cgit v1.2.3 From ffcc5b265799f213612984aa27d3711dbc4704b6 Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Mon, 11 Jul 2022 17:50:34 +0200 Subject: video: fbdev: atari: Remove backward bug-compatibility MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As of v2.1.0, falcon_decode_var() contains a quirk to fix a rounding error, as explained by Günther Kelleter on Fri, 30 Aug 1996: This diff removes the now obsolete Falcon video option "pwrsave", and fixes a rounding error that is triggered by the resolution switching X server (those who use the pixel clock value 39722 in their /etc/fb.modes should change it to 39721). However, this causes the modified video mode returned by falcon_decode_var() to not match the video mode returned by falcon_encode_var(). Fix this by dropping the quirk. Unfortunately /etc/fb.modes in fbset was never updated, so the "640x480-60" mode still contains the wrong pixclock. Hence this change may introduce a regression. Signed-off-by: Geert Uytterhoeven Tested-by: Michael Schmitz Signed-off-by: Helge Deller --- drivers/video/fbdev/atafb.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'drivers/video') diff --git a/drivers/video/fbdev/atafb.c b/drivers/video/fbdev/atafb.c index e8b178e732e2..2bc4089865e6 100644 --- a/drivers/video/fbdev/atafb.c +++ b/drivers/video/fbdev/atafb.c @@ -1008,10 +1008,6 @@ static int falcon_decode_var(struct fb_var_screeninfo *var, else if (yres_virtual < yres) yres_virtual = yres; - /* backward bug-compatibility */ - if (var->pixclock > 1) - var->pixclock -= 1; - par->hw.falcon.line_width = bpp * xres / 16; par->hw.falcon.line_offset = bpp * (xres_virtual - xres) / 16; -- cgit v1.2.3 From 075fbf0ab8ddd04365918edbf5d906295105f3a0 Mon Sep 17 00:00:00 2001 From: Helge Deller Date: Fri, 15 Jul 2022 10:24:27 +0200 Subject: video: fbdev: omapfb: Unexport omap*_update_window_async() There is no need to EXPORT the functions hwa742_update_window_async() and omapfb_update_window_async() since they are not used anywhere inside or outside the kernel tree. Signed-off-by: Helge Deller --- drivers/video/fbdev/omap/hwa742.c | 3 +-- drivers/video/fbdev/omap/omapfb.h | 9 --------- drivers/video/fbdev/omap/omapfb_main.c | 3 +-- 3 files changed, 2 insertions(+), 13 deletions(-) (limited to 'drivers/video') diff --git a/drivers/video/fbdev/omap/hwa742.c b/drivers/video/fbdev/omap/hwa742.c index 9d9fe5c3a7a1..161fc65d6b57 100644 --- a/drivers/video/fbdev/omap/hwa742.c +++ b/drivers/video/fbdev/omap/hwa742.c @@ -489,7 +489,7 @@ static void hwa742_update_window_auto(struct timer_list *unused) __hwa742_update_window_auto(false); } -int hwa742_update_window_async(struct fb_info *fbi, +static int hwa742_update_window_async(struct fb_info *fbi, struct omapfb_update_window *win, void (*complete_callback)(void *arg), void *complete_callback_data) @@ -522,7 +522,6 @@ int hwa742_update_window_async(struct fb_info *fbi, out: return r; } -EXPORT_SYMBOL(hwa742_update_window_async); static int hwa742_setup_plane(int plane, int channel_out, unsigned long offset, int screen_width, diff --git a/drivers/video/fbdev/omap/omapfb.h b/drivers/video/fbdev/omap/omapfb.h index beb841ccb99c..ab1cb6e7f5f8 100644 --- a/drivers/video/fbdev/omap/omapfb.h +++ b/drivers/video/fbdev/omap/omapfb.h @@ -227,13 +227,4 @@ extern int omapfb_register_client(struct omapfb_notifier_block *nb, omapfb_notifier_callback_t callback, void *callback_data); extern int omapfb_unregister_client(struct omapfb_notifier_block *nb); -extern int omapfb_update_window_async(struct fb_info *fbi, - struct omapfb_update_window *win, - void (*callback)(void *), - void *callback_data); -extern int hwa742_update_window_async(struct fb_info *fbi, - struct omapfb_update_window *win, - void (*callback)(void *), - void *callback_data); - #endif /* __OMAPFB_H */ diff --git a/drivers/video/fbdev/omap/omapfb_main.c b/drivers/video/fbdev/omap/omapfb_main.c index 292fcb0a24fc..dfb4ddc45701 100644 --- a/drivers/video/fbdev/omap/omapfb_main.c +++ b/drivers/video/fbdev/omap/omapfb_main.c @@ -668,7 +668,7 @@ static int omapfb_set_par(struct fb_info *fbi) return r; } -int omapfb_update_window_async(struct fb_info *fbi, +static int omapfb_update_window_async(struct fb_info *fbi, struct omapfb_update_window *win, void (*callback)(void *), void *callback_data) @@ -714,7 +714,6 @@ int omapfb_update_window_async(struct fb_info *fbi, return fbdev->ctrl->update_window(fbi, win, callback, callback_data); } -EXPORT_SYMBOL(omapfb_update_window_async); static int omapfb_update_win(struct fb_info *fbi, struct omapfb_update_window *win) -- cgit v1.2.3 From 26c2b7d9fac42eb8317f3ceefa4c1a9a9170ca69 Mon Sep 17 00:00:00 2001 From: Liang He Date: Tue, 19 Jul 2022 16:25:46 +0800 Subject: video: fbdev: amba-clcd: Fix refcount leak bugs In clcdfb_of_init_display(), we should call of_node_put() for the references returned by of_graph_get_next_endpoint() and of_graph_get_remote_port_parent() which have increased the refcount. Besides, we should call of_node_put() both in fail path or when the references are not used anymore. Fixes: d10715be03bd ("video: ARM CLCD: Add DT support") Signed-off-by: Liang He Signed-off-by: Helge Deller --- drivers/video/fbdev/amba-clcd.c | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) (limited to 'drivers/video') diff --git a/drivers/video/fbdev/amba-clcd.c b/drivers/video/fbdev/amba-clcd.c index 8080116aea84..f65c96d1394d 100644 --- a/drivers/video/fbdev/amba-clcd.c +++ b/drivers/video/fbdev/amba-clcd.c @@ -698,16 +698,18 @@ static int clcdfb_of_init_display(struct clcd_fb *fb) return -ENODEV; panel = of_graph_get_remote_port_parent(endpoint); - if (!panel) - return -ENODEV; + if (!panel) { + err = -ENODEV; + goto out_endpoint_put; + } err = clcdfb_of_get_backlight(&fb->dev->dev, fb->panel); if (err) - return err; + goto out_panel_put; err = clcdfb_of_get_mode(&fb->dev->dev, panel, fb->panel); if (err) - return err; + goto out_panel_put; err = of_property_read_u32(fb->dev->dev.of_node, "max-memory-bandwidth", &max_bandwidth); @@ -736,11 +738,21 @@ static int clcdfb_of_init_display(struct clcd_fb *fb) if (of_property_read_u32_array(endpoint, "arm,pl11x,tft-r0g0b0-pads", - tft_r0b0g0, ARRAY_SIZE(tft_r0b0g0)) != 0) - return -ENOENT; + tft_r0b0g0, ARRAY_SIZE(tft_r0b0g0)) != 0) { + err = -ENOENT; + goto out_panel_put; + } + + of_node_put(panel); + of_node_put(endpoint); return clcdfb_of_init_tft_panel(fb, tft_r0b0g0[0], tft_r0b0g0[1], tft_r0b0g0[2]); +out_panel_put: + of_node_put(panel); +out_endpoint_put: + of_node_put(endpoint); + return err; } static int clcdfb_of_vram_setup(struct clcd_fb *fb) -- cgit v1.2.3 From e948d32c54fa45cc1601c98956bdbbf5f17a3db2 Mon Sep 17 00:00:00 2001 From: Uwe Kleine-König Date: Sat, 23 Jul 2022 19:57:17 +0200 Subject: video: fbdev: imxfb: Drop platform data support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit No source file but the driver itself includes the header containing the platform data definition. The last user is gone since commit 8485adf17a15 ("ARM: imx: Remove imx device directory"). So we can safely drop platform data support. Signed-off-by: Uwe Kleine-König Signed-off-by: Helge Deller --- drivers/video/fbdev/imxfb.c | 99 +++++++++++-------------------- include/linux/platform_data/video-imxfb.h | 12 ---- 2 files changed, 34 insertions(+), 77 deletions(-) (limited to 'drivers/video') diff --git a/drivers/video/fbdev/imxfb.c b/drivers/video/fbdev/imxfb.c index a2f644c97f28..85a5bf5639d9 100644 --- a/drivers/video/fbdev/imxfb.c +++ b/drivers/video/fbdev/imxfb.c @@ -656,7 +656,6 @@ static int imxfb_activate_var(struct fb_var_screeninfo *var, struct fb_info *inf static int imxfb_init_fbinfo(struct platform_device *pdev) { - struct imx_fb_platform_data *pdata = dev_get_platdata(&pdev->dev); struct fb_info *info = platform_get_drvdata(pdev); struct imxfb_info *fbi = info->par; struct device_node *np; @@ -690,25 +689,20 @@ static int imxfb_init_fbinfo(struct platform_device *pdev) info->fbops = &imxfb_ops; info->flags = FBINFO_FLAG_DEFAULT | FBINFO_READS_FAST; - if (pdata) { - fbi->lscr1 = pdata->lscr1; - fbi->dmacr = pdata->dmacr; - fbi->pwmr = pdata->pwmr; - } else { - np = pdev->dev.of_node; - info->var.grayscale = of_property_read_bool(np, - "cmap-greyscale"); - fbi->cmap_inverse = of_property_read_bool(np, "cmap-inverse"); - fbi->cmap_static = of_property_read_bool(np, "cmap-static"); - fbi->lscr1 = IMXFB_LSCR1_DEFAULT; + np = pdev->dev.of_node; + info->var.grayscale = of_property_read_bool(np, + "cmap-greyscale"); + fbi->cmap_inverse = of_property_read_bool(np, "cmap-inverse"); + fbi->cmap_static = of_property_read_bool(np, "cmap-static"); - of_property_read_u32(np, "fsl,lpccr", &fbi->pwmr); + fbi->lscr1 = IMXFB_LSCR1_DEFAULT; - of_property_read_u32(np, "fsl,lscr1", &fbi->lscr1); + of_property_read_u32(np, "fsl,lpccr", &fbi->pwmr); - of_property_read_u32(np, "fsl,dmacr", &fbi->dmacr); - } + of_property_read_u32(np, "fsl,lscr1", &fbi->lscr1); + + of_property_read_u32(np, "fsl,dmacr", &fbi->dmacr); return 0; } @@ -863,10 +857,10 @@ static int imxfb_probe(struct platform_device *pdev) struct imxfb_info *fbi; struct lcd_device *lcd; struct fb_info *info; - struct imx_fb_platform_data *pdata; struct resource *res; struct imx_fb_videomode *m; const struct of_device_id *of_id; + struct device_node *display_np; int ret, i; int bytes_per_pixel; @@ -884,8 +878,6 @@ static int imxfb_probe(struct platform_device *pdev) if (!res) return -ENODEV; - pdata = dev_get_platdata(&pdev->dev); - info = framebuffer_alloc(sizeof(struct imxfb_info), &pdev->dev); if (!info) return -ENOMEM; @@ -898,43 +890,34 @@ static int imxfb_probe(struct platform_device *pdev) if (ret < 0) goto failed_init; - if (pdata) { - if (!fb_mode) - fb_mode = pdata->mode[0].mode.name; - - fbi->mode = pdata->mode; - fbi->num_modes = pdata->num_modes; - } else { - struct device_node *display_np; - fb_mode = NULL; - - display_np = of_parse_phandle(pdev->dev.of_node, "display", 0); - if (!display_np) { - dev_err(&pdev->dev, "No display defined in devicetree\n"); - ret = -EINVAL; - goto failed_of_parse; - } + fb_mode = NULL; - /* - * imxfb does not support more modes, we choose only the native - * mode. - */ - fbi->num_modes = 1; - - fbi->mode = devm_kzalloc(&pdev->dev, - sizeof(struct imx_fb_videomode), GFP_KERNEL); - if (!fbi->mode) { - ret = -ENOMEM; - of_node_put(display_np); - goto failed_of_parse; - } + display_np = of_parse_phandle(pdev->dev.of_node, "display", 0); + if (!display_np) { + dev_err(&pdev->dev, "No display defined in devicetree\n"); + ret = -EINVAL; + goto failed_of_parse; + } - ret = imxfb_of_read_mode(&pdev->dev, display_np, fbi->mode); + /* + * imxfb does not support more modes, we choose only the native + * mode. + */ + fbi->num_modes = 1; + + fbi->mode = devm_kzalloc(&pdev->dev, + sizeof(struct imx_fb_videomode), GFP_KERNEL); + if (!fbi->mode) { + ret = -ENOMEM; of_node_put(display_np); - if (ret) - goto failed_of_parse; + goto failed_of_parse; } + ret = imxfb_of_read_mode(&pdev->dev, display_np, fbi->mode); + of_node_put(display_np); + if (ret) + goto failed_of_parse; + /* Calculate maximum bytes used per pixel. In most cases this should * be the same as m->bpp/8 */ m = &fbi->mode[0]; @@ -1001,13 +984,6 @@ static int imxfb_probe(struct platform_device *pdev) info->fix.smem_start = fbi->map_dma; - if (pdata && pdata->init) { - ret = pdata->init(fbi->pdev); - if (ret) - goto failed_platform_init; - } - - INIT_LIST_HEAD(&info->modelist); for (i = 0; i < fbi->num_modes; i++) fb_add_videomode(&fbi->mode[i].mode, &info->modelist); @@ -1059,9 +1035,6 @@ failed_lcd: failed_register: fb_dealloc_cmap(&info->cmap); failed_cmap: - if (pdata && pdata->exit) - pdata->exit(fbi->pdev); -failed_platform_init: dma_free_wc(&pdev->dev, fbi->map_size, info->screen_buffer, fbi->map_dma); failed_map: @@ -1079,7 +1052,6 @@ failed_init: static int imxfb_remove(struct platform_device *pdev) { - struct imx_fb_platform_data *pdata; struct fb_info *info = platform_get_drvdata(pdev); struct imxfb_info *fbi = info->par; struct resource *res; @@ -1092,9 +1064,6 @@ static int imxfb_remove(struct platform_device *pdev) unregister_framebuffer(info); fb_dealloc_cmap(&info->cmap); - pdata = dev_get_platdata(&pdev->dev); - if (pdata && pdata->exit) - pdata->exit(fbi->pdev); dma_free_wc(&pdev->dev, fbi->map_size, info->screen_buffer, fbi->map_dma); iounmap(fbi->regs); diff --git a/include/linux/platform_data/video-imxfb.h b/include/linux/platform_data/video-imxfb.h index 02812651af7d..b80a156a6617 100644 --- a/include/linux/platform_data/video-imxfb.h +++ b/include/linux/platform_data/video-imxfb.h @@ -55,16 +55,4 @@ struct imx_fb_videomode { unsigned char bpp; }; -struct imx_fb_platform_data { - struct imx_fb_videomode *mode; - int num_modes; - - u_int pwmr; - u_int lscr1; - u_int dmacr; - - int (*init)(struct platform_device *); - void (*exit)(struct platform_device *); -}; - #endif /* ifndef __MACH_IMXFB_H__ */ -- cgit v1.2.3 From ded77a74ee6bc3dea72ad41129823a812e4b64f3 Mon Sep 17 00:00:00 2001 From: Uwe Kleine-König Date: Sat, 23 Jul 2022 19:57:19 +0200 Subject: video: fbdev: imxfb: Fold into only user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit No source file but the driver itself includes the header containing the platform data definition. The last user is gone since commit 8485adf17a15 ("ARM: imx: Remove imx device directory"). Move the remaining symbols directly into the driver and remove the then unused header file. Signed-off-by: Uwe Kleine-König Signed-off-by: Helge Deller --- MAINTAINERS | 1 - drivers/video/fbdev/imxfb.c | 13 ++++++++++++- include/linux/platform_data/video-imxfb.h | 23 ----------------------- 3 files changed, 12 insertions(+), 25 deletions(-) delete mode 100644 include/linux/platform_data/video-imxfb.h (limited to 'drivers/video') diff --git a/MAINTAINERS b/MAINTAINERS index 651616ed8ae2..75c4d7ebef09 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -8011,7 +8011,6 @@ L: linux-fbdev@vger.kernel.org L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) S: Maintained F: drivers/video/fbdev/imxfb.c -F: include/linux/platform_data/video-imxfb.h FREESCALE IMX DDR PMU DRIVER M: Frank Li diff --git a/drivers/video/fbdev/imxfb.c b/drivers/video/fbdev/imxfb.c index 85a5bf5639d9..fa6a19c1ae9b 100644 --- a/drivers/video/fbdev/imxfb.c +++ b/drivers/video/fbdev/imxfb.c @@ -41,7 +41,18 @@ #include