msm: mdss: fix back light issue in recovery

When continuous splash is enabled backlight is
turned on in lk itself. But the pwm_enable variable
is not set till first backlight update in kernel.
In recovery case blank is called even before
backlight update. Since the bwm_enable variable is
not set backlight disable is skipped keeping the
backlight on.

Change-Id: I73c02d8250596e7b6addec4ffc54655bbc8cb53c
Signed-off-by: Ramakant Singh <ramaka@codeaurora.org>
This commit is contained in:
Ramakant Singh 2015-02-17 16:42:36 +05:30 committed by David Keitel
parent c5aedfabd2
commit 7060dbc3e1
2 changed files with 11 additions and 1 deletions

View file

@ -1158,6 +1158,9 @@ static void mdp3_ctrl_pan_display(struct msm_fb_data_type *mfd)
u32 offset; u32 offset;
int bpp; int bpp;
struct mdss_panel_info *panel_info; struct mdss_panel_info *panel_info;
static bool splash_done;
struct mdss_panel_data *panel;
int rc; int rc;
pr_debug("mdp3_ctrl_pan_display\n"); pr_debug("mdp3_ctrl_pan_display\n");
@ -1232,6 +1235,12 @@ static void mdp3_ctrl_pan_display(struct msm_fb_data_type *mfd)
} }
mdp3_session->vsync_before_commit = 0; mdp3_session->vsync_before_commit = 0;
panel = mdp3_session->panel;
if (!splash_done && (panel && panel->set_backlight)) {
panel->set_backlight(panel, panel->panel_info.bl_max);
splash_done = true;
}
pan_error: pan_error:
mutex_unlock(&mdp3_session->lock); mutex_unlock(&mdp3_session->lock);

View file

@ -2130,7 +2130,8 @@ int dsi_panel_device_register(struct device_node *pan_node,
pr_err("%s: Panel power on failed\n", __func__); pr_err("%s: Panel power on failed\n", __func__);
return rc; return rc;
} }
if (ctrl_pdata->bklt_ctrl == BL_PWM)
ctrl_pdata->pwm_enabled = 1;
pinfo->blank_state = MDSS_PANEL_BLANK_UNBLANK; pinfo->blank_state = MDSS_PANEL_BLANK_UNBLANK;
mdss_dsi_clk_ctrl(ctrl_pdata, DSI_ALL_CLKS, 1); mdss_dsi_clk_ctrl(ctrl_pdata, DSI_ALL_CLKS, 1);
ctrl_pdata->ctrl_state |= ctrl_pdata->ctrl_state |=