From 55046f2f468f404d762ceacd088973b4de9f2a46 Mon Sep 17 00:00:00 2001 From: Fancy Fang Date: Wed, 23 Sep 2015 16:49:12 +0800 Subject: [PATCH] MLK-11608 video: mxsfb: add parameter equal bypass count 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 (cherry picked from commit 969122c2f4363dee4cf489b87984c4d85dcd89ce) Conflicts: drivers/video/mxsfb.c --- drivers/video/fbdev/mxsfb.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/video/fbdev/mxsfb.c b/drivers/video/fbdev/mxsfb.c index 6f361725ca43..7e0e44530c47 100644 --- a/drivers/video/fbdev/mxsfb.c +++ b/drivers/video/fbdev/mxsfb.c @@ -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__); -- 2.17.1