diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2011-08-31 07:00:56 -0400 |
---|---|---|
committer | Florian Tobias Schandinat <FlorianSchandinat@gmx.de> | 2011-09-05 12:37:14 -0400 |
commit | 91fba48d59666718e3d3e86964755b80d39cdbdd (patch) | |
tree | 51323b2d579ab675f0a4478e3171d2dfd0450f28 /drivers/video/sh_mobile_lcdcfb.c | |
parent | dc1d5adab5cc57eb732407d80c9e7ae48891ffca (diff) |
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) | |||
998 | /* Couldn't reconfigure, hopefully, can continue as before */ | 998 | /* Couldn't reconfigure, hopefully, can continue as before */ |
999 | return; | 999 | return; |
1000 | 1000 | ||
1001 | if (info->var.nonstd) | ||
1002 | info->fix.line_length = mode1.xres; | ||
1003 | else | ||
1004 | info->fix.line_length = mode1.xres * (ch->cfg.bpp / 8); | ||
1005 | |||
1006 | /* | 1001 | /* |
1007 | * fb_set_var() calls the notifier change internally, only if | 1002 | * fb_set_var() calls the notifier change internally, only if |
1008 | * FBINFO_MISC_USEREVENT flag is set. Since we do not want to fake a | 1003 | * 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 | |||
1157 | static int sh_mobile_set_par(struct fb_info *info) | 1152 | static int sh_mobile_set_par(struct fb_info *info) |
1158 | { | 1153 | { |
1159 | struct sh_mobile_lcdc_chan *ch = info->par; | 1154 | struct sh_mobile_lcdc_chan *ch = info->par; |
1155 | u32 line_length = info->fix.line_length; | ||
1160 | int ret; | 1156 | int ret; |
1161 | 1157 | ||
1162 | sh_mobile_lcdc_stop(ch->lcdc); | 1158 | sh_mobile_lcdc_stop(ch->lcdc); |
1159 | |||
1160 | if (info->var.nonstd) | ||
1161 | info->fix.line_length = info->var.xres; | ||
1162 | else | ||
1163 | info->fix.line_length = info->var.xres | ||
1164 | * info->var.bits_per_pixel / 8; | ||
1165 | |||
1163 | ret = sh_mobile_lcdc_start(ch->lcdc); | 1166 | ret = sh_mobile_lcdc_start(ch->lcdc); |
1164 | if (ret < 0) | 1167 | if (ret < 0) { |
1165 | dev_err(info->dev, "%s: unable to restart LCDC\n", __func__); | 1168 | dev_err(info->dev, "%s: unable to restart LCDC\n", __func__); |
1169 | info->fix.line_length = line_length; | ||
1170 | } | ||
1166 | 1171 | ||
1167 | return ret; | 1172 | return ret; |
1168 | } | 1173 | } |