From: Liu Ying Date: Thu, 12 May 2011 12:18:25 +0000 (+0800) Subject: ENGR00143309 IPUv3fb:Set default yres_virtual to be 3*yres X-Git-Tag: v3.0.35-fsl~2340 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=a07cb820eb30a52400891de175b784eefd00da3a;p=karo-tx-linux.git 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 (cherry picked from commit 99a218e876a3a4831ec121fdff0e2b4e39408eda) --- 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 */