]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ENGR00143309 IPUv3fb:Set default yres_virtual to be 3*yres
authorLiu Ying <Ying.Liu@freescale.com>
Thu, 12 May 2011 12:18:25 +0000 (20:18 +0800)
committerLothar Waßmann <LW@KARO-electronics.de>
Fri, 24 May 2013 06:32:53 +0000 (08:32 +0200)
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)

drivers/video/mxc/mxc_ipuv3_fb.c

index 1107bea05e7f64a4c2d4351848ba1b6417d86bc5..b3bf655f6f04fdfa1b399a6452e9fb2d176a9fed 100644 (file)
@@ -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 */