@@ -169,7 +169,6 @@ int msm_dsi_phy_enable(struct msm_dsi_phy *phy,
void msm_dsi_phy_disable(struct msm_dsi_phy *phy);
void msm_dsi_phy_set_usecase(struct msm_dsi_phy *phy,
enum msm_dsi_phy_usecase uc);
-void msm_dsi_phy_pll_save_state(struct msm_dsi_phy *phy);
void msm_dsi_phy_snapshot(struct msm_disp_state *disp_state, struct msm_dsi_phy *phy);
#endif /* __DSI_CONNECTOR_H__ */
@@ -524,9 +524,6 @@ static void dsi_mgr_bridge_post_disable(struct drm_bridge *bridge)
id, ret);
}
- /* Save PHY status if it is a clock source */
- msm_dsi_phy_pll_save_state(msm_dsi->phy);
-
ret = msm_dsi_host_power_off(host);
if (ret)
pr_err("%s: host %d power off failed,%d\n", __func__, id, ret);
@@ -559,6 +559,14 @@ static void dsi_phy_disable_resource(struct msm_dsi_phy *phy)
pm_runtime_put_autosuspend(&phy->pdev->dev);
}
+static void msm_dsi_phy_pll_save_state(struct msm_dsi_phy *phy)
+{
+ if (phy->cfg->ops.save_pll_state) {
+ phy->cfg->ops.save_pll_state(phy);
+ phy->state_saved = true;
+ }
+}
+
static int msm_dsi_phy_pll_restore_state(struct msm_dsi_phy *phy)
{
int ret;
@@ -845,6 +853,10 @@ int msm_dsi_phy_enable(struct msm_dsi_phy *phy,
void msm_dsi_phy_disable(struct msm_dsi_phy *phy)
{
+ /* Save PHY status if it is a clock source */
+ if (phy->usecase != MSM_DSI_PHY_SLAVE)
+ msm_dsi_phy_pll_save_state(phy);
+
if (!phy || !phy->cfg->ops.disable)
return;
@@ -860,15 +872,6 @@ void msm_dsi_phy_set_usecase(struct msm_dsi_phy *phy,
if (phy)
phy->usecase = uc;
}
-
-void msm_dsi_phy_pll_save_state(struct msm_dsi_phy *phy)
-{
- if (phy->cfg->ops.save_pll_state) {
- phy->cfg->ops.save_pll_state(phy);
- phy->state_saved = true;
- }
-}
-
void msm_dsi_phy_snapshot(struct msm_disp_state *disp_state, struct msm_dsi_phy *phy)
{
msm_disp_snapshot_add_block(disp_state,
Move DSI PHY state saving from dsi manager to dsi_phy driver. This way the manager does not need to know that the DSI state is not preserved acrosss resets. Everything is handled by the DSI PHY driver. Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> --- drivers/gpu/drm/msm/dsi/dsi.h | 1 - drivers/gpu/drm/msm/dsi/dsi_manager.c | 3 --- drivers/gpu/drm/msm/dsi/phy/dsi_phy.c | 21 ++++++++++++--------- 3 files changed, 12 insertions(+), 13 deletions(-) -- 2.30.2