projects/linux·commit 9c4b86eb

Merge tag 'for-5.18/fbdev-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev

9c4b86eb · Linus Torvalds <[email protected]> · 2022-03-23 14:45:01 -07:00

Pull fbdev updates from Helge Deller:
 "Lots of small fixes and code cleanups across most of the fbdev
  drivers.

  This includes conversions to use helper functions, const conversions,
  spelling fixes, help text updates, adding return value checks, small
  build fixes, and much more"

* tag 'for-5.18/fbdev-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev: (59 commits)
  video: fbdev: kyro: make read-only array ODValues static const
  video: fbdev: offb: fix warning comparing pointer to 0
  video: fbdev: omapfb: Add missing of_node_put() in dvic_probe_of
  video: fbdev: sm712fb: Fix crash in smtcfb_write()
  video: fbdev: s3c-fb: fix platform_get_irq.cocci warning
  video: fbdev: sm712fb: Fix crash in smtcfb_read()
  video: fbdev: via: check the return value of kstrdup()
  video: fbdev: au1100fb: Spelling s/palette/palette/
  video: fbdev: atari: Atari 2 bpp (STe) palette bugfix
  video: fbdev: atari: Remove unused atafb_setcolreg()
  video: fbdev: atari: Convert to standard round_up() helper
  video: fbdev: atari: Fix TT High video mode
  video: fbdev: udlfb: replace snprintf in show functions with sysfs_emit
  video: fbdev: omapfb: panel-tpo-td043mtea1: Use sysfs_emit() instead of snprintf()
  video: fbdev: omapfb: panel-dsi-cm: Use sysfs_emit() instead of snprintf()
  video: fbdev: omapfb: Use sysfs_emit() instead of snprintf()
  video: fbdev: s3c-fb: Use platform_get_irq() to get the interrupt
  video: fbdev: Fix wrong file path for pvr2fb.c in Kconfig help text
  video: fbdev: pxa3xx-gcu: Remove unnecessary print function dev_err()
  video: fbdev: pxa168fb: Remove unnecessary print function dev_err()
  ...
Commit
9c4b86ebf5bfdaceba4bedbaf76e4ff745db17ef
Parents
5bebe2c9 · e445c8b2

Merge commit. Changes below are compared with the first parent: 5bebe2c9.

Changes

54 files changed · +189 −233

FileStatusAddDelContent
Documentation/devicetree/bindings/display/simple-framebuffer.yamlmodified+7−5View file
arch/parisc/include/asm/agp.hmodified+2−2View file
arch/powerpc/include/asm/agp.hmodified+2−2View file
arch/sparc/include/asm/agp.hmodified+3−3View file
drivers/video/backlight/lm3630a_bl.cmodified+0−1View file
drivers/video/backlight/qcom-wled.cmodified+1−0View file
drivers/video/fbdev/Kconfigmodified+1−1View file
drivers/video/fbdev/asiliantfb.cmodified+1−1View file
drivers/video/fbdev/atafb.cmodified+11−24View file
drivers/video/fbdev/atmel_lcdfb.cmodified+6−5View file
drivers/video/fbdev/aty/aty128fb.cmodified+6−4View file
drivers/video/fbdev/aty/mach64_ct.cmodified+1−3View file
drivers/video/fbdev/aty/mach64_gx.cmodified+0−2View file
drivers/video/fbdev/au1100fb.cmodified+1−1View file
drivers/video/fbdev/au1100fb.hmodified+1−1View file
drivers/video/fbdev/au1200fb.cmodified+2−2View file
drivers/video/fbdev/cirrusfb.cmodified+8−8View file
drivers/video/fbdev/controlfb.cmodified+2−0View file
drivers/video/fbdev/core/fbcvt.cmodified+21−32View file
drivers/video/fbdev/core/fbmem.cmodified+2−6View file
drivers/video/fbdev/da8xx-fb.cmodified+3−4View file
drivers/video/fbdev/imxfb.cmodified+2−0View file
drivers/video/fbdev/kyro/STG4000InitDevice.cmodified+1−1View file
drivers/video/fbdev/matrox/matroxfb_base.cmodified+1−1View file
drivers/video/fbdev/mb862xx/mb862xxfb_accel.cmodified+1−1View file
drivers/video/fbdev/mmp/hw/mmp_ctrl.cmodified+2−1View file
drivers/video/fbdev/nvidia/nv_i2c.cmodified+1−1View file
drivers/video/fbdev/ocfb.cmodified+1−1View file
drivers/video/fbdev/offb.cmodified+1−1View file
drivers/video/fbdev/omap/lcd_ams_delta.cmodified+6−10View file
drivers/video/fbdev/omap/omapfb_main.cmodified+7−6View file
drivers/video/fbdev/omap2/omapfb/displays/connector-dvi.cmodified+1−0View file
drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.cmodified+4−4View file
drivers/video/fbdev/omap2/omapfb/displays/panel-lgphilips-lb035q02.cmodified+3−4View file
drivers/video/fbdev/omap2/omapfb/displays/panel-sharp-ls037v7dw01.cmodified+3−4View file
drivers/video/fbdev/omap2/omapfb/displays/panel-sony-acx565akm.cmodified+1−1View file
drivers/video/fbdev/omap2/omapfb/displays/panel-tpo-td043mtea1.cmodified+3−4View file
drivers/video/fbdev/omap2/omapfb/dss/display-sysfs.cmodified+2−1View file
drivers/video/fbdev/omap2/omapfb/dss/manager-sysfs.cmodified+2−1View file
drivers/video/fbdev/omap2/omapfb/dss/overlay-sysfs.cmodified+2−1View file
drivers/video/fbdev/omap2/omapfb/omapfb-main.cmodified+0−1View file
drivers/video/fbdev/pxa168fb.cmodified+6−9View file
drivers/video/fbdev/pxa3xx-gcu.cmodified+3−7View file
drivers/video/fbdev/s3c-fb.cmodified+8−12View file
drivers/video/fbdev/savage/savagefb.hmodified+0−1View file
drivers/video/fbdev/savage/savagefb_driver.cmodified+4−3View file
drivers/video/fbdev/sis/sis_main.cmodified+1−1View file
drivers/video/fbdev/sm712fb.cmodified+11−35View file
drivers/video/fbdev/smscufx.cmodified+1−2View file
drivers/video/fbdev/ssd1307fb.cmodified+3−4View file
drivers/video/fbdev/udlfb.cmodified+4−4View file
drivers/video/fbdev/via/lcd.cmodified+1−1View file
drivers/video/fbdev/via/viafbdev.cmodified+10−0View file
drivers/video/fbdev/w100fb.cmodified+12−3View file

