AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: dyllan@dyllankobal.com
To: Harry Wentland <harry.wentland@amd.com>
Cc: Jerry Zuo <jerry.zuo@amd.com>, amd-gfx@lists.freedesktop.org
Subject: [PATCH] drm/amd/display: fix FRL link-status polling never running
Date: Wed, 13 May 2026 00:11:19 +0000	[thread overview]
Message-ID: <20260513001114.1186443-1-dyllan@dyllankobal.com> (raw)
In-Reply-To: <20260512155244.403854-12-harry.wentland@amd.com>

From: Dyllan Kobal <dyllan.kobal@zetier.com>

If I am understanding the logic here correctly amdgpu_dm_commit_streams()
is suppose to be deciding whether to start the 200ms FRL link-status
polling worker by scanning the streams being committed and setting
frl_stream_found.  The intent is "if any FRL stream in use, arm 
the worker so it can call dc_link_frl_poll_status_flag() and
trigger DETECT_REASON_RETRAIN on link errors".

The conditional seems to be inverted: it sets frl_stream_found 
when the stream is *not* HDMI FRL.  Consequently:

  - On a commit with only an FRL stream (the normal case once an
    HDMI 2.1 sink is up), the worker is cancel_delayed_work_sync()'d
    and never re-armed.
  - On commits that include only TMDS/DP streams, the worker fires
    pointlessly and walks every dc_link looking for FRL links that
    aren't there.

The net effect on HDMI 2.1 FRL sinks is that FRL link retraining is
completely disabled.

Verified on a Sony Bravia 8 II connected to an RX 9070 XT (DCN 4.0.1).  
ftrace function tracer filtered to hdmi_frl_status_polling_work:

  before fix:  0 invocations in 10 s
  after fix:  48 invocations in 10 s (expected 5 Hz cadence)

After the fix, dc_link_detect(DETECT_REASON_RETRAIN) recovers the
link automatically on the next transient instead of requiring a full
hotplug.

Fixes: f7d5a0012653 ("drm/amd/display: Tie FRL support into amdgpu_dm")
Signed-off-by: Dyllan Kobal <dyllan.kobal@zetier.com>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index cc8e8717a460..4bd760871f85 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -10986,7 +10986,7 @@ static void amdgpu_dm_commit_streams(struct drm_atomic_state *state,
 	for (i = 0; i < params.stream_count; i++) {
 		struct dc_stream_state *stream = params.streams[i];
 
-		if (stream->signal != SIGNAL_TYPE_HDMI_FRL) {
+		if (stream->signal == SIGNAL_TYPE_HDMI_FRL) {
 			frl_stream_found = true;
 			break;
 		}
-- 
2.54.0



  reply	other threads:[~2026-05-13  0:11 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-12 15:52 [PATCH v5 00/13] HDMI FRL and DSC Support for amdgpu Harry Wentland
2026-05-12 15:52 ` [PATCH v5 01/13] drm/amd/display: Add HDMI FRL definitions to includes Harry Wentland
2026-05-12 15:52 ` [PATCH v5 02/13] drm/amd/display: Add DML changes to support HDMI FRL Harry Wentland
2026-05-12 15:52 ` [PATCH v5 03/13] drm/amd/display: add HDMI 2.1 FRL base support to DML 2.0 Harry Wentland
2026-05-12 15:52 ` [PATCH v5 04/13] drm/amd/display: Add DCCG DIO, HPO, OPP, and OPTC support for FRL Harry Wentland
2026-05-12 15:52 ` [PATCH v5 05/13] drm/amd/display: Add FRL support to clk_mgr, dsc, hdcp Harry Wentland
2026-05-12 15:52 ` [PATCH v5 06/13] drm/amd/display: Tie FRL programming together in HWSS Harry Wentland
2026-05-12 15:52 ` [PATCH v5 07/13] drm/amd/display: Add DC resource support for FRL Harry Wentland
2026-05-12 15:52 ` [PATCH v5 08/13] drm/amd/display Add DC link " Harry Wentland
2026-05-12 15:52 ` [PATCH v5 09/13] drm/amd/display: Add support for FRL to DC core Harry Wentland
2026-05-12 15:52 ` [PATCH v5 10/13] drm/amd/display: Update HDCP and info_packet modules for FRL Harry Wentland
2026-05-12 15:52 ` [PATCH v5 11/13] drm/amd/display: Tie FRL support into amdgpu_dm Harry Wentland
2026-05-13  0:11   ` dyllan [this message]
2026-05-12 15:52 ` [PATCH v5 12/13] drm/amd/display: add HDMI 2.1 Compliance Support Harry Wentland
2026-05-12 15:52 ` [PATCH v5 13/13] drm/amd/display: add HDMI 2.1 DSC over FRL support Harry Wentland
2026-05-17 18:58 ` [PATCH v5 00/13] HDMI FRL and DSC Support for amdgpu Tomasz Pakuła

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=20260513001114.1186443-1-dyllan@dyllankobal.com \
    --to=dyllan@dyllankobal.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=harry.wentland@amd.com \
    --cc=jerry.zuo@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