diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2012-07-18 10:59:16 -0400 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2012-07-18 20:05:23 -0400 |
commit | bd5f2c6911c210af52fa4dc4cf504043ff8a4971 (patch) | |
tree | 4537b7e43649de6c775f741dde4dbf53d25d50b2 /drivers/video/sh_mobile_lcdcfb.c | |
parent | 16ca21c9a9f64577221c47d8d2f00d13b880aefa (diff) |
fbdev: sh_mobile_lcdc: Use channel configuration to initialize fb device
Copy the x and y virtual resolutions from the channel information
instead of recomputing them.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'drivers/video/sh_mobile_lcdcfb.c')
-rw-r--r-- | drivers/video/sh_mobile_lcdcfb.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/video/sh_mobile_lcdcfb.c b/drivers/video/sh_mobile_lcdcfb.c index 67877ccadacb..68011b5596c5 100644 --- a/drivers/video/sh_mobile_lcdcfb.c +++ b/drivers/video/sh_mobile_lcdcfb.c | |||
@@ -2214,14 +2214,14 @@ sh_mobile_lcdc_channel_fb_init(struct sh_mobile_lcdc_chan *ch, | |||
2214 | info->fix.ypanstep = 2; | 2214 | info->fix.ypanstep = 2; |
2215 | 2215 | ||
2216 | /* Initialize variable screen information using the first mode as | 2216 | /* Initialize variable screen information using the first mode as |
2217 | * default. The default Y virtual resolution is twice the panel size to | 2217 | * default. |
2218 | * allow for double-buffering. | ||
2219 | */ | 2218 | */ |
2220 | var = &info->var; | 2219 | var = &info->var; |
2221 | fb_videomode_to_var(var, mode); | 2220 | fb_videomode_to_var(var, mode); |
2222 | var->width = ch->cfg->panel_cfg.width; | 2221 | var->width = ch->cfg->panel_cfg.width; |
2223 | var->height = ch->cfg->panel_cfg.height; | 2222 | var->height = ch->cfg->panel_cfg.height; |
2224 | var->yres_virtual = var->yres * 2; | 2223 | var->xres_virtual = ch->xres_virtual; |
2224 | var->yres_virtual = ch->yres_virtual; | ||
2225 | var->activate = FB_ACTIVATE_NOW; | 2225 | var->activate = FB_ACTIVATE_NOW; |
2226 | 2226 | ||
2227 | /* Use the legacy API by default for RGB formats, and the FOURCC API | 2227 | /* Use the legacy API by default for RGB formats, and the FOURCC API |
@@ -2619,7 +2619,9 @@ sh_mobile_lcdc_channel_init(struct sh_mobile_lcdc_priv *priv, | |||
2619 | num_modes = cfg->num_modes; | 2619 | num_modes = cfg->num_modes; |
2620 | } | 2620 | } |
2621 | 2621 | ||
2622 | /* Use the first mode as default. */ | 2622 | /* Use the first mode as default. The default Y virtual resolution is |
2623 | * twice the panel size to allow for double-buffering. | ||
2624 | */ | ||
2623 | ch->format = format; | 2625 | ch->format = format; |
2624 | ch->xres = mode->xres; | 2626 | ch->xres = mode->xres; |
2625 | ch->xres_virtual = mode->xres; | 2627 | ch->xres_virtual = mode->xres; |