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 1/2] drm/i915/dp_mst: Fix forced link retrain handling in MST HPD IRQ handler
Date: Wed, 11 Mar 2026 17:31:51 +0200 [thread overview]
Message-ID: <20260311153152.133744-1-imre.deak@intel.com> (raw)
Handling of a forced link retraining debugfs request via the DP MST HPD
IRQ handler is incorrectly skipped, if the IRQ handler doesn't see any
HPD IRQs raised by the sink. Fix this by ensuring that the request is
always handled (in the Fixes: commit below by directly calling
intel_dp_check_link_state(), later by the same call moved to
intel_dp_handle_link_service_irq()).
Cc: Luca Coelho <luciano.coelho@intel.com>
Fixes: db4855d90363 ("drm/i915/dp_mst: Reuse intel_dp_check_link_state() in the HPD IRQ handler")
Signed-off-by: Imre Deak <imre.deak@intel.com>
---
drivers/gpu/drm/i915/display/intel_dp.c | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index fbb5e2f9c2414..2ae030eda73ee 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -5575,11 +5575,13 @@ static bool
intel_dp_check_mst_status(struct intel_dp *intel_dp)
{
struct intel_display *display = to_intel_display(intel_dp);
+ bool force_retrain = intel_dp->link.force_retrain;
bool reprobe_needed = false;
for (;;) {
u8 esi[4] = {};
u8 ack[4] = {};
+ bool new_irqs;
if (!intel_dp_get_sink_irq_esi(intel_dp, esi)) {
drm_dbg_kms(display->drm,
@@ -5595,20 +5597,28 @@ intel_dp_check_mst_status(struct intel_dp *intel_dp)
intel_dp_mst_hpd_irq(intel_dp, esi, ack);
- if (mem_is_zero(ack, sizeof(ack)))
- break;
+ new_irqs = !mem_is_zero(ack, sizeof(ack));
drm_WARN_ON(display->drm, ack[1] & ~INTEL_DP_DEVICE_SERVICE_IRQ_MASK_MST);
drm_WARN_ON(display->drm, ack[3] & ~INTEL_DP_LINK_SERVICE_IRQ_MASK_MST);
- if (!intel_dp_ack_sink_irq_esi(intel_dp, ack))
+ if (new_irqs && !intel_dp_ack_sink_irq_esi(intel_dp, ack))
drm_dbg_kms(display->drm, "Failed to ack ESI\n");
if (ack[1] & (DP_DOWN_REP_MSG_RDY | DP_UP_REQ_MSG_RDY))
drm_dp_mst_hpd_irq_send_new_request(&intel_dp->mst.mgr);
+ if (force_retrain) {
+ /* Defer forced retraining to the regular link status check. */
+ ack[3] |= LINK_STATUS_CHANGED;
+ force_retrain = false;
+ }
+
if (intel_dp_handle_link_service_irq(intel_dp, ack[3]))
reprobe_needed = true;
+
+ if (!new_irqs)
+ break;
}
return !reprobe_needed;
--
2.49.1
next reply other threads:[~2026-03-11 15:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-11 15:31 Imre Deak [this message]
2026-03-11 15:31 ` [PATCH 2/2] drm/i915/dp: Simplify forcing a link retraining Imre Deak
2026-03-12 5:17 ` Kandpal, Suraj
2026-03-11 16:51 ` ✓ i915.CI.BAT: success for series starting with [1/2] drm/i915/dp_mst: Fix forced link retrain handling in MST HPD IRQ handler Patchwork
2026-03-12 4:59 ` [PATCH 1/2] " Kandpal, Suraj
2026-03-12 8:18 ` ✓ i915.CI.Full: success for series starting with [1/2] " Patchwork
2026-03-13 13:01 ` Imre Deak
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=20260311153152.133744-1-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