From: Wayne Lin <Wayne.Lin@amd.com>
To: <amd-gfx@lists.freedesktop.org>
Cc: Ambareesh Balaji <ambareeshbalaji@gmail.com>,
<harry.wentland@amd.com>, <sunpeng.li@amd.com>,
<siqueira@igalia.com>, <alexander.deucher@amd.com>
Subject: Re: [PATCH] drm/amd/display: Restart DP stream if the sink doesn't lock onto it
Date: Thu, 12 Nov 2026 11:51:03 +0800 [thread overview]
Message-ID: <20261112035103.3937543-1-Wayne.Lin@amd.com> (raw)
In-Reply-To: <20261107002415.15241-1-ambareeshbalaji@gmail.com>
On Sat, 7 Nov 2026 at 00:24, Ambareesh Balaji wrote:
> Link training succeeding does not mean that the sink has locked onto the
> video stream that follows. Some sinks, e.g. the XREAL Air 2 Pro, are not
> ready to do so for a while after HPD. If the stream starts too early they
> stay black until the stream is restarted, even though link training
> passes and lane status is fine. They report this through DPCD
> SINK_STATUS (RECEIVE_PORT_0_STATUS stays clear). With the display
> manager starting the modeset right after HPD, this happens on most
> replugs.
Hi,
Thanks for the report!
Would like to clarify this a bit that link training success does mean the
DP sink locks the main-link symbols. RECEIVE_PORT_0_STATUS
(DPCD 00205h bit 0) stands for whether the sink regenerated a video stream
from those symbols.
Besides, when HPD is pulled high by the sink, it means the DP sink is ready
for the stream.
> After a modeset on a DP SST link, poll SINK_STATUS. If the sink doesn't
> report being in sync within a second, restart the stream the same way as
> on link loss, and keep polling. The number of restarts is limited per
> connection (reset on HPD, not on HPD RX), so a sink that never reports
> sync isn't restarted forever.
Did an IRQ_HPD occur while the panel stayed black? DP uses that HPD IRQ
instead of polling. DP 1.4 section 5.1.1.2 says a sink that cannot handle
the incoming stream toggles HPD, and the source then reads SINK_STATUS.
Polling this bit skips that handshake.
> No fixed delay is added to the normal path: sinks that lock on in time
> are never touched.
>
> Closes: https://gitlab.freedesktop.org/drm/amd/-/work_items/6101
> Signed-off-by: Ambareesh Balaji <ambareeshbalaji@gmail.com>
> ---
> Tested on Strix Halo with an XREAL Air 2 Pro, on 7.3.1 (the patch applies
> unchanged there). Without it the glasses stay black after nearly every
> replug. With it, all 30 test replugs recovered, none needed more than
> one restart.
>
> Captures (DPCD, ftrace, HPD/USB timing) are in the issue linked above.
> In short: HPD, link training and lane/alignment status look the same on
> good and bad attempts, and nothing in DPCD changes when the glasses become
> able to lock. Only SINK_STATUS differs afterwards. Skipping detection-time
> link training (DC_SKIP_DETECTION_LT) doesn't help.
>
> Open questions:
> - Are the 1 s timeout and the limit of 4 restarts acceptable, or would you
> prefer different values?
> - Would you rather have this as a per-sink quirk than for all DP SST sinks?
So far, it sounds more like a sink's own problem. I would intend to solve
this as a quirk now.
Curious, whether lower timing still have this issue?
> - Is there a better place to hook this, e.g. in DMUB or the HPD path?
Thanks!
Regards,
Wayne Lin
prev parent reply other threads:[~2026-11-12 3:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-07 0:24 [PATCH] drm/amd/display: Restart DP stream if the sink doesn't lock onto it Ambareesh Balaji
2026-11-12 3:51 ` Wayne Lin [this message]
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=20261112035103.3937543-1-Wayne.Lin@amd.com \
--to=wayne.lin@amd.com \
--cc=alexander.deucher@amd.com \
--cc=ambareeshbalaji@gmail.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=harry.wentland@amd.com \
--cc=siqueira@igalia.com \
--cc=sunpeng.li@amd.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.