aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLiu Ying <Ying.Liu@freescale.com>2011-05-12 20:18:25 +0800
committerEric Miao <eric.miao@linaro.org>2011-08-16 12:37:01 +0800
commit0c324db3280c96915a336ad8f7d79c4cd4c56d80 (patch)
tree5b8d03468889c10030741a198878d327333cc1a8
parent596fbdaaf4173eab3a19b5cae821747861465490 (diff)
ENGR00143309 ipuv3fb: Set default yres_virtual to be 3*yres
This patch sets framebuffer yres_virtual to be 3*yres defaultly. Before this patch is applied, the yres_virtual will be changed to yres when hdmi cable is hot plugged out and in, which reduces yres_virtual to yres and pan display mechanism cannot work well. Signed-off-by: Liu Ying <b17645@freescale.com> (cherry picked from commit 99a218e876a3a4831ec121fdff0e2b4e39408eda) Signed-off-by: Richard Zhao <richard.zhao@freescale.com> Signed-off-by: Eric Miao <eric.miao@linaro.org>
-rw-r--r--drivers/video/mxc/mxc_ipuv3_fb.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/video/mxc/mxc_ipuv3_fb.c b/drivers/video/mxc/mxc_ipuv3_fb.c
index 1107bea05e7f..b3bf655f6f04 100644
--- a/drivers/video/mxc/mxc_ipuv3_fb.c
+++ b/drivers/video/mxc/mxc_ipuv3_fb.c
@@ -678,8 +678,10 @@ static int mxcfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
if (var->xres_virtual < var->xres)
var->xres_virtual = var->xres;
- if (var->yres_virtual < var->yres)
- var->yres_virtual = var->yres;
+
+ /* Default Y virtual size is 3*yres */
+ if (var->yres_virtual < var->yres * 3)
+ var->yres_virtual = var->yres * 3;
if ((var->bits_per_pixel != 32) && (var->bits_per_pixel != 24) &&
(var->bits_per_pixel != 16) && (var->bits_per_pixel != 12) &&
@@ -1802,9 +1804,6 @@ static int mxcfb_setup(struct fb_info *fbi, struct platform_device *pdev)
mxcfb_check_var(&fbi->var, fbi);
- /* Default Y virtual size is 3x panel size */
- fbi->var.yres_virtual = fbi->var.yres * 3;
-
mxcfb_set_fix(fbi);
/* setup display */