From 3e26e0c47e5ccd47acc87d2c9d9c0f222680eec2 Mon Sep 17 00:00:00 2001 From: YueHaibing Date: Fri, 17 Jan 2020 11:22:41 +0800 Subject: video: fbdev: pxa168fb: remove unnecessary platform_get_irq commit 640ba2444fa9 ("drivers/video/pxa168fb.c: use devm_ functions") left behind this, it can be removed. Signed-off-by: YueHaibing Cc: Arnd Bergmann Cc: Daniel Vetter Cc: Christophe JAILLET Cc: Jani Nikula Cc: Chuhong Yuan Signed-off-by: Bartlomiej Zolnierkiewicz Link: https://patchwork.freedesktop.org/patch/msgid/20200117032241.59148-1-yuehaibing@huawei.com --- drivers/video/fbdev/pxa168fb.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'drivers/video') diff --git a/drivers/video/fbdev/pxa168fb.c b/drivers/video/fbdev/pxa168fb.c index 706c69430818..aef8a3042590 100644 --- a/drivers/video/fbdev/pxa168fb.c +++ b/drivers/video/fbdev/pxa168fb.c @@ -779,7 +779,6 @@ static int pxa168fb_remove(struct platform_device *pdev) { struct pxa168fb_info *fbi = platform_get_drvdata(pdev); struct fb_info *info; - int irq; unsigned int data; if (!fbi) @@ -799,8 +798,6 @@ static int pxa168fb_remove(struct platform_device *pdev) if (info->cmap.len) fb_dealloc_cmap(&info->cmap); - irq = platform_get_irq(pdev, 0); - dma_free_wc(fbi->dev, info->fix.smem_len, info->screen_base, info->fix.smem_start); -- cgit v1.2.3 From 5d30146f9439968eda804e61a7b99197e84629f7 Mon Sep 17 00:00:00 2001 From: Bartlomiej Zolnierkiewicz Date: Thu, 16 Jan 2020 15:51:15 +0100 Subject: video: fbdev: sh_mobile_lcdcfb: fix sparse warnings about using incorrect types Use ->screen_buffer instead of ->screen_base to fix sparse warnings. [ Please see commit 17a7b0b4d974 ("fb.h: Provide alternate screen_base pointer") for details. ] Signed-off-by: Bartlomiej Zolnierkiewicz Reviewed-by: Geert Uytterhoeven Link: https://patchwork.freedesktop.org/patch/msgid/c687dbc5-cf5a-9508-2a61-e757a1a14568@samsung.com --- drivers/video/fbdev/sh_mobile_lcdcfb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/video') diff --git a/drivers/video/fbdev/sh_mobile_lcdcfb.c b/drivers/video/fbdev/sh_mobile_lcdcfb.c index 4ea6f932b334..8a27d12e6ea8 100644 --- a/drivers/video/fbdev/sh_mobile_lcdcfb.c +++ b/drivers/video/fbdev/sh_mobile_lcdcfb.c @@ -1572,7 +1572,7 @@ sh_mobile_lcdc_overlay_fb_init(struct sh_mobile_lcdc_overlay *ovl) info->flags = FBINFO_FLAG_DEFAULT; info->fbops = &sh_mobile_lcdc_overlay_ops; info->device = priv->dev; - info->screen_base = ovl->fb_mem; + info->screen_buffer = ovl->fb_mem; info->par = ovl; /* Initialize fixed screen information. Restrict pan to 2 lines steps @@ -2056,7 +2056,7 @@ sh_mobile_lcdc_channel_fb_init(struct sh_mobile_lcdc_chan *ch, info->flags = FBINFO_FLAG_DEFAULT; info->fbops = &sh_mobile_lcdc_ops; info->device = priv->dev; - info->screen_base = ch->fb_mem; + info->screen_buffer = ch->fb_mem; info->pseudo_palette = &ch->pseudo_palette; info->par = ch; -- cgit v1.2.3 From 6df8627609fdc03e0824de47a3a3b8cec7324df5 Mon Sep 17 00:00:00 2001 From: Bartlomiej Zolnierkiewicz Date: Thu, 16 Jan 2020 15:51:57 +0100 Subject: video: fbdev: sh_mobile_lcdcfb: add COMPILE_TEST support Add COMPILE_TEST support to sh_mobile_lcdcfb driver for better compile testing coverage. Signed-off-by: Bartlomiej Zolnierkiewicz Reviewed-by: Geert Uytterhoeven Link: https://patchwork.freedesktop.org/patch/msgid/d98fea18-b72e-6d0f-33ac-1421738bd12b@samsung.com --- drivers/video/fbdev/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/video') diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index f65991a67af2..33dc03bf1e86 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -1844,7 +1844,8 @@ config FB_W100 config FB_SH_MOBILE_LCDC tristate "SuperH Mobile LCDC framebuffer support" - depends on FB && (SUPERH || ARCH_RENESAS) && HAVE_CLK + depends on FB && HAVE_CLK && HAS_IOMEM + depends on SUPERH || ARCH_RENESAS || COMPILE_TEST select FB_SYS_FILLRECT select FB_SYS_COPYAREA select FB_SYS_IMAGEBLIT -- cgit v1.2.3 From 3d3287e609877aa549b1cbb41eafaf73c3742a0b Mon Sep 17 00:00:00 2001 From: Bartlomiej Zolnierkiewicz Date: Thu, 16 Jan 2020 15:49:07 +0100 Subject: video: fbdev: arcfb: add COMPILE_TEST support Add COMPILE_TEST support to arcfb driver for better compile testing coverage. Signed-off-by: Bartlomiej Zolnierkiewicz Acked-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/acf2cc2e-614d-f0fb-ce40-cee62bfcde4c@samsung.com --- drivers/video/fbdev/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/video') diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index 33dc03bf1e86..866d4e01237c 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -435,7 +435,7 @@ config FB_FM2 config FB_ARC tristate "Arc Monochrome LCD board support" - depends on FB && X86 + depends on FB && (X86 || COMPILE_TEST) select FB_SYS_FILLRECT select FB_SYS_COPYAREA select FB_SYS_IMAGEBLIT -- cgit v1.2.3 From df3381071ca0ee54b1a3e934cf7ef2fcf6904369 Mon Sep 17 00:00:00 2001 From: Bartlomiej Zolnierkiewicz Date: Thu, 16 Jan 2020 15:53:20 +0100 Subject: video: fbdev: w100fb: fix sparse warnings * Add missing __iomem annotations where needed. * Make w100fb_probe() static. * Return NULL pointer (instead of using plain integer) in w100_get_xtal_tabl(). Signed-off-by: Bartlomiej Zolnierkiewicz Acked-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/d438108a-e569-a14a-a9b1-3fefd88fcadc@samsung.com --- drivers/video/fbdev/w100fb.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'drivers/video') diff --git a/drivers/video/fbdev/w100fb.c b/drivers/video/fbdev/w100fb.c index ad26cbffbc6f..2d6e2738b792 100644 --- a/drivers/video/fbdev/w100fb.c +++ b/drivers/video/fbdev/w100fb.c @@ -61,9 +61,9 @@ struct w100_pll_info *w100_get_xtal_table(unsigned int freq); #define BITS_PER_PIXEL 16 /* Remapped addresses for base cfg, memmapped regs and the frame buffer itself */ -static void *remapped_base; -static void *remapped_regs; -static void *remapped_fbuf; +static void __iomem *remapped_base; +static void __iomem *remapped_regs; +static void __iomem *remapped_fbuf; #define REMAPPED_FB_LEN 0x15ffff @@ -635,7 +635,7 @@ static int w100fb_resume(struct platform_device *dev) #endif -int w100fb_probe(struct platform_device *pdev) +static int w100fb_probe(struct platform_device *pdev) { int err = -EIO; struct w100fb_mach_info *inf; @@ -807,10 +807,11 @@ static int w100fb_remove(struct platform_device *pdev) static void w100_soft_reset(void) { - u16 val = readw((u16 *) remapped_base + cfgSTATUS); - writew(val | 0x08, (u16 *) remapped_base + cfgSTATUS); + u16 val = readw((u16 __iomem *)remapped_base + cfgSTATUS); + + writew(val | 0x08, (u16 __iomem *)remapped_base + cfgSTATUS); udelay(100); - writew(0x00, (u16 *) remapped_base + cfgSTATUS); + writew(0x00, (u16 __iomem *)remapped_base + cfgSTATUS); udelay(100); } @@ -1022,7 +1023,8 @@ struct w100_pll_info *w100_get_xtal_table(unsigned int freq) return pll_entry->pll_table; pll_entry++; } while (pll_entry->xtal_freq); - return 0; + + return NULL; } -- cgit v1.2.3 From ee5aca2e7167ee3feccc989ad609b64e698d5eb3 Mon Sep 17 00:00:00 2001 From: Bartlomiej Zolnierkiewicz Date: Thu, 16 Jan 2020 15:53:58 +0100 Subject: video: fbdev: w100fb: add COMPILE_TEST support Add COMPILE_TEST support to w100fb driver for better compile testing coverage. Signed-off-by: Bartlomiej Zolnierkiewicz Acked-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/a929db5e-d373-7b09-ae2b-efec227f7e85@samsung.com --- drivers/video/fbdev/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/video') diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index 866d4e01237c..3263e3f69a71 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -1827,7 +1827,7 @@ config FB_FSL_DIU config FB_W100 tristate "W100 frame buffer support" - depends on FB && ARCH_PXA + depends on FB && HAS_IOMEM && (ARCH_PXA || COMPILE_TEST) select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT -- cgit v1.2.3 From 459b0fa71187c567c510ea7b87a5d2c746f4c84c Mon Sep 17 00:00:00 2001 From: Bartlomiej Zolnierkiewicz Date: Thu, 16 Jan 2020 15:56:50 +0100 Subject: video: fbdev: wm8505fb: fix sparse warnings about using incorrect types Use ->screen_buffer instead of ->screen_base to fix sparse warnings. [ Please see commit 17a7b0b4d974 ("fb.h: Provide alternate screen_base pointer") for details. ] Signed-off-by: Bartlomiej Zolnierkiewicz Acked-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/567cba81-5fec-4d91-f711-c0bdbfe5b513@samsung.com --- drivers/video/fbdev/wm8505fb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/video') diff --git a/drivers/video/fbdev/wm8505fb.c b/drivers/video/fbdev/wm8505fb.c index b656eff58c23..8f4d674fa0d0 100644 --- a/drivers/video/fbdev/wm8505fb.c +++ b/drivers/video/fbdev/wm8505fb.c @@ -339,7 +339,7 @@ static int wm8505fb_probe(struct platform_device *pdev) fbi->fb.fix.smem_start = fb_mem_phys; fbi->fb.fix.smem_len = fb_mem_len; - fbi->fb.screen_base = fb_mem_virt; + fbi->fb.screen_buffer = fb_mem_virt; fbi->fb.screen_size = fb_mem_len; fbi->contrast = 0x10; -- cgit v1.2.3 From 9e24d63b054ba692129872c1acb9be7536fd1d45 Mon Sep 17 00:00:00 2001 From: Bartlomiej Zolnierkiewicz Date: Thu, 16 Jan 2020 15:58:08 +0100 Subject: video: fbdev: wm8505fb: add COMPILE_TEST support Add COMPILE_TEST support to wm8505fb driver for better compile testing coverage. Signed-off-by: Bartlomiej Zolnierkiewicz Acked-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/900c16b3-9306-7d17-f467-0f98bc95416a@samsung.com --- drivers/video/fbdev/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/video') diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index 3263e3f69a71..91b0a719d221 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -1639,7 +1639,7 @@ config FB_VT8500 config FB_WM8505 bool "Wondermedia WM8xxx-series frame buffer support" - depends on (FB = y) && ARM && ARCH_VT8500 + depends on (FB = y) && HAS_IOMEM && (ARCH_VT8500 || COMPILE_TEST) select FB_SYS_FILLRECT if (!FB_WMT_GE_ROPS) select FB_SYS_COPYAREA if (!FB_WMT_GE_ROPS) select FB_SYS_IMAGEBLIT -- cgit v1.2.3 From 977750e84f37069da12f93ab0d1e9e2e47ff31a1 Mon Sep 17 00:00:00 2001 From: yu kuai Date: Sun, 19 Jan 2020 20:17:27 +0800 Subject: video: fbdev: radeonfb: remove set but not used variable 'hSyncPol' Fixes gcc '-Wunused-but-set-variable' warning: drivers/video/fbdev/aty/radeon_base.c: In function ‘radeonfb_set_par’: drivers/video/fbdev/aty/radeon_base.c:1653:6: warning: variable ‘hSyncPol’ set but not used [-Wunused-but-set-variable] It is never used, and so can be removed. Signed-off-by: yu kuai Cc: Benjamin Herrenschmidt Cc: zhengbin Cc: yi.zhang [b.zolnierkie: minor patch summary fixup] Signed-off-by: Bartlomiej Zolnierkiewicz Link: https://patchwork.freedesktop.org/patch/msgid/20200119121730.10701-2-yukuai3@huawei.com --- drivers/video/fbdev/aty/radeon_base.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'drivers/video') diff --git a/drivers/video/fbdev/aty/radeon_base.c b/drivers/video/fbdev/aty/radeon_base.c index 3af00e3b965e..d2e68ec580c2 100644 --- a/drivers/video/fbdev/aty/radeon_base.c +++ b/drivers/video/fbdev/aty/radeon_base.c @@ -1650,7 +1650,7 @@ static int radeonfb_set_par(struct fb_info *info) struct fb_var_screeninfo *mode = &info->var; struct radeon_regs *newmode; int hTotal, vTotal, hSyncStart, hSyncEnd, - hSyncPol, vSyncStart, vSyncEnd, vSyncPol, cSync; + vSyncStart, vSyncEnd, vSyncPol, cSync; u8 hsync_adj_tab[] = {0, 0x12, 9, 9, 6, 5}; u8 hsync_fudge_fp[] = {2, 2, 0, 0, 5, 5}; u32 sync, h_sync_pol, v_sync_pol, dotClock, pixClock; @@ -1730,7 +1730,6 @@ static int radeonfb_set_par(struct fb_info *info) else if (vsync_wid > 0x1f) /* max */ vsync_wid = 0x1f; - hSyncPol = mode->sync & FB_SYNC_HOR_HIGH_ACT ? 0 : 1; vSyncPol = mode->sync & FB_SYNC_VERT_HIGH_ACT ? 0 : 1; cSync = mode->sync & FB_SYNC_COMP_HIGH_ACT ? (1 << 4) : 0; -- cgit v1.2.3 From eea60c30e7ad23755e36c290ec43c8a8434bdadb Mon Sep 17 00:00:00 2001 From: yu kuai Date: Sun, 19 Jan 2020 20:17:28 +0800 Subject: video: fbdev: radeonfb: remove set but not used variable 'vSyncPol' Fixes gcc '-Wunused-but-set-variable' warning: drivers/video/fbdev/aty/radeon_base.c: In function ‘radeonfb_set_par’: drivers/video/fbdev/aty/radeon_base.c:1653:38: warning: variable ‘vSyncPol’ set but not used [-Wunused-but-set-variable] It is never used, and so can be removed. Signed-off-by: yu kuai Cc: Benjamin Herrenschmidt Cc: zhengbin Cc: yi.zhang [b.zolnierkie: minor patch summary fixup] Signed-off-by: Bartlomiej Zolnierkiewicz Link: https://patchwork.freedesktop.org/patch/msgid/20200119121730.10701-3-yukuai3@huawei.com --- drivers/video/fbdev/aty/radeon_base.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'drivers/video') diff --git a/drivers/video/fbdev/aty/radeon_base.c b/drivers/video/fbdev/aty/radeon_base.c index d2e68ec580c2..0666f848bf70 100644 --- a/drivers/video/fbdev/aty/radeon_base.c +++ b/drivers/video/fbdev/aty/radeon_base.c @@ -1650,7 +1650,7 @@ static int radeonfb_set_par(struct fb_info *info) struct fb_var_screeninfo *mode = &info->var; struct radeon_regs *newmode; int hTotal, vTotal, hSyncStart, hSyncEnd, - vSyncStart, vSyncEnd, vSyncPol, cSync; + vSyncStart, vSyncEnd, cSync; u8 hsync_adj_tab[] = {0, 0x12, 9, 9, 6, 5}; u8 hsync_fudge_fp[] = {2, 2, 0, 0, 5, 5}; u32 sync, h_sync_pol, v_sync_pol, dotClock, pixClock; @@ -1730,8 +1730,6 @@ static int radeonfb_set_par(struct fb_info *info) else if (vsync_wid > 0x1f) /* max */ vsync_wid = 0x1f; - vSyncPol = mode->sync & FB_SYNC_VERT_HIGH_ACT ? 0 : 1; - cSync = mode->sync & FB_SYNC_COMP_HIGH_ACT ? (1 << 4) : 0; format = radeon_get_dstbpp(depth); -- cgit v1.2.3 From 66cc77edb6481cdcb87db874121afeaa1e9d66a7 Mon Sep 17 00:00:00 2001 From: yu kuai Date: Sun, 19 Jan 2020 20:17:29 +0800 Subject: video: fbdev: radeonfb: remove set but not used variable '‘cSync’' Fixes gcc '-Wunused-but-set-variable' warning: drivers/video/fbdev/aty/radeon_base.c: In function ‘radeonfb_set_par’: drivers/video/fbdev/aty/radeon_base.c:1653:48: warning: variable ‘cSync’ set but not used [-Wunused-but-set-variable] It is never used, and so can be removed. Signed-off-by: yu kuai Cc: Benjamin Herrenschmidt Cc: zhengbin Cc: yi.zhang [b.zolnierkie: patch summary fixups] Signed-off-by: Bartlomiej Zolnierkiewicz Link: https://patchwork.freedesktop.org/patch/msgid/20200119121730.10701-4-yukuai3@huawei.com --- drivers/video/fbdev/aty/radeon_base.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'drivers/video') diff --git a/drivers/video/fbdev/aty/radeon_base.c b/drivers/video/fbdev/aty/radeon_base.c index 0666f848bf70..7d2ee889ffcd 100644 --- a/drivers/video/fbdev/aty/radeon_base.c +++ b/drivers/video/fbdev/aty/radeon_base.c @@ -1650,7 +1650,7 @@ static int radeonfb_set_par(struct fb_info *info) struct fb_var_screeninfo *mode = &info->var; struct radeon_regs *newmode; int hTotal, vTotal, hSyncStart, hSyncEnd, - vSyncStart, vSyncEnd, cSync; + vSyncStart, vSyncEnd; u8 hsync_adj_tab[] = {0, 0x12, 9, 9, 6, 5}; u8 hsync_fudge_fp[] = {2, 2, 0, 0, 5, 5}; u32 sync, h_sync_pol, v_sync_pol, dotClock, pixClock; @@ -1730,8 +1730,6 @@ static int radeonfb_set_par(struct fb_info *info) else if (vsync_wid > 0x1f) /* max */ vsync_wid = 0x1f; - cSync = mode->sync & FB_SYNC_COMP_HIGH_ACT ? (1 << 4) : 0; - format = radeon_get_dstbpp(depth); bytpp = mode->bits_per_pixel >> 3; -- cgit v1.2.3 From 97e5ea1de9a649ab533e07e7c2d7fefd013b8d41 Mon Sep 17 00:00:00 2001 From: yu kuai Date: Sun, 19 Jan 2020 20:17:30 +0800 Subject: video: fbdev: radeonfb: remove set but not used variable 'bytpp' Fixes gcc '-Wunused-but-set-variable' warning: drivers/video/fbdev/aty/radeon_base.c: In function ‘radeonfb_set_par’: drivers/video/fbdev/aty/radeon_base.c:1660:32: warning: variable ‘bytpp’ set but not used [-Wunused-but-set-variable] It is never used, and so can be removed. Signed-off-by: yu kuai Cc: Benjamin Herrenschmidt Cc: zhengbin Cc: yi.zhang [b.zolnierkie: minor patch summary fixup] Signed-off-by: Bartlomiej Zolnierkiewicz Link: https://patchwork.freedesktop.org/patch/msgid/20200119121730.10701-5-yukuai3@huawei.com --- drivers/video/fbdev/aty/radeon_base.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'drivers/video') diff --git a/drivers/video/fbdev/aty/radeon_base.c b/drivers/video/fbdev/aty/radeon_base.c index 7d2ee889ffcd..22b3ee4f2ffa 100644 --- a/drivers/video/fbdev/aty/radeon_base.c +++ b/drivers/video/fbdev/aty/radeon_base.c @@ -1657,7 +1657,7 @@ static int radeonfb_set_par(struct fb_info *info) int i, freq; int format = 0; int nopllcalc = 0; - int hsync_start, hsync_fudge, bytpp, hsync_wid, vsync_wid; + int hsync_start, hsync_fudge, hsync_wid, vsync_wid; int primary_mon = PRIMARY_MONITOR(rinfo); int depth = var_to_depth(mode); int use_rmx = 0; @@ -1731,7 +1731,6 @@ static int radeonfb_set_par(struct fb_info *info) vsync_wid = 0x1f; format = radeon_get_dstbpp(depth); - bytpp = mode->bits_per_pixel >> 3; if ((primary_mon == MT_DFP) || (primary_mon == MT_LCD)) hsync_fudge = hsync_fudge_fp[format-1]; -- cgit v1.2.3 From c8c967a741e8247e30466ad3d5f03791f1a53bd0 Mon Sep 17 00:00:00 2001 From: yu kuai Date: Sun, 19 Jan 2020 20:19:45 +0800 Subject: video: fbdev: kyrofb: remove set but not used variable 'ulScaleRight' Fixes gcc '-Wunused-but-set-variable' warning: drivers/video/fbdev/kyro/STG4000OverlayDevice.c: In function ‘SetOverlayViewPort’: drivers/video/fbdev/kyro/STG4000OverlayDevice.c:334:19: warning: variable ‘ulScaleRight’ set but not used [-Wunused-but-set-variable] It is never used, and so can be removed. Signed-off-by: yu kuai Cc: zhengbin Cc: yi.zhang [b.zolnierkie: minor patch summary fixup] Signed-off-by: Bartlomiej Zolnierkiewicz Link: https://patchwork.freedesktop.org/patch/msgid/20200119121945.12517-1-yukuai3@huawei.com --- drivers/video/fbdev/kyro/STG4000OverlayDevice.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'drivers/video') diff --git a/drivers/video/fbdev/kyro/STG4000OverlayDevice.c b/drivers/video/fbdev/kyro/STG4000OverlayDevice.c index 0aeeaa10708b..9fde0e3b69ec 100644 --- a/drivers/video/fbdev/kyro/STG4000OverlayDevice.c +++ b/drivers/video/fbdev/kyro/STG4000OverlayDevice.c @@ -331,7 +331,7 @@ int SetOverlayViewPort(volatile STG4000REG __iomem *pSTGReg, u32 ulScale; u32 ulLeft, ulRight; u32 ulSrcLeft, ulSrcRight; - u32 ulScaleLeft, ulScaleRight; + u32 ulScaleLeft; u32 ulhDecim; u32 ulsVal; u32 ulVertDecFactor; @@ -470,7 +470,6 @@ int SetOverlayViewPort(volatile STG4000REG __iomem *pSTGReg, * round down the pixel pos to the nearest 8 pixels. */ ulScaleLeft = ulSrcLeft; - ulScaleRight = ulSrcRight; /* shift fxscale until it is in the range of the scaler */ ulhDecim = 0; -- cgit v1.2.3 From e36cae0dde7be7db4c8883148de00c8588188334 Mon Sep 17 00:00:00 2001 From: yu kuai Date: Mon, 20 Jan 2020 14:33:27 +0800 Subject: video: fbdev: atyfb: remove set but not used variable 'mach64RefFreq' Fixes gcc '-Wunused-but-set-variable' warning: drivers/video/fbdev/aty/mach64_gx.c: In function ‘aty_var_to_pll_8398’: drivers/video/fbdev/aty/mach64_gx.c:621:36: warning: variable ‘mach64RefFreq’ set but not used [-Wunused-but-set-variable] It is never used, and so can be removed. Signed-off-by: yu kuai Cc: zhengbin Cc: yi.zhang [b.zolnierkie: minor patch summary fixup] Signed-off-by: Bartlomiej Zolnierkiewicz Link: https://patchwork.freedesktop.org/patch/msgid/20200120063327.43548-1-yukuai3@huawei.com --- drivers/video/fbdev/aty/mach64_gx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'drivers/video') diff --git a/drivers/video/fbdev/aty/mach64_gx.c b/drivers/video/fbdev/aty/mach64_gx.c index 27cb65fa2ba2..9c37e28fb78b 100644 --- a/drivers/video/fbdev/aty/mach64_gx.c +++ b/drivers/video/fbdev/aty/mach64_gx.c @@ -618,14 +618,13 @@ static int aty_var_to_pll_8398(const struct fb_info *info, u32 vclk_per, u32 mhz100; /* in 0.01 MHz */ u32 program_bits; /* u32 post_divider; */ - u32 mach64MinFreq, mach64MaxFreq, mach64RefFreq; + u32 mach64MinFreq, mach64MaxFreq; u16 m, n, k = 0, save_m, save_n, twoToKth; /* Calculate the programming word */ mhz100 = 100000000 / vclk_per; mach64MinFreq = MIN_FREQ_2595; mach64MaxFreq = MAX_FREQ_2595; - mach64RefFreq = REF_FREQ_2595; /* 14.32 MHz */ save_m = 0; save_n = 0; -- cgit v1.2.3 From 11be60bd66d5431018d706ec623c8ece80a7f931 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Sat, 25 Jan 2020 14:55:06 -0500 Subject: matroxfb: add Matrox MGA-G200eW board support It's needed to support the onboard video on my Spectre-free Atom S1260 server board. Signed-off-by: Rich Felker Cc: Greg Kroah-Hartman Cc: Thomas Gleixner [b.zolnierkie: patch description fixup] Signed-off-by: Bartlomiej Zolnierkiewicz Link: https://patchwork.freedesktop.org/patch/msgid/20200125195506.GA16638@brightrain.aerifal.cx --- drivers/video/fbdev/matrox/matroxfb_base.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'drivers/video') diff --git a/drivers/video/fbdev/matrox/matroxfb_base.c b/drivers/video/fbdev/matrox/matroxfb_base.c index 36cc718b96ae..570439b32655 100644 --- a/drivers/video/fbdev/matrox/matroxfb_base.c +++ b/drivers/video/fbdev/matrox/matroxfb_base.c @@ -1376,6 +1376,12 @@ static struct video_board vbG200 = { .accelID = FB_ACCEL_MATROX_MGAG200, .lowlevel = &matrox_G100 }; +static struct video_board vbG200eW = { + .maxvram = 0x800000, + .maxdisplayable = 0x800000, + .accelID = FB_ACCEL_MATROX_MGAG200, + .lowlevel = &matrox_G100 +}; /* from doc it looks like that accelerator can draw only to low 16MB :-( Direct accesses & displaying are OK for whole 32MB */ static struct video_board vbG400 = { @@ -1494,6 +1500,13 @@ static struct board { MGA_G200, &vbG200, "MGA-G200 (PCI)"}, + {PCI_VENDOR_ID_MATROX, 0x0532, 0xFF, + 0, 0, + DEVF_G200, + 250000, + MGA_G200, + &vbG200eW, + "MGA-G200eW (PCI)"}, {PCI_VENDOR_ID_MATROX, PCI_DEVICE_ID_MATROX_G200_AGP, 0xFF, PCI_SS_VENDOR_ID_MATROX, PCI_SS_ID_MATROX_GENERIC, DEVF_G200, @@ -2136,6 +2149,8 @@ static const struct pci_device_id matroxfb_devices[] = { PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, {PCI_VENDOR_ID_MATROX, PCI_DEVICE_ID_MATROX_G200_PCI, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, + {PCI_VENDOR_ID_MATROX, 0x0532, + PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, {PCI_VENDOR_ID_MATROX, PCI_DEVICE_ID_MATROX_G200_AGP, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, {PCI_VENDOR_ID_MATROX, PCI_DEVICE_ID_MATROX_G400, -- cgit v1.2.3 From 9dff9a3666f15f4c76d9ddfa52744a1e86fd0ff6 Mon Sep 17 00:00:00 2001 From: Souptick Joarder Date: Tue, 18 Feb 2020 21:45:56 +0530 Subject: video: fbdev: radeon: Remove dead code This is dead code since 3.15 and can be removed if not going to be useful further. Signed-off-by: Souptick Joarder Cc: Benjamin Herrenschmidt Signed-off-by: Bartlomiej Zolnierkiewicz Link: https://patchwork.freedesktop.org/patch/msgid/1582042556-21555-1-git-send-email-jrdr.linux@gmail.com --- drivers/video/fbdev/aty/radeon_base.c | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'drivers/video') diff --git a/drivers/video/fbdev/aty/radeon_base.c b/drivers/video/fbdev/aty/radeon_base.c index 22b3ee4f2ffa..e116a3f9ad56 100644 --- a/drivers/video/fbdev/aty/radeon_base.c +++ b/drivers/video/fbdev/aty/radeon_base.c @@ -849,12 +849,6 @@ static int radeonfb_check_var (struct fb_var_screeninfo *var, struct fb_info *in case 9 ... 16: v.bits_per_pixel = 16; break; - case 17 ... 24: -#if 0 /* Doesn't seem to work */ - v.bits_per_pixel = 24; - break; -#endif - return -EINVAL; case 25 ... 32: v.bits_per_pixel = 32; break; @@ -2542,16 +2536,6 @@ static void radeonfb_pci_unregister(struct pci_dev *pdev) if (rinfo->mon2_EDID) sysfs_remove_bin_file(&rinfo->pdev->dev.kobj, &edid2_attr); -#if 0 - /* restore original state - * - * Doesn't quite work yet, I suspect if we come from a legacy - * VGA mode (or worse, text mode), we need to do some VGA black - * magic here that I know nothing about. --BenH - */ - radeon_write_mode (rinfo, &rinfo->init_state, 1); - #endif - del_timer_sync(&rinfo->lvds_timer); arch_phys_wc_del(rinfo->wc_cookie); unregister_framebuffer(info); -- cgit v1.2.3 From 451787d3e2ac3a25abae91792b7154ee533b65c6 Mon Sep 17 00:00:00 2001 From: Gustavo A. R. Silva Date: Fri, 21 Feb 2020 10:00:05 -0600 Subject: video: Replace zero-length array with flexible-array member The current codebase makes use of the zero-length array language extension to the C90 standard, but the preferred mechanism to declare variable-length types such as these ones is a flexible array member[1][2], introduced in C99: struct foo { int stuff; struct boo array[]; }; By making use of the mechanism above, we will get a compiler warning in case the flexible array does not occur last in the structure, which will help us prevent some kind of undefined behavior bugs from being inadvertently introduced[3] to the codebase from now on. Also, notice that, dynamic memory allocations won't be affected by this change: "Flexible array members have incomplete type, and so the sizeof operator may not be applied. As a quirk of the original implementation of zero-length arrays, sizeof evaluates to zero."[1] This issue was found with the help of Coccinelle. [1] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html [2] https://github.com/KSPP/linux/issues/21 [3] commit 76497732932f ("cxgb3/l2t: Fix undefined behaviour") Signed-off-by: Gustavo A. R. Silva Signed-off-by: Bartlomiej Zolnierkiewicz Link: https://patchwork.freedesktop.org/patch/msgid/20200221160005.GA13552@embeddedor --- drivers/video/fbdev/mmp/hw/mmp_ctrl.h | 2 +- drivers/video/fbdev/ssd1307fb.c | 2 +- include/video/mmp_disp.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers/video') diff --git a/drivers/video/fbdev/mmp/hw/mmp_ctrl.h b/drivers/video/fbdev/mmp/hw/mmp_ctrl.h index 335d4983dc52..167585a889d3 100644 --- a/drivers/video/fbdev/mmp/hw/mmp_ctrl.h +++ b/drivers/video/fbdev/mmp/hw/mmp_ctrl.h @@ -1406,7 +1406,7 @@ struct mmphw_ctrl { /*pathes*/ int path_num; - struct mmphw_path_plat path_plats[0]; + struct mmphw_path_plat path_plats[]; }; static inline int overlay_is_vid(struct mmp_overlay *overlay) diff --git a/drivers/video/fbdev/ssd1307fb.c b/drivers/video/fbdev/ssd1307fb.c index 1a0bd78f9345..12fa1050f3eb 100644 --- a/drivers/video/fbdev/ssd1307fb.c +++ b/drivers/video/fbdev/ssd1307fb.c @@ -89,7 +89,7 @@ struct ssd1307fb_par { struct ssd1307fb_array { u8 type; - u8 data[0]; + u8 data[]; }; static const struct fb_fix_screeninfo ssd1307fb_fix = { diff --git a/include/video/mmp_disp.h b/include/video/mmp_disp.h index 1f9bc133e230..77252cb46361 100644 --- a/include/video/mmp_disp.h +++ b/include/video/mmp_disp.h @@ -231,7 +231,7 @@ struct mmp_path { /* layers */ int overlay_num; - struct mmp_overlay overlays[0]; + struct mmp_overlay overlays[]; }; extern struct mmp_path *mmp_get_path(const char *name); -- cgit v1.2.3