public inbox for drm-ai-reviews@public-inbox.freedesktop.org
 help / color / mirror / Atom feed
From: "Chia-Lin Kao (AceLan)" <acelan.kao@canonical.com>
To: Jani Nikula <jani.nikula@linux.intel.com>,
	Rodrigo Vivi <rodrigo.vivi@intel.com>,
	Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
	Tvrtko Ursulin <tursulin@ursulin.net>,
	David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>
Cc: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: [PATCH] drm/i915/dp: Clear accumulated HPD events after link training
Date: Wed,  8 Apr 2026 16:45:09 +0800	[thread overview]
Message-ID: <20260408084509.555045-1-acelan.kao@canonical.com> (raw)

After link training completes, intel_dp_stop_link_train() calls
intel_hpd_unblock() which fires all HPD events that accumulated
during training via queue_work_for_missed_irqs(). On MST hubs that
generate rapid short HPD pulses (observed at 5-55ms intervals on
Dell U2721DE with Realtek MST hub), this creates a burst of stale
ESI processing that races with the ongoing modeset pipeline enabling
the 2nd MST stream, resulting in a GPU hard lockup.

Use intel_hpd_clear_and_unblock() instead, which clears the
accumulated HPD events before unblocking. These events are stale
since they reflect link status before the successful retrain. Any
new HPD events arriving after the unblock will be processed normally,
and the scheduled link check (intel_encoder_link_check_queue_work)
provides a safety net for detecting legitimate link issues.

Signed-off-by: Chia-Lin Kao (AceLan) <acelan.kao@canonical.com>
---
 drivers/gpu/drm/i915/display/intel_dp_link_training.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/display/intel_dp_link_training.c b/drivers/gpu/drm/i915/display/intel_dp_link_training.c
index a26094223f780..4de2b3d3ea21c 100644
--- a/drivers/gpu/drm/i915/display/intel_dp_link_training.c
+++ b/drivers/gpu/drm/i915/display/intel_dp_link_training.c
@@ -1267,7 +1267,7 @@ void intel_dp_stop_link_train(struct intel_dp *intel_dp,
 			lt_dbg(intel_dp, DP_PHY_DPRX, "128b/132b intra-hop not clearing\n");
 	}
 
-	intel_hpd_unblock(encoder);
+	intel_hpd_clear_and_unblock(encoder);
 
 	if (!display->hotplug.ignore_long_hpd &&
 	    intel_dp->link.seq_train_failures < MAX_SEQ_TRAIN_FAILURES) {
-- 
2.53.0


             reply	other threads:[~2026-04-08  8:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-08  8:45 Chia-Lin Kao (AceLan) [this message]
2026-04-12  2:53 ` Claude review: drm/i915/dp: Clear accumulated HPD events after link training Claude Code Review Bot
2026-04-12  2:53 ` Claude Code Review Bot

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=20260408084509.555045-1-acelan.kao@canonical.com \
    --to=acelan.kao@canonical.com \
    --cc=airlied@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=joonas.lahtinen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rodrigo.vivi@intel.com \
    --cc=simona@ffwll.ch \
    --cc=tursulin@ursulin.net \
    /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