MLK-11608 video: mxsfb: add parameter equal bypass count
authorFancy Fang <chen.fang@freescale.com>
Wed, 23 Sep 2015 08:49:12 +0000 (16:49 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 19:48:38 +0000 (14:48 -0500)
This parameter bypass count is used to make sure the mipi
dsi be initialized correctly without any display error.
In the mipi dsi initialization, it requires the first
two parameter setting operations should be done really.

Signed-off-by: Fancy Fang <chen.fang@freescale.com>
(cherry picked from commit 969122c2f4363dee4cf489b87984c4d85dcd89ce)

Conflicts:
drivers/video/mxsfb.c

drivers/video/fbdev/mxsfb.c

index 6f36172..7e0e445 100644 (file)
@@ -646,10 +646,14 @@ static int mxsfb_set_par(struct fb_info *fb_info)
        u32 ctrl, vdctrl0, vdctrl4;
        int line_size, fb_size;
        int reenable = 0;
+       static u32 equal_bypass = 0;
 
-       /* If parameter no change, don't reconfigure. */
-       if (mxsfb_par_equal(fb_info, host))
-               return 0;
+       if (likely(equal_bypass > 1)) {
+               /* If parameter no change, don't reconfigure. */
+               if (mxsfb_par_equal(fb_info, host))
+                       return 0;
+       } else
+               equal_bypass++;
 
        dev_dbg(&host->pdev->dev, "%s\n", __func__);