Graphic/Display: Fix the bug that CABC can not work in Lexington
authorljia5 <lin.a.jia@intel.com>
Wed, 25 Apr 2012 09:55:55 +0000 (17:55 +0800)
committerbuildbot <buildbot@intel.com>
Mon, 7 May 2012 09:24:30 +0000 (02:24 -0700)
BZ: 32384

Correct CABC control register setting when init dirver, and add the CABC
control setting in reset function which enable CABC function during
first boot.

Change-Id: I9e5300de5d5e6a8b62f468a2f52e917802dd546a
Signed-off-by: ljia5 <lin.a.jia@intel.com>
Reviewed-on: http://android.intel.com:8080/46026
Reviewed-by: Ai, Ke <ke.ai@intel.com>
Reviewed-by: Tong, BoX <box.tong@intel.com>
Tested-by: Tong, BoX <box.tong@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
drivers/staging/mrst/drv/gi_sony_vid.c

index 2c248cc..a220f79 100644 (file)
@@ -86,12 +86,11 @@ static u32 gi_l5f3_set_pgammactl[] = {0x06040cfa, 0x24211f1e, 0x2e2f2d21,
 static u32 gi_l5f3_set_ngammactl[] = {0x0f040cfb, 0x2d2f2e2e, 0x1f212421,
        0x0000061e, 0x00000000};
 static u32 gi_l5f3_set_miectl1[] = {0x108080c0};
-static u32 gi_l5f3_set_bcmode[] = {0x000011c1};
+static u32 gi_l5f3_set_bcmode[] = {0x000013c1};
 static u32 gi_l5f3_set_wrmiectl2[] = {0x000008c2, 0x0000df01, 0x00003f01};
 static u32 gi_l5f3_set_wrblctl[] = {0x201000c3};
 static u32 gi_l5f3_passwd1_off[] = {0x00a5a5f0};
 
-
 static u32 gi_l5f3_set_full_brightness[] = {0x0000ff51};
 static u32 gi_l5f3_turn_on_backlight[] = {0x00002453};
 static u32 gi_l5f3_disable_cabc[] = {0x00000055};
@@ -390,6 +389,8 @@ static int mdfld_dsi_gi_sony_panel_reset(struct mdfld_dsi_config *dsi_config,
        struct drm_device *dev;
        int ret = 0;
        static bool b_gpio_required[PSB_NUM_PIPE] = {0};
+       struct mdfld_dsi_pkg_sender *sender =
+               mdfld_dsi_get_pkg_sender(dsi_config);
        regs = &dsi_config->regs;
        ctx = &dsi_config->dsi_hw_context;
        dev = dsi_config->dev;
@@ -418,6 +419,20 @@ static int mdfld_dsi_gi_sony_panel_reset(struct mdfld_dsi_config *dsi_config,
                        PSB_DEBUG_ENTRY(
                                "FW has initialized the panel, skip reset during boot up\n.");
                        psb_enable_vblank(dev, dsi_config->pipe);
+
+                       mdfld_dsi_send_gen_long_hs(sender, gi_l5f3_passwd1_on, 4, 0);
+                       mdfld_dsi_send_gen_long_hs(sender, gi_l5f3_set_miectl1, 4, 0);
+                       mdfld_dsi_send_gen_long_hs(sender, gi_l5f3_set_bcmode, 4, 0);
+                       mdfld_dsi_send_gen_long_hs(sender, gi_l5f3_set_wrmiectl2, 4, 0);
+                       mdfld_dsi_send_gen_long_hs(sender, gi_l5f3_set_wrblctl, 4, 0);
+                       mdfld_dsi_send_gen_long_hs(sender, gi_l5f3_passwd1_off, 4, 0);
+                       mdfld_dsi_send_mcs_long_hs(sender, gi_sony_select_CABC_mode, 4, 0);
+                       mdfld_dsi_send_mcs_long_hs(sender, gi_sony_enable_CABC_bl_off, 4, 0);
+                       /*set display on*/
+                       mdfld_dsi_send_mcs_long_hs(sender, gi_sony_set_display_on, 4, 0);
+                       msleep(21);
+                       mdfld_dsi_send_mcs_long_hs(sender, gi_sony_enable_CABC_bl_on, 4, 0);
+
                        goto fun_exit;
                }
        }