path: root/drivers/gpu/drm/msm/dsi/dsi_manager.c
diff options
authorArchit Taneja <>2015-08-03 14:08:33 +0530
committerRob Clark <>2015-08-15 18:27:25 -0400
commit6f054ec5b9ced3041f29541ae79402198678fc06 (patch)
tree37a06232ced891f48d3cbf8a87b04bed102d997c /drivers/gpu/drm/msm/dsi/dsi_manager.c
parenta9ddac9c5765712fa7eace55feeaf7c4ac75e32b (diff)
drm/msm/dsi: Create a helper to check if there is a connected device
Create a helper msm_dsi_device_connected() which checks whether we have a device connected to the dsi host or not. This check gets messy when we have support external bridges too. Having an inline function makes it more legible. For now, the check only consists of msm_dsi->panel being non-NULL. Later, this will check if we have an external bridge or not. This helper isn't used in dsi_connector related code as that's specific to only when a drm_panel is connected. Signed-off-by: Archit Taneja <> Signed-off-by: Rob Clark <>
Diffstat (limited to 'drivers/gpu/drm/msm/dsi/dsi_manager.c')
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/drm/msm/dsi/dsi_manager.c b/drivers/gpu/drm/msm/dsi/dsi_manager.c
index f43c66ca81fb..60dbd829d7a9 100644
--- a/drivers/gpu/drm/msm/dsi/dsi_manager.c
+++ b/drivers/gpu/drm/msm/dsi/dsi_manager.c
@@ -344,7 +344,8 @@ static void dsi_mgr_bridge_pre_enable(struct drm_bridge *bridge)
int ret;
DBG("id=%d", id);
- if (!panel || (is_dual_dsi && (DSI_1 == id)))
+ if (!msm_dsi_device_connected(msm_dsi) ||
+ (is_dual_dsi && (DSI_1 == id)))
ret = msm_dsi_host_power_on(host);
@@ -431,7 +432,8 @@ static void dsi_mgr_bridge_post_disable(struct drm_bridge *bridge)
DBG("id=%d", id);
- if (!panel || (is_dual_dsi && (DSI_1 == id)))
+ if (!msm_dsi_device_connected(msm_dsi) ||
+ (is_dual_dsi && (DSI_1 == id)))
ret = drm_panel_disable(panel);