diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2011-08-31 13:00:56 +0200 |
---|---|---|
committer | Florian Tobias Schandinat <FlorianSchandinat@gmx.de> | 2011-09-05 16:37:14 +0000 |
commit | 91fba48d59666718e3d3e86964755b80d39cdbdd (patch) | |
tree | 51323b2d579ab675f0a4478e3171d2dfd0450f28 /drivers/video/sh_mobile_lcdcfb.c | |
parent | dc1d5adab5cc57eb732407d80c9e7ae48891ffca (diff) | |
download | blackbird-op-linux-91fba48d59666718e3d3e86964755b80d39cdbdd.tar.gz blackbird-op-linux-91fba48d59666718e3d3e86964755b80d39cdbdd.zip |
fbdev: sh_mobile_lcdc: Update fix.line_length in .fb_set_par()
Instead of updating the fixed screen information line length manually
after calling fb_set_var() in sh_mobile_fb_reconfig(), update the field
in the .fb_set_par() operation handler.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Diffstat (limited to 'drivers/video/sh_mobile_lcdcfb.c')
-rw-r--r-- | drivers/video/sh_mobile_lcdcfb.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/drivers/video/sh_mobile_lcdcfb.c b/drivers/video/sh_mobile_lcdcfb.c index 1ff215c42c41..b6da1d644619 100644 --- a/drivers/video/sh_mobile_lcdcfb.c +++ b/drivers/video/sh_mobile_lcdcfb.c @@ -998,11 +998,6 @@ static void sh_mobile_fb_reconfig(struct fb_info *info) /* Couldn't reconfigure, hopefully, can continue as before */ return; - if (info->var.nonstd) - info->fix.line_length = mode1.xres; - else - info->fix.line_length = mode1.xres * (ch->cfg.bpp / 8); - /* * fb_set_var() calls the notifier change internally, only if * FBINFO_MISC_USEREVENT flag is set. Since we do not want to fake a @@ -1157,12 +1152,22 @@ static int sh_mobile_check_var(struct fb_var_screeninfo *var, struct fb_info *in static int sh_mobile_set_par(struct fb_info *info) { struct sh_mobile_lcdc_chan *ch = info->par; + u32 line_length = info->fix.line_length; int ret; sh_mobile_lcdc_stop(ch->lcdc); + + if (info->var.nonstd) + info->fix.line_length = info->var.xres; + else + info->fix.line_length = info->var.xres + * info->var.bits_per_pixel / 8; + ret = sh_mobile_lcdc_start(ch->lcdc); - if (ret < 0) + if (ret < 0) { dev_err(info->dev, "%s: unable to restart LCDC\n", __func__); + info->fix.line_length = line_length; + } return ret; } |