aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/sh_mobile_lcdcfb.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2012-07-18 10:29:20 -0400
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2012-07-18 20:05:23 -0400
commit16ca21c9a9f64577221c47d8d2f00d13b880aefa (patch)
treea94142feb816c9b03efdd20c496fd1fb98a1e144 /drivers/video/sh_mobile_lcdcfb.c
parent0c75c4e073a8ec35bfd6c8adcceb2b896f2063e2 (diff)
fbdev: sh_mobile_lcdc: Fix line pitch computation
Line pitch depends on the virtual horizontal resolution, compute it accordingly. 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.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/video/sh_mobile_lcdcfb.c b/drivers/video/sh_mobile_lcdcfb.c
index 644c2309a49..67877ccadac 100644
--- a/drivers/video/sh_mobile_lcdcfb.c
+++ b/drivers/video/sh_mobile_lcdcfb.c
@@ -1580,9 +1580,9 @@ static int sh_mobile_lcdc_overlay_set_par(struct fb_info *info)
1580 ovl->yres_virtual = info->var.yres_virtual; 1580 ovl->yres_virtual = info->var.yres_virtual;
1581 1581
1582 if (ovl->format->yuv) 1582 if (ovl->format->yuv)
1583 ovl->pitch = info->var.xres; 1583 ovl->pitch = info->var.xres_virtual;
1584 else 1584 else
1585 ovl->pitch = info->var.xres * ovl->format->bpp / 8; 1585 ovl->pitch = info->var.xres_virtual * ovl->format->bpp / 8;
1586 1586
1587 sh_mobile_lcdc_overlay_setup(ovl); 1587 sh_mobile_lcdc_overlay_setup(ovl);
1588 1588
@@ -2024,9 +2024,9 @@ static int sh_mobile_lcdc_set_par(struct fb_info *info)
2024 ch->yres_virtual = info->var.yres_virtual; 2024 ch->yres_virtual = info->var.yres_virtual;
2025 2025
2026 if (ch->format->yuv) 2026 if (ch->format->yuv)
2027 ch->pitch = info->var.xres; 2027 ch->pitch = info->var.xres_virtual;
2028 else 2028 else
2029 ch->pitch = info->var.xres * ch->format->bpp / 8; 2029 ch->pitch = info->var.xres_virtual * ch->format->bpp / 8;
2030 2030
2031 ret = sh_mobile_lcdc_start(ch->lcdc); 2031 ret = sh_mobile_lcdc_start(ch->lcdc);
2032 if (ret < 0) 2032 if (ret < 0)
@@ -2539,9 +2539,9 @@ sh_mobile_lcdc_overlay_init(struct sh_mobile_lcdc_priv *priv,
2539 ovl->yres_virtual = ovl->yres * 2; 2539 ovl->yres_virtual = ovl->yres * 2;
2540 2540
2541 if (!format->yuv) 2541 if (!format->yuv)
2542 ovl->pitch = ovl->xres * format->bpp / 8; 2542 ovl->pitch = ovl->xres_virtual * format->bpp / 8;
2543 else 2543 else
2544 ovl->pitch = ovl->xres; 2544 ovl->pitch = ovl->xres_virtual;
2545 2545
2546 /* Allocate frame buffer memory. */ 2546 /* Allocate frame buffer memory. */
2547 ovl->fb_size = ovl->cfg->max_xres * ovl->cfg->max_yres 2547 ovl->fb_size = ovl->cfg->max_xres * ovl->cfg->max_yres
@@ -2628,10 +2628,10 @@ sh_mobile_lcdc_channel_init(struct sh_mobile_lcdc_priv *priv,
2628 2628
2629 if (!format->yuv) { 2629 if (!format->yuv) {
2630 ch->colorspace = V4L2_COLORSPACE_SRGB; 2630 ch->colorspace = V4L2_COLORSPACE_SRGB;
2631 ch->pitch = ch->xres * format->bpp / 8; 2631 ch->pitch = ch->xres_virtual * format->bpp / 8;
2632 } else { 2632 } else {
2633 ch->colorspace = V4L2_COLORSPACE_REC709; 2633 ch->colorspace = V4L2_COLORSPACE_REC709;
2634 ch->pitch = ch->xres; 2634 ch->pitch = ch->xres_virtual;
2635 } 2635 }
2636 2636
2637 ch->display.width = cfg->panel_cfg.width; 2637 ch->display.width = cfg->panel_cfg.width;