Skip to content

Commit

Permalink
Merge tag 'for-5.20/fbdev-1' of git://git.kernel.org/pub/scm/linux/ke…
Browse files Browse the repository at this point in the history
…rnel/git/deller/linux-fbdev

Pull fbdev updates from Helge Deller:
 "The two major changes in this patchset corrects VGA modes, color
  handling and various other smaller fixes in the Atari framebuffer (by
  Geert Uytterhoeven), and devm_* conversion, platform data fixes and
  header cleanups in the imxfb driver (by Uwe Kleine-König).

  Other small patches clean up code in sa1100fb, cirrusfb and omapfb,
  fix a refcount leak in amba-clcd (by Liang He), and adds parameter
  checks to arkfb, i740fb, vt8623fb and s3fb (by Zheyu Ma)"

* tag 'for-5.20/fbdev-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev: (27 commits)
  video: fbdev: s3fb: Check the size of screen before memset_io()
  video: fbdev: arkfb: Check the size of screen before memset_io()
  video: fbdev: vt8623fb: Check the size of screen before memset_io()
  video: fbdev: i740fb: Check the argument of i740_calc_vclk()
  video: fbdev: arkfb: Fix a divide-by-zero bug in ark_set_pixclock()
  video: fbdev: imxfb: fix return value check in imxfb_probe()
  video: fbdev: sis: fix typos in SiS_GetModeID()
  video: fbdev: imxfb: Convert request_mem_region + ioremap to devm_ioremap_resource
  video: fbdev: imxfb: Fold <linux/platform_data/video-imxfb.h> into only user
  video: fbdev: imxfb: Drop unused symbols from header
  video: fbdev: imxfb: Drop platform data support
  video: fbdev: amba-clcd: Fix refcount leak bugs
  video: fbdev: omapfb: Unexport omap*_update_window_async()
  video: fbdev: atari: Remove backward bug-compatibility
  video: fbdev: atari: Remove unused definitions and variables
  video: fbdev: atari: Fix VGA modes
  video: fbdev: atari: Fix TT High video mode vertical refresh
  video: fbdev: atari: Remove unneeded casts to void *
  video: fbdev: atari: Remove unneeded casts from void *
  video: fbdev: atari: Fix ext_setcolreg()
  ...
  • Loading branch information
Linus Torvalds committed Aug 7, 2022
2 parents 1612c38 + 6ba592f commit b5a8466
Show file tree
Hide file tree
Showing 24 changed files with 136 additions and 334 deletions.
4 changes: 2 additions & 2 deletions Documentation/m68k/kernel-options.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -8139,7 +8139,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 <Frank.li@nxp.com>
Expand Down
7 changes: 2 additions & 5 deletions drivers/video/fbdev/68328fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand Down
24 changes: 18 additions & 6 deletions drivers/video/fbdev/amba-clcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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)
Expand Down
15 changes: 2 additions & 13 deletions drivers/video/fbdev/amifb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
9 changes: 8 additions & 1 deletion drivers/video/fbdev/arkfb.c
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,12 @@ static int arkfb_set_par(struct fb_info *info)
return -EINVAL;
}

ark_set_pixclock(info, (hdiv * info->var.pixclock) / hmul);
value = (hdiv * info->var.pixclock) / hmul;
if (!value) {
fb_dbg(info, "invalid pixclock\n");
value = 1;
}
ark_set_pixclock(info, value);
svga_set_timings(par->state.vgabase, &ark_timing_regs, &(info->var), hmul, hdiv,
(info->var.vmode & FB_VMODE_DOUBLE) ? 2 : 1,
(info->var.vmode & FB_VMODE_INTERLACED) ? 2 : 1,
Expand All @@ -792,6 +797,8 @@ static int arkfb_set_par(struct fb_info *info)
value = ((value * hmul / hdiv) / 8) - 5;
vga_wcrt(par->state.vgabase, 0x42, (value + 1) / 2);

if (screen_size > info->screen_size)
screen_size = info->screen_size;
memset_io(info->screen_base, 0x00, screen_size);
/* Device and screen back on */
svga_wcrt_mask(par->state.vgabase, 0x17, 0x80, 0x80);
Expand Down
Loading

0 comments on commit b5a8466

Please sign in to comment.