Only the first 600 diff lines are shown. Download the complete patch.

Documentation/devicetree/bindings/display/simple-framebuffer.yaml

View file
diff --git a/Documentation/devicetree/bindings/display/simple-framebuffer.yaml b/Documentation/devicetree/bindings/display/simple-framebuffer.yaml
index 44a29d8..27ba432 100644
--- a/Documentation/devicetree/bindings/display/simple-framebuffer.yaml
+++ b/Documentation/devicetree/bindings/display/simple-framebuffer.yaml
@@ -52,11 +52,13 @@ description: |+
properties:
compatible:
- items:
- - enum:
- - apple,simple-framebuffer
- - allwinner,simple-framebuffer
- - amlogic,simple-framebuffer
+ oneOf:
+ - items:
+ - enum:
+ - apple,simple-framebuffer
+ - allwinner,simple-framebuffer
+ - amlogic,simple-framebuffer
+ - const: simple-framebuffer
- const: simple-framebuffer
reg:

arch/parisc/include/asm/agp.h

View file
diff --git a/arch/parisc/include/asm/agp.h b/arch/parisc/include/asm/agp.h
index cb04470..14ae54c 100644
--- a/arch/parisc/include/asm/agp.h
+++ b/arch/parisc/include/asm/agp.h
@@ -8,8 +8,8 @@
*
*/
-#define map_page_into_agp(page) /* nothing */
-#define unmap_page_from_agp(page) /* nothing */
+#define map_page_into_agp(page) do { } while (0)
+#define unmap_page_from_agp(page) do { } while (0)
#define flush_agp_cache() mb()
/* GATT allocation. Returns/accepts GATT kernel virtual address. */

arch/powerpc/include/asm/agp.h

View file
diff --git a/arch/powerpc/include/asm/agp.h b/arch/powerpc/include/asm/agp.h
index b29b118..6b6485c 100644
--- a/arch/powerpc/include/asm/agp.h
+++ b/arch/powerpc/include/asm/agp.h
@@ -5,8 +5,8 @@
#include <asm/io.h>
-#define map_page_into_agp(page)
-#define unmap_page_from_agp(page)
+#define map_page_into_agp(page) do {} while (0)
+#define unmap_page_from_agp(page) do {} while (0)
#define flush_agp_cache() mb()
/* GATT allocation. Returns/accepts GATT kernel virtual address. */

arch/sparc/include/asm/agp.h

View file
diff --git a/arch/sparc/include/asm/agp.h b/arch/sparc/include/asm/agp.h
index efe0d6a..2d0ff84 100644
--- a/arch/sparc/include/asm/agp.h
+++ b/arch/sparc/include/asm/agp.h
@@ -4,9 +4,9 @@
/* dummy for now */
-#define map_page_into_agp(page)
-#define unmap_page_from_agp(page)
-#define flush_agp_cache() mb()
+#define map_page_into_agp(page) do { } while (0)
+#define unmap_page_from_agp(page) do { } while (0)
+#define flush_agp_cache() mb()
/* GATT allocation. Returns/accepts GATT kernel virtual address. */
#define alloc_gatt_pages(order) \

drivers/video/backlight/lm3630a_bl.c

View file
diff --git a/drivers/video/backlight/lm3630a_bl.c b/drivers/video/backlight/lm3630a_bl.c
index e8b185b..1d17c43 100644
--- a/drivers/video/backlight/lm3630a_bl.c
+++ b/drivers/video/backlight/lm3630a_bl.c
@@ -594,7 +594,6 @@ static int lm3630a_remove(struct i2c_client *client)
if (pchip->irq) {
free_irq(pchip->irq, pchip);
- flush_workqueue(pchip->irqthread);
destroy_workqueue(pchip->irqthread);
}
return 0;

drivers/video/backlight/qcom-wled.c

View file
diff --git a/drivers/video/backlight/qcom-wled.c b/drivers/video/backlight/qcom-wled.c
index 306bcc6..527210e 100644
--- a/drivers/video/backlight/qcom-wled.c
+++ b/drivers/video/backlight/qcom-wled.c
@@ -1734,6 +1734,7 @@ static const struct of_device_id wled_match_table[] = {
{ .compatible = "qcom,pmi8994-wled", .data = (void *)4 },
{ .compatible = "qcom,pmi8998-wled", .data = (void *)4 },
{ .compatible = "qcom,pm660l-wled", .data = (void *)4 },
+ { .compatible = "qcom,pm6150l-wled", .data = (void *)5 },
{ .compatible = "qcom,pm8150l-wled", .data = (void *)5 },
{}
};

drivers/video/fbdev/Kconfig

View file
diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig
index 6ed5e60..93b8d84 100644
--- a/drivers/video/fbdev/Kconfig
+++ b/drivers/video/fbdev/Kconfig
@@ -829,7 +829,7 @@ config FB_PVR2
You can pass several parameters to the driver at boot time or at
module load time. The parameters look like "video=pvr2:XXX", where
the meaning of XXX can be found at the end of the main source file
- (<file:drivers/video/pvr2fb.c>). Please see the file
+ (<file:drivers/video/fbdev/pvr2fb.c>). Please see the file
<file:Documentation/fb/pvr2fb.rst>.
config FB_OPENCORES

drivers/video/fbdev/asiliantfb.c

