disp: msm: dsi: Handle GDSC PM in pre/post clk on/off

Currently, power_state variable does not reflect the GDSC
status. Due to this, there are scenarios where ctrl_power_on
is not happening leading to clock failures. This change
updates power_state based on current status of all the
regulators. GDSC enable is moved to pre_clkon and GDSC
disable is moved to post_clkoff.

Change-Id: I6d9508d5dffda0c94bd3b3bd9b5feb4724dc9dc7
Signed-off-by: Ritesh Kumar <riteshk@codeaurora.org>
[cohens@codeaurora.org: fixed static analysis error]
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
This commit is contained in:
Ritesh Kumar
2020-04-01 15:34:29 +05:30
committed by Steve Cohen
parent 6d59f959d3
commit 755686a110
3 changed files with 20 additions and 24 deletions

View File

@@ -3767,8 +3767,7 @@ int dsi_pre_clkon_cb(void *priv,
* Enable DSI core power
* 1.> PANEL_PM are controlled as part of
* panel_power_ctrl. Needed not be handled here.
* 2.> CORE_PM are controlled by dsi clk manager.
* 3.> CTRL_PM need to be enabled/disabled
* 2.> CTRL_PM need to be enabled/disabled
* only during unblank/blank. Their state should
* not be changed during static screen.
*/
@@ -5524,10 +5523,10 @@ static int dsi_display_bind(struct device *dev,
display_for_each_ctrl(i, display) {
display_ctrl = &display->ctrl[i];
if (!display_ctrl->phy || !display_ctrl->ctrl)
continue;
display_ctrl->ctrl->drm_dev = drm;
rc = dsi_phy_set_clk_freq(display_ctrl->phy,
&display_ctrl->ctrl->clk_freq);
if (rc) {