]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
drm/i915/dp: Use check link state work in the HPD IRQ handler
authorImre Deak <imre.deak@intel.com>
Mon, 10 Jun 2024 16:49:25 +0000 (19:49 +0300)
committerImre Deak <imre.deak@intel.com>
Thu, 13 Jun 2024 18:26:49 +0000 (21:26 +0300)
Simplify things by retraining a DP link if a bad link is detected in the
HPD IRQ handler from the encoder's check link state work, similarly to
how this is done after a modeset link training failure.

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240610164933.2947366-14-imre.deak@intel.com
drivers/gpu/drm/i915/display/intel_dp.c

index 06ebf3267038950cca997c21c65ff6ec593aa57b..a6204e469b3fee40f016606b80b64db1ce15940a 100644 (file)
@@ -4974,6 +4974,8 @@ static bool
 intel_dp_check_mst_status(struct intel_dp *intel_dp)
 {
        struct drm_i915_private *i915 = dp_to_i915(intel_dp);
+       struct intel_digital_port *dig_port = dp_to_dig_port(intel_dp);
+       struct intel_encoder *encoder = &dig_port->base;
        bool link_ok = true;
        bool reprobe_needed = false;
 
@@ -5019,7 +5021,10 @@ intel_dp_check_mst_status(struct intel_dp *intel_dp)
                        drm_dp_mst_hpd_irq_send_new_request(&intel_dp->mst_mgr);
        }
 
-       return link_ok && !reprobe_needed;
+       if (!link_ok)
+               intel_encoder_link_check_queue_work(encoder, 0);
+
+       return !reprobe_needed;
 }
 
 static void
@@ -5495,9 +5500,7 @@ intel_dp_short_pulse(struct intel_dp *intel_dp)
        /* Handle CEC interrupts, if any */
        drm_dp_cec_irq(&intel_dp->aux);
 
-       /* defer to the hotplug work for link retraining if needed */
-       if (intel_dp_needs_link_retrain(intel_dp))
-               return false;
+       intel_dp_check_link_state(intel_dp);
 
        intel_psr_short_pulse(intel_dp);