GFX-Display: Enable CABC from boot
authorAnand Bodas <anand.v.bodas@intel.com>
Tue, 27 Mar 2012 16:51:53 +0000 (22:21 +0530)
committerbuildbot <buildbot@intel.com>
Wed, 11 Apr 2012 01:05:30 +0000 (18:05 -0700)
BZ: 29291

CABC was being enabled in power_up code which was not called
during boot, as the display was already initialized by FW.
Added code to enable CABC without power cycling display.
Changed to send bytes instead of words due to BZ 28302.

Change-Id: I3e8f529fb9b296a9c7563eb618fb192b0ffa9411
Signed-off-by: Anand Bodas <anand.v.bodas@intel.com>
Reviewed-on: http://android.intel.com:8080/40975
Reviewed-by: Ai, Ke <ke.ai@intel.com>
Reviewed-by: Hu, Austin <austin.hu@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/tmd_6x10_vid.c

index 8ece8e6..5a350ef 100755 (executable)
@@ -421,6 +421,8 @@ static int mdfld_dsi_pr2_panel_reset(struct mdfld_dsi_config *dsi_config,
        int ret = 0;
        static bool b_gpio_required[PSB_NUM_PIPE] = {0};
        unsigned gpio_mipi_panel_reset = 128;
+       struct mdfld_dsi_pkg_sender *sender =
+               mdfld_dsi_get_pkg_sender(dsi_config);
 
        regs = &dsi_config->regs;
        ctx = &dsi_config->dsi_hw_context;
@@ -455,6 +457,17 @@ static int mdfld_dsi_pr2_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);
+
+                       /* enable BLC */
+                       mdfld_dsi_send_gen_long_hs(sender,
+                                               pr2_mcs_protect_off, 4, 0);
+                       mdfld_dsi_send_gen_long_hs(sender,
+                                               pr2_panel_driving, 8, 0);
+                       mdfld_dsi_send_gen_long_hs(sender,
+                                               pr2_backlight_control_1, 24, 0);
+                       mdfld_dsi_send_gen_long_hs(sender,
+                                               pr2_mcs_protect_on, 4, 0);
+
                        goto fun_exit;
                }
        }