msm: mdss: Fix the issue of recovery from DCM state

In the QDCM tool, toggling from DCM state to DTM state fails
because system unblank doesn't happen successfully. The root
cause of the issue is at the DCM_BLANK, the overlay_off is called
before setting the panel_power_state to OFF, due to which
overlay_off doesn't suspend properly. Therefore, rearrange the
order to fix the problem.

Change-Id: I130fe711dc0d679d8205d22a9027d1c179ed49d5
Signed-off-by: Zohaib Alam <zalam@codeaurora.org>
This commit is contained in:
Zohaib Alam 2014-09-10 11:44:08 -04:00 committed by David Keitel
parent d0966f5885
commit 30a0116076

View file

@ -2878,11 +2878,12 @@ int mdss_fb_dcm(struct msm_fb_data_type *mfd, int req_state)
if ((mfd->dcm_state == DCM_EXIT ||
mfd->dcm_state == DCM_UNBLANK) &&
mdss_fb_is_power_on(mfd) && mfd->mdp.off_fnc) {
mfd->panel_power_state = MDSS_PANEL_POWER_OFF;
ret = mfd->mdp.off_fnc(mfd);
if (ret == 0) {
mfd->panel_power_state = MDSS_PANEL_POWER_OFF;
if (ret == 0)
mfd->dcm_state = DCM_UNINIT;
}
else
pr_err("DCM_BLANK failed\n");
}
break;
case DTM_ENTER: