From: "Andrzej Piątyszek" <andrzej.piatyszek@gmail.com>
To: amd-gfx@lists.freedesktop.org
Cc: "Harry Wentland" <harry.wentland@amd.com>,
"Leo Li" <sunpeng.li@amd.com>,
"Rodrigo Siqueira" <siqueira@igalia.com>,
"Alex Deucher" <alexander.deucher@amd.com>,
"Christian König" <christian.koenig@amd.com>,
"Fangzhi Zuo" <Jerry.Zuo@amd.com>,
"Relja Vojvodic" <Relja.Vojvodic@amd.com>,
"Ilya Bakoulin" <Ilya.Bakoulin@amd.com>,
"David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
"Andrzej Piątyszek" <andrzej.piatyszek@gmail.com>
Subject: [PATCH 3/3] drm/amd/display: Retry the same FRL rate after a sink timeout
Date: Tue, 10 Nov 2026 14:09:56 +0100 [thread overview]
Message-ID: <20261110130956.160024-4-andrzej.piatyszek@gmail.com> (raw)
In-Reply-To: <20261110130956.160024-1-andrzej.piatyszek@gmail.com>
hdmi_frl_perform_link_training_with_fallback() lowers the rate after any
failed attempt, even when the sink never answered. The enable path,
hdmi_frl_perform_link_training_with_retries(), tries the same rate again
instead.
After waking up, a Samsung QE65Q80T (2020) can stay silent at
10 Gbps x 4 for a few seconds and then train in about 33 ms. Link
verification moves to a lower rate before that happens.
After a timeout, try the same rate again, up to max_retries times per
verification, as the enable path does. A sink that never answers costs
up to three extra attempts.
Fixes: cbb8e2044b9e ("drm/amd/display: Add DC link support for FRL")
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Andrzej Piątyszek <andrzej.piatyszek@gmail.com>
---
.../amd/display/dc/link/protocols/link_hdmi_frl.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/drivers/gpu/drm/amd/display/dc/link/protocols/link_hdmi_frl.c b/drivers/gpu/drm/amd/display/dc/link/protocols/link_hdmi_frl.c
index 97b2b9b74..129834d6d 100644
--- a/drivers/gpu/drm/amd/display/dc/link/protocols/link_hdmi_frl.c
+++ b/drivers/gpu/drm/amd/display/dc/link/protocols/link_hdmi_frl.c
@@ -818,9 +818,14 @@ enum link_result hdmi_frl_perform_link_training_with_fallback(
enum clock_source_id frl_phy_clock_source_id)
{
enum link_result status = LINK_RESULT_UNKNOWN;
+ unsigned int retries = 0;
+ unsigned int max_retries = 3;
DC_LOGGER_INIT(link->ctx->logger);
+ if (link->preferred_hdmi_frl_settings.valid)
+ max_retries = link->preferred_hdmi_frl_settings.max_retries;
+
/* FRL Link Training */
while (status != LINK_RESULT_FALLBACK) {
if (link->frl_link_settings.frl_link_rate ==
@@ -846,6 +851,15 @@ enum link_result hdmi_frl_perform_link_training_with_fallback(
if (status == LINK_RESULT_SUCCESS)
break;
+ /*
+ * A sink that is still waking up may not answer at all. Retry the
+ * same rate before going lower, as many times as link enable does.
+ */
+ if (status == LINK_RESULT_TIMEOUT && retries < max_retries) {
+ retries++;
+ continue;
+ }
+
link->frl_link_settings.frl_link_rate--;
if (link->frl_link_settings.frl_link_rate <
HDMI_FRL_LINK_RATE_6GBPS_4LANE)
--
2.56.0
prev parent reply other threads:[~2026-11-10 13:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-10 13:09 [PATCH 0/3] drm/amd/display: HDMI FRL training fixes for slow sinks Andrzej Piątyszek
2026-11-10 13:09 ` [PATCH 1/3] drm/amd/display: Apply requested TxFFE level right away in FRL training Andrzej Piątyszek
2026-11-10 13:09 ` [PATCH 2/3] drm/amd/display: Wait up to 1 s for slow sinks in FRL link training Andrzej Piątyszek
2026-11-10 13:09 ` Andrzej Piątyszek [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=20261110130956.160024-4-andrzej.piatyszek@gmail.com \
--to=andrzej.piatyszek@gmail.com \
--cc=Ilya.Bakoulin@amd.com \
--cc=Jerry.Zuo@amd.com \
--cc=Relja.Vojvodic@amd.com \
--cc=airlied@gmail.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=harry.wentland@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=simona@ffwll.ch \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®