From 109a623f5ea4aeb7c936c10316b6d4d3d7030360 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Wed, 31 Aug 2011 13:00:56 +0200 Subject: [PATCH] --- yaml --- r: 271307 b: refs/heads/master c: 91fba48d59666718e3d3e86964755b80d39cdbdd h: refs/heads/master i: 271305: 32a9952ec36f988d0992a5dbfbc7e8100770f0e1 271303: cd1c8449c12acd2bfe3923ff7f04c3bedc3804bd v: v3 --- [refs] | 2 +- trunk/drivers/video/sh_mobile_lcdcfb.c | 17 +++++++++++------ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/[refs] b/[refs] index e1b6b848f1cc..37bfeb93801f 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: dc1d5adab5cc57eb732407d80c9e7ae48891ffca +refs/heads/master: 91fba48d59666718e3d3e86964755b80d39cdbdd diff --git a/trunk/drivers/video/sh_mobile_lcdcfb.c b/trunk/drivers/video/sh_mobile_lcdcfb.c index 1ff215c42c41..b6da1d644619 100644 --- a/trunk/drivers/video/sh_mobile_lcdcfb.c +++ b/trunk/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; }