Skip to content

Commit

Permalink
drm/msm/dsi: save pll state before dsi host is powered off
Browse files Browse the repository at this point in the history
Save pll state before dsi host is powered off. Without this change
some register values gets resetted.

Signed-off-by: Harigovindan P <harigovi@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@chromium.org>
  • Loading branch information
Harigovindan P authored and Rob Clark committed Feb 13, 2020
1 parent 9cc68ee commit a1028dc
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 5 additions & 0 deletions drivers/gpu/drm/msm/dsi/dsi_manager.c
Original file line number Diff line number Diff line change
@@ -506,6 +506,7 @@ static void dsi_mgr_bridge_post_disable(struct drm_bridge *bridge)
struct msm_dsi *msm_dsi1 = dsi_mgr_get_dsi(DSI_1);
struct mipi_dsi_host *host = msm_dsi->host;
struct drm_panel *panel = msm_dsi->panel;
struct msm_dsi_pll *src_pll;
bool is_dual_dsi = IS_DUAL_DSI();
int ret;

@@ -539,6 +540,10 @@ static void dsi_mgr_bridge_post_disable(struct drm_bridge *bridge)
id, ret);
}

/* Save PLL status if it is a clock source */
src_pll = msm_dsi_phy_get_pll(msm_dsi->phy);
msm_dsi_pll_save_state(src_pll);

ret = msm_dsi_host_power_off(host);
if (ret)
pr_err("%s: host %d power off failed,%d\n", __func__, id, ret);
4 changes: 0 additions & 4 deletions drivers/gpu/drm/msm/dsi/phy/dsi_phy.c
Original file line number Diff line number Diff line change
@@ -724,10 +724,6 @@ void msm_dsi_phy_disable(struct msm_dsi_phy *phy)
if (!phy || !phy->cfg->ops.disable)
return;

/* Save PLL status if it is a clock source */
if (phy->usecase != MSM_DSI_PHY_SLAVE)
msm_dsi_pll_save_state(phy->pll);

phy->cfg->ops.disable(phy);

dsi_phy_regulator_disable(phy);

0 comments on commit a1028dc

Please sign in to comment.