lkml.org 
[lkml]   [2023]   [Oct]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[RFC PATCH 04/10] drm/msm/dsi: use dsi_mgr_bridge_power_off in dsi_mgr_bridge_post_disable
Date
Simplify dsi_mgr_bridge_post_disable() by using
dsi_mgr_bridge_power_off() instead of hand-coding the same call
sequence.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
drivers/gpu/drm/msm/dsi/dsi_manager.c | 24 +++++-------------------
1 file changed, 5 insertions(+), 19 deletions(-)

diff --git a/drivers/gpu/drm/msm/dsi/dsi_manager.c b/drivers/gpu/drm/msm/dsi/dsi_manager.c
index 896f369fdd53..9fa1f29ec11a 100644
--- a/drivers/gpu/drm/msm/dsi/dsi_manager.c
+++ b/drivers/gpu/drm/msm/dsi/dsi_manager.c
@@ -372,8 +372,10 @@ static void dsi_mgr_bridge_post_disable(struct drm_bridge *bridge)
* It is safe to call dsi_mgr_phy_disable() here because a single PHY
* won't be diabled until both PHYs request disable.
*/
- if (is_bonded_dsi && !IS_MASTER_DSI_LINK(id))
- goto disable_phy;
+ if (is_bonded_dsi && !IS_MASTER_DSI_LINK(id)) {
+ dsi_mgr_phy_disable(id);
+ return;
+ }

ret = msm_dsi_host_disable(host);
if (ret)
@@ -385,26 +387,10 @@ static void dsi_mgr_bridge_post_disable(struct drm_bridge *bridge)
pr_err("%s: host1 disable failed, %d\n", __func__, ret);
}

- msm_dsi_host_disable_irq(host);
- if (is_bonded_dsi && msm_dsi1)
- msm_dsi_host_disable_irq(msm_dsi1->host);
-
/* 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);
-
- if (is_bonded_dsi && msm_dsi1) {
- ret = msm_dsi_host_power_off(msm_dsi1->host);
- if (ret)
- pr_err("%s: host1 power off failed, %d\n",
- __func__, ret);
- }
-
-disable_phy:
- dsi_mgr_phy_disable(id);
+ dsi_mgr_bridge_power_off(bridge);
}

static void dsi_mgr_bridge_mode_set(struct drm_bridge *bridge,
--
2.42.0
\
 
 \ /
  Last update: 2023-10-16 18:58    [W:0.235 / U:0.856 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site