From: Marek Czernohous <mczernohous@gmail.com>
To: nouveau@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org, Marek Czernohous <marek@czernohous.de>
Subject: [PATCH 3/3] drm/nouveau/dp: retry link check once on HPD IRQ before disconnect
Date: Thu, 9 Apr 2026 19:21:26 +0200 [thread overview]
Message-ID: <20260409172126.115441-4-marek@czernohous.de> (raw)
In-Reply-To: <20260409172126.115441-1-marek@czernohous.de>
On NV50/G94-family chipsets with DisplayPort, transient link glitches
can trigger an HPD IRQ where the first nouveau_dp_link_check() fails
momentarily. The driver then falls through to connector status
re-detection, treating it as a disconnect event. This causes a brief
display blackout followed by a re-plug, which is disruptive under
both X11 and Wayland.
Add a single retry with a 100ms delay before giving up on the link.
DisplayPort link training typically completes within a few
milliseconds; 100ms is generous enough to cover worst-case
re-negotiation on older hardware without adding perceptible latency
for genuine unplug events.
The retry is bounded (exactly one attempt) and only applies to the
IRQ path — plug/unplug events are not affected.
Tested on NVAC (MCP79) with DisplayPort output over extended DPMS
on/off cycles. Without this patch, occasional display flickers were
observed after DPMS resume. With this patch, all DPMS transitions are
clean.
Signed-off-by: Marek Czernohous <marek@czernohous.de>
---
drivers/gpu/drm/nouveau/nouveau_display.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c
index d71dcfc6e..b6e40794b 100644
--- a/drivers/gpu/drm/nouveau/nouveau_display.c
+++ b/drivers/gpu/drm/nouveau/nouveau_display.c
@@ -465,6 +465,10 @@ nouveau_display_hpd_work(struct work_struct *work)
if (bits & NVIF_CONN_EVENT_V0_IRQ) {
if (nouveau_dp_link_check(nv_connector))
continue;
+ /* Retry once after 100ms for transient DP glitches (NV50/G94) */
+ msleep(100);
+ if (nouveau_dp_link_check(nv_connector))
+ continue;
}
connector->status = drm_helper_probe_detect(connector, NULL, false);
--
2.52.0
next prev parent reply other threads:[~2026-04-10 7:07 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-09 17:21 [PATCH 0/3] drm/nouveau: stability fixes for NVAC (MCP79/MCP7A) Marek Czernohous
2026-04-09 17:21 ` [PATCH 1/3] drm/nouveau/pci: use nv46 MSI rearm for G94 (NVAC/MCP79) Marek Czernohous
2026-04-12 0:25 ` Claude review: " Claude Code Review Bot
2026-04-09 17:21 ` [PATCH 2/3] drm/nouveau/kms: add NULL check for CRTC in nv50_sor_atomic_disable Marek Czernohous
2026-04-12 0:25 ` Claude review: " Claude Code Review Bot
2026-04-09 17:21 ` Marek Czernohous [this message]
2026-04-12 0:25 ` Claude review: drm/nouveau/dp: retry link check once on HPD IRQ before disconnect Claude Code Review Bot
2026-04-12 0:25 ` Claude review: drm/nouveau: stability fixes for NVAC (MCP79/MCP7A) 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=20260409172126.115441-4-marek@czernohous.de \
--to=mczernohous@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=marek@czernohous.de \
--cc=nouveau@lists.freedesktop.org \
/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