]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/i915/dp: Check SST link status while handling link service IRQs
authorImre Deak <imre.deak@intel.com>
Wed, 25 Feb 2026 16:46:15 +0000 (18:46 +0200)
committerImre Deak <imre.deak@intel.com>
Tue, 3 Mar 2026 15:49:09 +0000 (17:49 +0200)
Move checking the link status for SST to
intel_dp_handle_link_service_irq(). This is the logical place for the
check which should only happen in response to a LINK_STATUS_CHANGE sink
IRQ. This IRQ is only supported by DPCD revision >= 1.2, so for sinks
with an older DPCD revision the link status is checked in response to
any HPD IRQ. For newer DPCD revisions however the link status check can
be made conditional on LINK_STATUS_CHANGE.

For now keep the current behavior of always forcing a link status check
regardless of LINK_STATUS_CHANGE being set or not.

This also prepares for a follow-up change sharing the link service IRQ
handler for SST and MST (on MST the link status check only happening in
response to a LINK_STATUS_CHANGE IRQ).

Reviewed-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patch.msgid.link/20260225164618.1261368-18-imre.deak@intel.com
drivers/gpu/drm/i915/display/intel_dp.c

index bd6c5eb5786c78239e999246ac58b3f550643bcb..9a75f4a9b339b4bfa474658978cd4600f7ef43b2 100644 (file)
@@ -5884,6 +5884,9 @@ static bool intel_dp_handle_link_service_irq(struct intel_dp *intel_dp, u8 irq_m
        if (irq_mask & RX_CAP_CHANGED)
                reprobe_needed = true;
 
+       if (irq_mask & LINK_STATUS_CHANGED)
+               intel_dp_check_link_state(intel_dp);
+
        if (irq_mask & HDMI_LINK_STATUS_CHANGED)
                intel_dp_handle_hdmi_link_status_change(intel_dp);
 
@@ -5937,14 +5940,18 @@ intel_dp_short_pulse(struct intel_dp *intel_dp)
 
        intel_dp_handle_device_service_irq(intel_dp, esi[1]);
 
+       /*
+        * Force checking the link status for DPCD_REV < 1.2
+        * TODO: let the link status check depend on LINK_STATUS_CHANGED
+        * for DPCD_REV >= 1.2
+        */
+       esi[3] |= LINK_STATUS_CHANGED;
        if (intel_dp_handle_link_service_irq(intel_dp, esi[3]))
                reprobe_needed = true;
 
        /* Handle CEC interrupts, if any */
        drm_dp_cec_irq(&intel_dp->aux);
 
-       intel_dp_check_link_state(intel_dp);
-
        if (READ_ONCE(intel_dp->downstream_port_changed)) {
                WRITE_ONCE(intel_dp->downstream_port_changed, false);
                reprobe_needed = true;