Commit 0a31ed64 authored by Jani Nikula's avatar Jani Nikula

drm/i915/mst: add intel_dp_mst_disconnect()

Abstract the MST mode disconnect to a separate function.

Cc: Arun R Murthy <arun.r.murthy@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/c39239fb6bef87a89219c8fbe7799f97f91b9042.1710839496.git.jani.nikula@intel.comSigned-off-by: default avatarJani Nikula <jani.nikula@intel.com>
parent 2e9720e9
...@@ -4104,6 +4104,20 @@ intel_dp_mst_configure(struct intel_dp *intel_dp) ...@@ -4104,6 +4104,20 @@ intel_dp_mst_configure(struct intel_dp *intel_dp)
intel_dp->mst_detect = DRM_DP_SST; intel_dp->mst_detect = DRM_DP_SST;
} }
static void
intel_dp_mst_disconnect(struct intel_dp *intel_dp)
{
struct drm_i915_private *i915 = dp_to_i915(intel_dp);
if (!intel_dp->is_mst)
return;
drm_dbg_kms(&i915->drm, "MST device may have disappeared %d vs %d\n",
intel_dp->is_mst, intel_dp->mst_mgr.mst_state);
intel_dp->is_mst = false;
drm_dp_mst_topology_mgr_set_mst(&intel_dp->mst_mgr, intel_dp->is_mst);
}
static bool static bool
intel_dp_get_sink_irq_esi(struct intel_dp *intel_dp, u8 *esi) intel_dp_get_sink_irq_esi(struct intel_dp *intel_dp, u8 *esi)
{ {
...@@ -5779,15 +5793,7 @@ intel_dp_detect(struct drm_connector *connector, ...@@ -5779,15 +5793,7 @@ intel_dp_detect(struct drm_connector *connector,
memset(intel_connector->dp.dsc_dpcd, 0, sizeof(intel_connector->dp.dsc_dpcd)); memset(intel_connector->dp.dsc_dpcd, 0, sizeof(intel_connector->dp.dsc_dpcd));
intel_dp->psr.sink_panel_replay_support = false; intel_dp->psr.sink_panel_replay_support = false;
if (intel_dp->is_mst) { intel_dp_mst_disconnect(intel_dp);
drm_dbg_kms(&dev_priv->drm,
"MST device may have disappeared %d vs %d\n",
intel_dp->is_mst,
intel_dp->mst_mgr.mst_state);
intel_dp->is_mst = false;
drm_dp_mst_topology_mgr_set_mst(&intel_dp->mst_mgr,
intel_dp->is_mst);
}
intel_dp_tunnel_disconnect(intel_dp); intel_dp_tunnel_disconnect(intel_dp);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment