From: Gareth Yu <gareth...@intel.com>

Re-train the main link for the main link lost in MST. The previous
version doesn't cover MST mode.

v5: Move link status check to the location which covers MST mode
v6: Correct Tejas' email address in cc

Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/10902
Cc: Tejas Upadhyay <tejas.upadh...@intel.com>
Cc: Matt Roper <matthew.d.ro...@intel.com>
Cc: Ville Syrjälä <ville.syrj...@linux.intel.com>
Signed-off-by: Gareth Yu <gareth...@intel.com>
---
 drivers/gpu/drm/i915/display/intel_dp.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_dp.c 
b/drivers/gpu/drm/i915/display/intel_dp.c
index e05e25cd4a94..8043740b4233 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -5891,16 +5891,6 @@ intel_dp_detect(struct drm_connector *connector,
 
        intel_dp_print_rates(intel_dp);
 
-       if (intel_dp->is_mst) {
-               /*
-                * If we are in MST mode then this connector
-                * won't appear connected or have anything
-                * with EDID on it
-                */
-               status = connector_status_disconnected;
-               goto out;
-       }
-
        /*
         * Some external monitors do not signal loss of link synchronization
         * with an IRQ_HPD, so force a link status check.
@@ -5911,6 +5901,16 @@ intel_dp_detect(struct drm_connector *connector,
                        return ret;
        }
 
+       if (intel_dp->is_mst) {
+               /*
+                * If we are in MST mode then this connector
+                * won't appear connected or have anything
+                * with EDID on it
+                */
+               status = connector_status_disconnected;
+               goto out;
+       }
+
        /*
         * Clearing NACK and defer counts to get their exact values
         * while reading EDID which are required by Compliance tests
-- 
2.25.1

Reply via email to