[SRU][R][PATCH 16/22] drm/i915/dp: Return early if getting/ackink link service IRQs fails

Werner Sembach wse at tuxedocomputers.com
Tue Aug 4 22:18:42 UTC 2026


From: Imre Deak <imre.deak at intel.com>

If getting/acking the link service IRQs fail, the short HPD handler
should bail out, falling back to a full connector detection as in case
of any AUX access failures during the HPD handling. Do this by
separating the getting/acking and handling steps of the IRQs.

Reviewed-by: Luca Coelho <luciano.coelho at intel.com>
Signed-off-by: Imre Deak <imre.deak at intel.com>
Link: https://patch.msgid.link/20260225164618.1261368-15-imre.deak@intel.com
Signed-off-by: Werner Sembach <wse at tuxedocomputers.com>
---
 drivers/gpu/drm/i915/display/intel_dp.c | 45 ++++++++++++++++---------
 1 file changed, 29 insertions(+), 16 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index af9039bcb3631..7728e5fe16473 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -5703,38 +5703,48 @@ static void intel_dp_handle_device_service_irq(struct intel_dp *intel_dp, u8 irq
 		drm_dbg_kms(display->drm, "Sink specific irq unhandled\n");
 }
 
-/*
- * Return %true if a full connector reprobe is required due to a failure while
- * reading or acking the link service IRQs or if the reprobing is required
- * after handling a link service IRQ event.
- */
-static bool intel_dp_check_link_service_irq(struct intel_dp *intel_dp)
+/* Return %true if reading and acking the link service IRQs succeeded. */
+static bool intel_dp_get_and_ack_link_service_irq(struct intel_dp *intel_dp, u8 *irq_mask)
 {
-	struct intel_display *display = to_intel_display(intel_dp);
-	bool reprobe_needed = false;
 	u8 val;
 
+	*irq_mask = 0;
+
 	if (intel_dp->dpcd[DP_DPCD_REV] < DP_DPCD_REV_12)
-		return false;
+		return true;
 
 	if (drm_dp_dpcd_readb(&intel_dp->aux,
 			      DP_LINK_SERVICE_IRQ_VECTOR_ESI0, &val) != 1)
-		return true;
+		return false;
 
 	if (!val)
-		return false;
+		return true;
 
 	if (drm_dp_dpcd_writeb(&intel_dp->aux,
 			       DP_LINK_SERVICE_IRQ_VECTOR_ESI0, val) != 1)
-		return true;
+		return false;
+
+	*irq_mask = val;
+
+	return true;
+}
+
+/*
+ * Return %true if a full connector reprobe is required after handling a link
+ * service IRQ event.
+ */
+static bool intel_dp_handle_link_service_irq(struct intel_dp *intel_dp, u8 irq_mask)
+{
+	struct intel_display *display = to_intel_display(intel_dp);
+	bool reprobe_needed = false;
 
-	if (val & RX_CAP_CHANGED)
+	if (irq_mask & RX_CAP_CHANGED)
 		reprobe_needed = true;
 
-	if (val & HDMI_LINK_STATUS_CHANGED)
+	if (irq_mask & HDMI_LINK_STATUS_CHANGED)
 		intel_dp_handle_hdmi_link_status_change(intel_dp);
 
-	if ((val & DP_TUNNELING_IRQ) &&
+	if ((irq_mask & DP_TUNNELING_IRQ) &&
 	    drm_dp_tunnel_handle_irq(display->dp_tunnel_mgr,
 				     &intel_dp->aux))
 		reprobe_needed = true;
@@ -5779,7 +5789,10 @@ intel_dp_short_pulse(struct intel_dp *intel_dp)
 
 	intel_dp_handle_device_service_irq(intel_dp, irq_mask);
 
-	if (intel_dp_check_link_service_irq(intel_dp))
+	if (!intel_dp_get_and_ack_link_service_irq(intel_dp, &irq_mask))
+		return false;
+
+	if (intel_dp_handle_link_service_irq(intel_dp, irq_mask))
 		reprobe_needed = true;
 
 	/* Handle CEC interrupts, if any */
-- 
2.43.0




More information about the kernel-team mailing list