diff options
author | Sean Paul <seanpaul@chromium.org> | 2019-06-17 16:12:54 -0400 |
---|---|---|
committer | Sean Paul <seanpaul@chromium.org> | 2019-06-20 14:42:11 -0400 |
commit | 4f229b41386fbf290505411964c8ed25f48e1656 (patch) | |
tree | 7fe5114e5bf24883784b27aab2e2090e588f35e5 | |
parent | 09951aaa7229b253b0e00979d6c6d17b20e16fe4 (diff) | |
download | linux-4f229b41386fbf290505411964c8ed25f48e1656.tar.bz2 |
drm/msm/dsi: Pull out panel init code into function
Pull all of the panel init code out of detect() and put it in its own
function. This will be useful in future patches where it's moved from
detect().
Reviewed-by: Rob Clark <robdclark@chromium.org>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20190617201301.133275-6-sean@poorly.run
-rw-r--r-- | drivers/gpu/drm/msm/dsi/dsi_manager.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/drivers/gpu/drm/msm/dsi/dsi_manager.c b/drivers/gpu/drm/msm/dsi/dsi_manager.c index ffc095504594..4be0240c2d9d 100644 --- a/drivers/gpu/drm/msm/dsi/dsi_manager.c +++ b/drivers/gpu/drm/msm/dsi/dsi_manager.c @@ -239,17 +239,14 @@ static bool dsi_mgr_is_cmd_mode(struct msm_dsi *msm_dsi) return !(host_flags & MIPI_DSI_MODE_VIDEO); } -static enum drm_connector_status dsi_mgr_connector_detect( - struct drm_connector *connector, bool force) +static void msm_dsi_manager_panel_init(struct drm_connector *connector, u8 id) { - int id = dsi_mgr_connector_get_id(connector); struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id); struct msm_dsi *other_dsi = dsi_mgr_get_other_dsi(id); struct msm_drm_private *priv = connector->dev->dev_private; struct msm_kms *kms = priv->kms; bool cmd_mode; - DBG("id=%d", id); if (!msm_dsi->panel) { msm_dsi->panel = msm_dsi_host_get_panel(msm_dsi->host); @@ -292,6 +289,17 @@ static enum drm_connector_status dsi_mgr_connector_detect( pr_err("mdp does not support dual DSI\n"); } } +} + +static enum drm_connector_status dsi_mgr_connector_detect( + struct drm_connector *connector, bool force) +{ + 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) + msm_dsi_manager_panel_init(connector, id); return msm_dsi->panel ? connector_status_connected : connector_status_disconnected; |