View file
diff --git a/drivers/video/fbdev/asiliantfb.c b/drivers/video/fbdev/asiliantfb.c
index 84c56f5..f8ef625 100644
--- a/drivers/video/fbdev/asiliantfb.c
+++ b/drivers/video/fbdev/asiliantfb.c
@@ -110,7 +110,7 @@ static const struct fb_ops asiliantfb_ops = {
static void asiliant_calc_dclk2(u32 *ppixclock, u8 *dclk2_m, u8 *dclk2_n, u8 *dclk2_div)
{
unsigned pixclock = *ppixclock;
- unsigned Ftarget = 1000000 * (1000000 / pixclock);
+ unsigned Ftarget;
unsigned n;
unsigned best_error = 0xffffffff;
unsigned best_m = 0xffffffff,

drivers/video/fbdev/atafb.c

View file
diff --git a/drivers/video/fbdev/atafb.c b/drivers/video/fbdev/atafb.c
index e3812a8..52a35b6 100644
--- a/drivers/video/fbdev/atafb.c
+++ b/drivers/video/fbdev/atafb.c
@@ -76,8 +76,6 @@
#define SWITCH_SND7 0x80
#define SWITCH_NONE 0x00
-#define up(x, r) (((x) + (r) - 1) & ~((r)-1))
-
static int default_par; /* default resolution (0=none) */
@@ -487,8 +485,8 @@ static struct fb_videomode atafb_modedb[] __initdata = {
"tt-mid", 60, 640, 480, 31041, 120, 100, 8, 16, 140, 30,
0, FB_VMODE_NONINTERLACED | FB_VMODE_YWRAP
}, {
- /* 1280x960, 29 kHz, 60 Hz (TT high) */
- "tt-high", 57, 640, 960, 31041, 120, 100, 8, 16, 140, 30,
+ /* 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
},
@@ -1649,12 +1647,12 @@ static int falcon_pan_display(struct fb_var_screeninfo *var,
int bpp = info->var.bits_per_pixel;
if (bpp == 1)
- var->xoffset = up(var->xoffset, 32);
+ var->xoffset = round_up(var->xoffset, 32);
if (bpp != 16)
par->hw.falcon.xoffset = var->xoffset & 15;
else {
par->hw.falcon.xoffset = 0;
- var->xoffset = up(var->xoffset, 2);
+ var->xoffset = round_up(var->xoffset, 2);
}
par->hw.falcon.line_offset = bpp *
(info->var.xres_virtual - info->var.xres) / 16;
@@ -1683,9 +1681,9 @@ static int falcon_setcolreg(unsigned int regno, unsigned int red,
((blue & 0xfc00) >> 8));
if (regno < 16) {
shifter_tt.color_reg[regno] =
- (((red & 0xe000) >> 13) | ((red & 0x1000) >> 12) << 8) |
- (((green & 0xe000) >> 13) | ((green & 0x1000) >> 12) << 4) |
- ((blue & 0xe000) >> 13) | ((blue & 0x1000) >> 12);
+ ((((red & 0xe000) >> 13) | ((red & 0x1000) >> 12)) << 8) |
+ ((((green & 0xe000) >> 13) | ((green & 0x1000) >> 12)) << 4) |
+ ((blue & 0xe000) >> 13) | ((blue & 0x1000) >> 12);
((u32 *)info->pseudo_palette)[regno] = ((red & 0xf800) |
((green & 0xfc00) >> 5) |
((blue & 0xf800) >> 11));
@@ -1971,9 +1969,9 @@ static int stste_setcolreg(unsigned int regno, unsigned int red,
green >>= 12;
if (ATARIHW_PRESENT(EXTD_SHIFTER))
shifter_tt.color_reg[regno] =
- (((red & 0xe) >> 1) | ((red & 1) << 3) << 8) |
- (((green & 0xe) >> 1) | ((green & 1) << 3) << 4) |
- ((blue & 0xe) >> 1) | ((blue & 1) << 3);
+ ((((red & 0xe) >> 1) | ((red & 1) << 3)) << 8) |
+ ((((green & 0xe) >> 1) | ((green & 1) << 3)) << 4) |
+ ((blue & 0xe) >> 1) | ((blue & 1) << 3);
else
shifter_tt.color_reg[regno] =
((red & 0xe) << 7) |
@@ -2268,7 +2266,7 @@ static int pan_display(struct fb_var_screeninfo *var, struct fb_info *info)
if (!fbhw->set_screen_base ||
(!ATARIHW_PRESENT(EXTD_SHIFTER) && var->xoffset))
return -EINVAL;
- var->xoffset = up(var->xoffset, 16);
+ var->xoffset = round_up(var->xoffset, 16);
par->screen_base = screen_base +
(var->yoffset * info->var.xres_virtual + var->xoffset)
* info->var.bits_per_pixel / 8;
@@ -2406,16 +2404,6 @@ static void atafb_set_disp(struct fb_info *info)
atari_stram_to_virt(info->fix.smem_start));
}
-static int atafb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
- u_int transp, struct fb_info *info)
-{
- red >>= 8;
- green >>= 8;
- blue >>= 8;
-
- return info->fbops->fb_setcolreg(regno, red, green, blue, transp, info);
-}
-
static int
atafb_pan_display(struct fb_var_screeninfo *var, struct fb_info *info)
{
@@ -2726,7 +2714,6 @@ static struct fb_ops atafb_ops = {
.owner = THIS_MODULE,
.fb_check_var = atafb_check_var,
.fb_set_par = atafb_set_par,
- .fb_setcolreg = atafb_setcolreg,
.fb_blank = atafb_blank,
.fb_pan_display = atafb_pan_display,
.fb_fillrect = atafb_fillrect,

drivers/video/fbdev/atmel_lcdfb.c

View file
diff --git a/drivers/video/fbdev/atmel_lcdfb.c b/drivers/video/fbdev/atmel_lcdfb.c
index 355b612..1fc8de4 100644
--- a/drivers/video/fbdev/atmel_lcdfb.c
+++ b/drivers/video/fbdev/atmel_lcdfb.c
@@ -1062,15 +1062,16 @@ static int __init atmel_lcdfb_probe(struct platform_device *pdev)
INIT_LIST_HEAD(&info->modelist);
- if (pdev->dev.of_node) {
- ret = atmel_lcdfb_of_init(sinfo);
- if (ret)
- goto free_info;
- } else {
+ if (!pdev->dev.of_node) {
dev_err(dev, "cannot get default configuration\n");
goto free_info;
}
+ ret = atmel_lcdfb_of_init(sinfo);
+ if (ret)
+ goto free_info;
+
+ ret = -ENODEV;
if (!sinfo->config)
goto free_info;

drivers/video/fbdev/aty/aty128fb.c

View file
diff --git a/drivers/video/fbdev/aty/aty128fb.c b/drivers/video/fbdev/aty/aty128fb.c
index e6a4868..6ff16d3 100644
--- a/drivers/video/fbdev/aty/aty128fb.c
+++ b/drivers/video/fbdev/aty/aty128fb.c
@@ -952,7 +952,7 @@ static void aty128_timings(struct aty128fb_par *par)
u32 x_mpll_ref_fb_div;
u32 xclk_cntl;
u32 Nx, M;
- unsigned PostDivSet[] = { 0, 1, 2, 4, 8, 3, 6, 12 };
+ static const unsigned int PostDivSet[] = { 0, 1, 2, 4, 8, 3, 6, 12 };
#endif
if (!par->constants.ref_clk)
@@ -1321,8 +1321,10 @@ static void aty128_set_pll(struct aty128_pll *pll,
{
u32 div3;
- unsigned char post_conv[] = /* register values for post dividers */
- { 2, 0, 1, 4, 2, 2, 6, 2, 3, 2, 2, 2, 7 };
+ /* register values for post dividers */
+ static const unsigned char post_conv[] = {
+ 2, 0, 1, 4, 2, 2, 6, 2, 3, 2, 2, 2, 7
+ };
/* select PPLL_DIV_3 */
aty_st_le32(CLOCK_CNTL_INDEX, aty_ld_le32(CLOCK_CNTL_INDEX) | (3 << 8));
@@ -1360,7 +1362,7 @@ static int aty128_var_to_pll(u32 period_in_ps, struct aty128_pll *pll,
const struct aty128fb_par *par)
{
const struct aty128_constants c = par->constants;
- unsigned char post_dividers[] = {1,2,4,8,3,6,12};
+ static const unsigned char post_dividers[] = { 1, 2, 4, 8, 3, 6, 12 };
u32 output_freq;
u32 vclk; /* in .01 MHz */
int i = 0;

drivers/video/fbdev/aty/mach64_ct.c

View file
diff --git a/drivers/video/fbdev/aty/mach64_ct.c b/drivers/video/fbdev/aty/mach64_ct.c
index 011b07e..e967536 100644
--- a/drivers/video/fbdev/aty/mach64_ct.c
+++ b/drivers/video/fbdev/aty/mach64_ct.c
@@ -22,13 +22,11 @@ static u32 aty_pll_to_var_ct(const struct fb_info *info, const union aty_pll *pl
u8 aty_ld_pll_ct(int offset, const struct atyfb_par *par)
{
- u8 res;
/* write addr byte */
aty_st_8(CLOCK_CNTL_ADDR, (offset << 2) & PLL_ADDR, par);
/* read the register value */
- res = aty_ld_8(CLOCK_CNTL_DATA, par);
- return res;
+ return aty_ld_8(CLOCK_CNTL_DATA, par);
}
static void aty_st_pll_ct(int offset, u8 val, const struct atyfb_par *par)

drivers/video/fbdev/aty/mach64_gx.c

View file
diff --git a/drivers/video/fbdev/aty/mach64_gx.c b/drivers/video/fbdev/aty/mach64_gx.c
index 9c37e28..d06d248 100644
--- a/drivers/video/fbdev/aty/mach64_gx.c
+++ b/drivers/video/fbdev/aty/mach64_gx.c
@@ -352,10 +352,8 @@ static int aty_var_to_pll_18818(const struct fb_info *info, u32 vclk_per,
post_divider = 1;
if (MHz100 > MAX_FREQ_2595) {
- MHz100 = MAX_FREQ_2595;
return -EINVAL;
} else if (MHz100 < ABS_MIN_FREQ_2595) {
- program_bits = 0; /* MHz100 = 257 */
return -EINVAL;
} else {
while (MHz100 < MIN_FREQ_2595) {

drivers/video/fbdev/au1100fb.c

View file
diff --git a/drivers/video/fbdev/au1100fb.c b/drivers/video/fbdev/au1100fb.c
index 37a6512..52f731a 100644
--- a/drivers/video/fbdev/au1100fb.c
+++ b/drivers/video/fbdev/au1100fb.c
@@ -239,7 +239,7 @@ int au1100fb_fb_setcolreg(unsigned regno, unsigned red, unsigned green, unsigned
u32 value;
fbdev = to_au1100fb_device(fbi);
- palette = fbdev->regs->lcd_pallettebase;
+ palette = fbdev->regs->lcd_palettebase;
if (regno > (AU1100_LCD_NBR_PALETTE_ENTRIES - 1))
return -EINVAL;

drivers/video/fbdev/au1100fb.h

View file
diff --git a/drivers/video/fbdev/au1100fb.h b/drivers/video/fbdev/au1100fb.h
index e7239bc..79f4048 100644
--- a/drivers/video/fbdev/au1100fb.h
+++ b/drivers/video/fbdev/au1100fb.h
@@ -92,7 +92,7 @@ struct au1100fb_regs
u32 lcd_pwmdiv;
u32 lcd_pwmhi;
u32 reserved[(0x0400-0x002C)/4];
- u32 lcd_pallettebase[256];
+ u32 lcd_palettebase[256];
};
struct au1100fb_device {

drivers/video/fbdev/au1200fb.c

View file
diff --git a/drivers/video/fbdev/au1200fb.c b/drivers/video/fbdev/au1200fb.c
index c00e01a..81c3154 100644
--- a/drivers/video/fbdev/au1200fb.c
+++ b/drivers/video/fbdev/au1200fb.c
@@ -1233,8 +1233,8 @@ static int au1200fb_fb_mmap(struct fb_info *info, struct vm_area_struct *vma)
{
struct au1200fb_device *fbdev = info->par;
- return dma_mmap_attrs(fbdev->dev, vma, fbdev->fb_mem, fbdev->fb_phys,
- fbdev->fb_len, 0);
+ return dma_mmap_coherent(fbdev->dev, vma,
+ fbdev->fb_mem, fbdev->fb_phys, fbdev->fb_len);
}
static void set_global(u_int cmd, struct au1200_lcd_global_regs_t *pdata)

drivers/video/fbdev/cirrusfb.c

View file
diff --git a/drivers/video/fbdev/cirrusfb.c b/drivers/video/fbdev/cirrusfb.c
index 93802ab..3d47c34 100644
--- a/drivers/video/fbdev/cirrusfb.c
+++ b/drivers/video/fbdev/cirrusfb.c
@@ -469,7 +469,7 @@ static int cirrusfb_check_mclk(struct fb_info *info, long freq)
return 0;
}
-static int cirrusfb_check_pixclock(const struct fb_var_screeninfo *var,
+static int cirrusfb_check_pixclock(struct fb_var_screeninfo *var,
struct fb_info *info)
{
long freq;
@@ -478,9 +478,7 @@ static int cirrusfb_check_pixclock(const struct fb_var_screeninfo *var,
unsigned maxclockidx = var->bits_per_pixel >> 3;
/* convert from ps to kHz */
- freq = PICOS2KHZ(var->pixclock);
-
- dev_dbg(info->device, "desired pixclock: %ld kHz\n", freq);
+ freq = PICOS2KHZ(var->pixclock ? : 1);
maxclock = cirrusfb_board_info[cinfo->btype].maxclock[maxclockidx];
cinfo->multiplexing = 0;
@@ -488,11 +486,13 @@ static int cirrusfb_check_pixclock(const struct fb_var_screeninfo *var,
/* If the frequency is greater than we can support, we might be able
* to use multiplexing for the video mode */
if (freq > maxclock) {
- dev_err(info->device,
- "Frequency greater than maxclock (%ld kHz)\n",
- maxclock);
- return -EINVAL;
+ var->pixclock = KHZ2PICOS(maxclock);
+
+ while ((freq = PICOS2KHZ(var->pixclock)) > maxclock)
+ var->pixclock++;
}
+ dev_dbg(info->device, "desired pixclock: %ld kHz\n", freq);
+
/*
* Additional constraint: 8bpp uses DAC clock doubling to allow maximum
* pixel clock

drivers/video/fbdev/controlfb.c

View file
diff --git a/drivers/video/fbdev/controlfb.c b/drivers/video/fbdev/controlfb.c
index 5093114..bd59e7b 100644
--- a/drivers/video/fbdev/controlfb.c
+++ b/drivers/video/fbdev/controlfb.c
@@ -67,7 +67,9 @@
#define out_8(addr, val) (void)(val)
#define in_le32(addr) 0
#define out_le32(addr, val) (void)(val)
+#ifndef pgprot_cached_wthru
#define pgprot_cached_wthru(prot) (prot)
+#endif
#else
static void invalid_vram_cache(void __force *addr)
{

drivers/video/fbdev/core/fbcvt.c

View file
diff --git a/drivers/video/fbdev/core/fbcvt.c b/drivers/video/fbdev/core/fbcvt.c
index 55d2bd0..6484346 100644
--- a/drivers/video/fbdev/core/fbcvt.c
+++ b/drivers/video/fbdev/core/fbcvt.c
@@ -214,9 +214,11 @@ static u32 fb_cvt_aspect_ratio(struct fb_cvt_data *cvt)
static void fb_cvt_print_name(struct fb_cvt_data *cvt)
{
u32 pixcount, pixcount_mod;
- int cnt = 255, offset = 0, read = 0;
- u8 *buf = kzalloc(256, GFP_KERNEL);
+ int size = 256;
+ int off = 0;
+ u8 *buf;
+ buf = kzalloc(size, GFP_KERNEL);
if (!buf)
return;
@@ -224,43 +226,30 @@ static void fb_cvt_print_name(struct fb_cvt_data *cvt)
pixcount_mod = (cvt->xres * (cvt->yres/cvt->interlace)) % 1000000;
pixcount_mod /= 1000;
- read = snprintf(buf+offset, cnt, "fbcvt: %dx%d@%d: CVT Name - ",
- cvt->xres, cvt->yres, cvt->refresh);
- offset += read;
- cnt -= read;
+ off += scnprintf(buf + off, size - off, "fbcvt: %dx%d@%d: CVT Name - ",
+ cvt->xres, cvt->yres, cvt->refresh);
- if (cvt->status)
- snprintf(buf+offset, cnt, "Not a CVT standard - %d.%03d Mega "
- "Pixel Image\n", pixcount, pixcount_mod);
- else {
- if (pixcount) {
- read = snprintf(buf+offset, cnt, "%d", pixcount);
- cnt -= read;
- offset += read;
- }
+ if (cvt->status) {
+ off += scnprintf(buf + off, size - off,
+ "Not a CVT standard - %d.%03d Mega Pixel Image\n",
+ pixcount, pixcount_mod);
+ } else {
+ if (pixcount)
+ off += scnprintf(buf + off, size - off, "%d", pixcount);
- read = snprintf(buf+offset, cnt, ".%03dM", pixcount_mod);
- cnt -= read;
- offset += read;
+ off += scnprintf(buf + off, size - off, ".%03dM", pixcount_mod);
if (cvt->aspect_ratio == 0)
- read = snprintf(buf+offset, cnt, "3");
+ off += scnprintf(buf + off, size - off, "3");
else if (cvt->aspect_ratio == 3)
- read = snprintf(buf+offset, cnt, "4");
+ off += scnprintf(buf + off, size - off, "4");
else if (cvt->aspect_ratio == 1 || cvt->aspect_ratio == 4)
- read = snprintf(buf+offset, cnt, "9");
+ off += scnprintf(buf + off, size - off, "9");
else if (cvt->aspect_ratio == 2)
- read = snprintf(buf+offset, cnt, "A");
- else
- read = 0;
- cnt -= read;
- offset += read;
-
- if (cvt->flags & FB_CVT_FLAG_REDUCED_BLANK) {
- read = snprintf(buf+offset, cnt, "-R");
- cnt -= read;
- offset += read;
- }
+ off += scnprintf(buf + off, size - off, "A");
+
+ if (cvt->flags & FB_CVT_FLAG_REDUCED_BLANK)
+ off += scnprintf(buf + off, size - off, "-R");
}
printk(KERN_INFO "%s\n", buf);

drivers/video/fbdev/core/fbmem.c

View file
diff --git a/drivers/video/fbdev/core/fbmem.c b/drivers/video/fbdev/core/fbmem.c
index 13083ad..8df3ac9 100644
--- a/drivers/video/fbdev/core/fbmem.c
+++ b/drivers/video/fbdev/core/fbmem.c
@@ -396,18 +396,14 @@ static void fb_rotate_logo(struct fb_info *info, u8 *dst,
} else if (rotate == FB_ROTATE_CW) {
fb_rotate_logo_cw(image->data, dst, image->width,
image->height);
- tmp = image->width;
- image->width = image->height;
- image->height = tmp;
+ swap(image->width, image->height);
tmp = image->dy;
image->dy = image->dx;
image->dx = info->var.xres - image->width - tmp;
} else if (rotate == FB_ROTATE_CCW) {
fb_rotate_logo_ccw(image->data, dst, image->width,
image->height);
- tmp = image->width;
- image->width = image->height;
- image->height = tmp;
+ swap(image->width, image->height);
tmp = image->dx;
image->dx = image->dy;
image->dy = info->var.yres - image->height - tmp;

drivers/video/fbdev/da8xx-fb.c

View file
diff --git a/drivers/video/fbdev/da8xx-fb.c b/drivers/video/fbdev/da8xx-fb.c
index 005ac3c..ae76a21 100644
--- a/drivers/video/fbdev/da8xx-fb.c
+++ b/drivers/video/fbdev/da8xx-fb.c
@@ -1354,10 +1354,9 @@ static int fb_probe(struct platform_device *device)
return PTR_ERR(da8xx_fb_reg_base);
tmp_lcdc_clk = devm_clk_get(&device->dev, "fck");
- if (IS_ERR(tmp_lcdc_clk)) {
- dev_err(&device->dev, "Can not get device clock\n");
- return PTR_ERR(tmp_lcdc_clk);
- }
+ if (IS_ERR(tmp_lcdc_clk))
+ return dev_err_probe(&device->dev, PTR_ERR(tmp_lcdc_clk),
+ "Can not get device clock\n");
pm_runtime_enable(&device->dev);
pm_runtime_get_sync(&device->dev);

drivers/video/fbdev/imxfb.c

View file
diff --git a/drivers/video/fbdev/imxfb.c b/drivers/video/fbdev/imxfb.c
index ad59825..6828875 100644
--- a/drivers/video/fbdev/imxfb.c
+++ b/drivers/video/fbdev/imxfb.c
@@ -1083,6 +1083,8 @@ static int imxfb_remove(struct platform_device *pdev)
struct resource *res;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+ if (!res)
+ return -EINVAL;
imxfb_disable_controller(fbi);

drivers/video/fbdev/kyro/STG4000InitDevice.c

View file
diff --git a/drivers/video/fbdev/kyro/STG4000InitDevice.c b/drivers/video/fbdev/kyro/STG4000InitDevice.c
index 21875d3..edfa0a0 100644
--- a/drivers/video/fbdev/kyro/STG4000InitDevice.c
+++ b/drivers/video/fbdev/kyro/STG4000InitDevice.c
@@ -124,7 +124,7 @@ u32 ProgramClock(u32 refClock,
u32 ulScore, ulPhaseScore, ulVcoScore;
u32 ulTmp = 0, ulVCO;
u32 ulScaleClockReq, ulMinClock, ulMaxClock;
- u32 ODValues[] = { 1, 2, 0 };
+ static const unsigned char ODValues[] = { 1, 2, 0 };
/* Translate clock in Hz */
coreClock *= 100; /* in Hz */

drivers/video/fbdev/matrox/matroxfb_base.c

View file
diff --git a/drivers/video/fbdev/matrox/matroxfb_base.c b/drivers/video/fbdev/matrox/matroxfb_base.c
index 5c82611..236521b 100644
--- a/drivers/video/fbdev/matrox/matroxfb_base.c
+++ b/drivers/video/fbdev/matrox/matroxfb_base.c
@@ -1377,7 +1377,7 @@ static struct video_board vbG200 = {
.lowlevel = &matrox_G100
};
static struct video_board vbG200eW = {
- .maxvram = 0x800000,
+ .maxvram = 0x100000,
.maxdisplayable = 0x800000,
.accelID = FB_ACCEL_MATROX_MGAG200,
.lowlevel = &matrox_G100

drivers/video/fbdev/mb862xx/mb862xxfb_accel.c

View file
diff --git a/drivers/video/fbdev/mb862xx/mb862xxfb_accel.c b/drivers/video/fbdev/mb862xx/mb862xxfb_accel.c
index d40b806..61aed7f 100644
--- a/drivers/video/fbdev/mb862xx/mb862xxfb_accel.c
+++ b/drivers/video/fbdev/mb862xx/mb862xxfb_accel.c
@@ -132,7 +132,7 @@ static void mb86290fb_imageblit8(u32 *cmd, u16 step, u16 dx, u16 dy,
cmd[2] = (height << 16) | width;
i = 0;
- line = ptr = image->data;
+ line = image->data;
bytes = image->width;
while (i < height) {

drivers/video/fbdev/mmp/hw/mmp_ctrl.c

View file
diff --git a/drivers/video/fbdev/mmp/hw/mmp_ctrl.c b/drivers/video/fbdev/mmp/hw/mmp_ctrl.c
index 061a105..a9df8ee 100644
--- a/drivers/video/fbdev/mmp/hw/mmp_ctrl.c
+++ b/drivers/video/fbdev/mmp/hw/mmp_ctrl.c
@@ -514,7 +514,8 @@ static int mmphw_probe(struct platform_device *pdev)
/* get clock */
ctrl->clk = devm_clk_get(ctrl->dev, mi->clk_name);
if (IS_ERR(ctrl->clk)) {
- dev_err(ctrl->dev, "unable to get clk %s\n", mi->clk_name);
+ dev_err_probe(ctrl->dev, ret,
+ "unable to get clk %s\n", mi->clk_name);
ret = -ENOENT;
goto failed;
}

drivers/video/fbdev/nvidia/nv_i2c.c

View file
diff --git a/drivers/video/fbdev/nvidia/nv_i2c.c b/drivers/video/fbdev/nvidia/nv_i2c.c

This diff is incomplete. Download the complete patch.

drivers/video/fbdev/ocfb.c

View file

This diff is incomplete. Download the complete patch.

drivers/video/fbdev/offb.c

View file

This diff is incomplete. Download the complete patch.

drivers/video/fbdev/omap/lcd_ams_delta.c

View file

This diff is incomplete. Download the complete patch.

drivers/video/fbdev/omap/omapfb_main.c

View file

This diff is incomplete. Download the complete patch.

drivers/video/fbdev/omap2/omapfb/displays/connector-dvi.c

View file

This diff is incomplete. Download the complete patch.

drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.c

View file

This diff is incomplete. Download the complete patch.

drivers/video/fbdev/omap2/omapfb/displays/panel-lgphilips-lb035q02.c

View file

This diff is incomplete. Download the complete patch.

drivers/video/fbdev/omap2/omapfb/displays/panel-sharp-ls037v7dw01.c

View file

This diff is incomplete. Download the complete patch.

drivers/video/fbdev/omap2/omapfb/displays/panel-sony-acx565akm.c

View file

This diff is incomplete. Download the complete patch.

drivers/video/fbdev/omap2/omapfb/displays/panel-tpo-td043mtea1.c

View file

This diff is incomplete. Download the complete patch.

drivers/video/fbdev/omap2/omapfb/dss/display-sysfs.c

View file

This diff is incomplete. Download the complete patch.

drivers/video/fbdev/omap2/omapfb/dss/manager-sysfs.c

View file

This diff is incomplete. Download the complete patch.

drivers/video/fbdev/omap2/omapfb/dss/overlay-sysfs.c

View file

This diff is incomplete. Download the complete patch.

drivers/video/fbdev/omap2/omapfb/omapfb-main.c

View file

This diff is incomplete. Download the complete patch.

drivers/video/fbdev/pxa168fb.c

View file

This diff is incomplete. Download the complete patch.

drivers/video/fbdev/pxa3xx-gcu.c

View file

This diff is incomplete. Download the complete patch.

drivers/video/fbdev/s3c-fb.c

View file

This diff is incomplete. Download the complete patch.

drivers/video/fbdev/savage/savagefb.h

View file

This diff is incomplete. Download the complete patch.

drivers/video/fbdev/savage/savagefb_driver.c

View file

This diff is incomplete. Download the complete patch.

drivers/video/fbdev/sis/sis_main.c

View file

This diff is incomplete. Download the complete patch.

drivers/video/fbdev/sm712fb.c

View file

This diff is incomplete. Download the complete patch.

drivers/video/fbdev/smscufx.c

View file

This diff is incomplete. Download the complete patch.

drivers/video/fbdev/ssd1307fb.c

View file

This diff is incomplete. Download the complete patch.

drivers/video/fbdev/udlfb.c

View file

This diff is incomplete. Download the complete patch.

drivers/video/fbdev/via/lcd.c

View file

This diff is incomplete. Download the complete patch.

drivers/video/fbdev/via/viafbdev.c

View file

This diff is incomplete. Download the complete patch.

drivers/video/fbdev/w100fb.c

View file

This diff is incomplete. Download the complete patch.