summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2012-07-18 16:59:16 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2012-07-19 02:05:23 +0200
commitbd5f2c6911c210af52fa4dc4cf504043ff8a4971 (patch)
tree4537b7e43649de6c775f741dde4dbf53d25d50b2 /drivers
parent16ca21c9a9f64577221c47d8d2f00d13b880aefa (diff)
downloadtalos-op-linux-bd5f2c6911c210af52fa4dc4cf504043ff8a4971.tar.gz
talos-op-linux-bd5f2c6911c210af52fa4dc4cf504043ff8a4971.zip
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')
-rw-r--r--drivers/video/sh_mobile_lcdcfb.c10
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,
info->fix.ypanstep = 2;
/* Initialize variable screen information using the first mode as
- * default. The default Y virtual resolution is twice the panel size to
- * allow for double-buffering.
+ * default.
*/
var = &info->var;
fb_videomode_to_var(var, mode);
var->width = ch->cfg->panel_cfg.width;
var->height = ch->cfg->panel_cfg.height;
- var->yres_virtual = var->yres * 2;
+ var->xres_virtual = ch->xres_virtual;
+ var->yres_virtual = ch->yres_virtual;
var->activate = FB_ACTIVATE_NOW;
/* 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,
num_modes = cfg->num_modes;
}
- /* Use the first mode as default. */
+ /* Use the first mode as default. The default Y virtual resolution is
+ * twice the panel size to allow for double-buffering.
+ */
ch->format = format;
ch->xres = mode->xres;
ch->xres_virtual = mode->xres;
OpenPOWER on IntegriCloud