summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorSean Paul <seanpaul@chromium.org>2019-06-17 16:12:57 -0400
committerSean Paul <seanpaul@chromium.org>2019-06-20 14:42:17 -0400
commit6d5e78406991a144b7c44cd57b21e290fdb1d227 (patch)
treeb00b0544ce5f2f5386edecb2d61740bdd16e767a /drivers
parent970524b07a9c1d0434266a0f32825631bc206848 (diff)
drm/msm/dsi: Move dsi panel init into modeset init path
Since deferred probe from the modeset init path now works, we can move the panel initialization from detect() into connector init. This avoids doing work in detect() and hopefully will result in a more deterministic boot sequence between devices with a dsi panel, and those with an external bridge. Reviewed-by: Rob Clark <robdclark@chromium.org> Signed-off-by: Sean Paul <seanpaul@chromium.org> Link: https://patchwork.freedesktop.org/patch/msgid/20190617201301.133275-9-sean@poorly.run
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/msm/dsi/dsi_manager.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/drivers/gpu/drm/msm/dsi/dsi_manager.c b/drivers/gpu/drm/msm/dsi/dsi_manager.c
index a48a54005f50..630af00bbe9a 100644
--- a/drivers/gpu/drm/msm/dsi/dsi_manager.c
+++ b/drivers/gpu/drm/msm/dsi/dsi_manager.c
@@ -312,13 +312,6 @@ static enum drm_connector_status dsi_mgr_connector_detect(
int id = dsi_mgr_connector_get_id(connector);
struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id);
- DBG("id=%d", id);
- if (!msm_dsi->panel) {
- int ret = msm_dsi_manager_panel_init(connector, id);
- if (ret)
- return connector_status_disconnected;
- }
-
return msm_dsi->panel ? connector_status_connected :
connector_status_disconnected;
}
@@ -631,7 +624,17 @@ struct drm_connector *msm_dsi_manager_connector_init(u8 id)
drm_connector_attach_encoder(connector, msm_dsi->encoder);
+ ret = msm_dsi_manager_panel_init(connector, id);
+ if (ret) {
+ DRM_DEV_ERROR(msm_dsi->dev->dev, "init panel failed %d\n", ret);
+ goto fail;
+ }
+
return connector;
+
+fail:
+ connector->funcs->destroy(msm_dsi->connector);
+ return ERR_PTR(ret);
}
bool msm_dsi_manager_validate_current_config(u8 id)