From: Imre Deak <imre.deak@intel.com>
To: <intel-gfx@lists.freedesktop.org>, <intel-xe@lists.freedesktop.org>
Cc: Luca Coelho <luciano.coelho@intel.com>
Subject: [PATCH v3 13/20] drm/i915/dp: Return early if getting/acking device service IRQs fails
Date: Wed, 25 Feb 2026 18:46:11 +0200 [thread overview]
Message-ID: <20260225164618.1261368-14-imre.deak@intel.com> (raw)
In-Reply-To: <20260225164618.1261368-1-imre.deak@intel.com>
If getting/acking the device 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@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
---
drivers/gpu/drm/i915/display/intel_dp.c | 37 ++++++++++++++++---------
1 file changed, 24 insertions(+), 13 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index f7e91fc16b5dd..3db2fdc78c92b 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -5776,31 +5776,39 @@ void intel_dp_check_link_state(struct intel_dp *intel_dp)
* Return %true if a full connector reprobe is required due to a failure while
* reading or acking the device service IRQs.
*/
-static bool intel_dp_check_device_service_irq(struct intel_dp *intel_dp)
+static bool intel_dp_get_and_ack_device_service_irq(struct intel_dp *intel_dp, u8 *irq_mask)
{
- struct intel_display *display = to_intel_display(intel_dp);
u8 val;
+ *irq_mask = 0;
+
if (drm_dp_dpcd_readb(&intel_dp->aux,
DP_DEVICE_SERVICE_IRQ_VECTOR, &val) != 1)
- return true;
-
- if (!val)
return false;
- if (drm_dp_dpcd_writeb(&intel_dp->aux, DP_DEVICE_SERVICE_IRQ_VECTOR, val) != 1)
+ if (!val)
return true;
- if (val & DP_AUTOMATED_TEST_REQUEST)
+ if (drm_dp_dpcd_writeb(&intel_dp->aux, DP_DEVICE_SERVICE_IRQ_VECTOR, val) != 1)
+ return false;
+
+ *irq_mask = val;
+
+ return true;
+}
+
+static void intel_dp_handle_device_service_irq(struct intel_dp *intel_dp, u8 irq_mask)
+{
+ struct intel_display *display = to_intel_display(intel_dp);
+
+ if (irq_mask & DP_AUTOMATED_TEST_REQUEST)
intel_dp_test_request(intel_dp);
- if (val & DP_CP_IRQ)
+ if (irq_mask & DP_CP_IRQ)
intel_hdcp_handle_cp_irq(intel_dp->attached_connector);
- if (val & DP_SINK_SPECIFIC_IRQ)
+ if (irq_mask & DP_SINK_SPECIFIC_IRQ)
drm_dbg_kms(display->drm, "Sink specific irq unhandled\n");
-
- return false;
}
/*
@@ -5859,6 +5867,7 @@ static bool
intel_dp_short_pulse(struct intel_dp *intel_dp)
{
bool reprobe_needed = false;
+ u8 irq_mask;
intel_dp_test_reset(intel_dp);
@@ -5873,8 +5882,10 @@ intel_dp_short_pulse(struct intel_dp *intel_dp)
/* No need to proceed if we are going to do full detect */
return false;
- if (intel_dp_check_device_service_irq(intel_dp))
- reprobe_needed = true;
+ if (!intel_dp_get_and_ack_device_service_irq(intel_dp, &irq_mask))
+ return false;
+
+ intel_dp_handle_device_service_irq(intel_dp, irq_mask);
if (intel_dp_check_link_service_irq(intel_dp))
reprobe_needed = true;
--
2.49.1
next prev parent reply other threads:[~2026-02-25 16:47 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-25 16:45 [PATCH v3 00/20] drm/i915/dp: Fix few SST HPD IRQ handling issues Imre Deak
2026-02-25 16:45 ` [PATCH v3 01/20] drm/i915/dp_mst: Reprobe connector if the IRQ ESI read failed Imre Deak
2026-02-25 16:46 ` [PATCH v3 02/20] drm/i915/dp_mst: Verify the link status always the same way Imre Deak
2026-02-25 16:46 ` [PATCH v3 03/20] drm/i915/dp_mst: Reuse intel_dp_check_link_state() in the HPD IRQ handler Imre Deak
2026-02-25 16:46 ` [PATCH v3 04/20] drm/i915/dp: Handle a tunneling IRQ after acking it Imre Deak
2026-02-25 16:46 ` [PATCH v3 05/20] drm/i915/dp: Handle the RX_CAP_CHANGED HPD IRQ Imre Deak
2026-02-25 16:46 ` [PATCH v3 06/20] drm/i915/dp: Handle the DOWNSTREAM_PORT_STATUS_CHANGED event Imre Deak
2026-02-25 16:46 ` [PATCH v3 07/20] drm/i915/dp: Don't clobber the encoder state in the HPD IRQ handler Imre Deak
2026-02-25 16:46 ` [PATCH v3 08/20] drm/i915/dp: Remove the device service IRQ handling from connector detect Imre Deak
2026-02-25 16:46 ` [PATCH v3 09/20] drm/i915/dp: Fix the device service IRQ DPCD_REV check Imre Deak
2026-02-25 16:46 ` [PATCH v3 10/20] drm/i915/dp: Fix the link " Imre Deak
2026-02-25 16:46 ` [PATCH v3 11/20] drm/i915/dp: Reprobe connector if getting/acking device IRQs fails Imre Deak
2026-02-25 16:46 ` [PATCH v3 12/20] drm/i915/dp: Reprobe connector if getting/acking link service " Imre Deak
2026-02-25 16:46 ` Imre Deak [this message]
2026-02-25 16:46 ` [PATCH v3 14/20] drm/i915/dp: Return early if getting/ackink " Imre Deak
2026-02-25 16:46 ` [PATCH v3 15/20] drm/i915/dp: Read/ack sink count and sink IRQs for SST as it's done for MST Imre Deak
2026-02-25 16:46 ` [PATCH v3 16/20] drm/i915/dp: Print debug message for a sink connected off request Imre Deak
2026-02-25 16:46 ` [PATCH v3 17/20] drm/i915/dp: Check SST link status while handling link service IRQs Imre Deak
2026-02-25 16:46 ` [PATCH v3 18/20] drm/i915/dp_mst: Reuse intel_dp_handle_link_service_irq() Imre Deak
2026-02-25 16:46 ` [PATCH v3 19/20] drm/i915/dp: Ack only the handled device service IRQs Imre Deak
2026-02-25 16:46 ` [PATCH v3 20/20] drm/i915/dp: Ack only the handled link " Imre Deak
2026-02-25 17:33 ` ✓ CI.KUnit: success for drm/i915/dp: Fix few SST HPD IRQ handling issues (rev3) Patchwork
2026-02-25 18:13 ` ✓ Xe.CI.BAT: " Patchwork
2026-02-25 20:48 ` ✗ Xe.CI.FULL: failure " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260225164618.1261368-14-imre.deak@intel.com \
--to=imre.deak@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=luciano.coelho@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox