From: sashiko-bot@kernel.org
To: "Andrzej Piątyszek" <andrzej.piatyszek@gmail.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 1/3] drm/amd/display: Apply requested TxFFE level right away in FRL training
Date: Tue, 10 Nov 2026 13:24:05 +0000 [thread overview]
Message-ID: <sashiko-outbox-207117@kernel.org> (raw)
In-Reply-To: <20261110130956.160024-2-andrzej.piatyszek@gmail.com>
Thank you for your contribution! Sashiko AI review found no new issues
in this patch, but noticed 1 related pre-existing issue it does not
introduce:
- [Medium] drm/amd/display: busy loop CPU stall in
hdmi_frl_perform_link_training() [1]
--
commit 91fe51195d67c76e4e3cbba1f95c962c1ab46a75
Author: Andrzej Piątyszek <andrzej.piatyszek@gmail.com>
drm/amd/display: Apply requested TxFFE level right away in FRL training
This commit programs the requested TxFFE level immediately during HDMI FRL
link training when the sink requests the next FFE level, rather than
deferring it to the next poll iteration.
> 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 960f18fe275b2..78e62bfec49c7 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
> @@ -640,26 +640,6 @@ static enum link_result hdmi_frl_perform_link_training(struct ddc_service *ddc_s
> prev_flt_update = scdc_update.fields.FLT_UPDATE;
> }
>
> - /*Set TxFFE = TxFFE0*/
> - /*Program FFE_Levels - scdc_config has this field at 0 */
> - if (override_FFE) {
> - if (current_FFE == 0)
> - dio_link_enc->funcs->prog_eq_setting(dio_link_enc, current_FFE,
> - test_req.fields.TXFFE_DEEMPHASIS,
> - test_req.fields.TXFFE_PRESHOOT,
> - test_req.fields.TXFFE_NOFFE,
> - link_settings);
> - else {
> - if (scdc_update.fields.FLT_UPDATE)
> - dio_link_enc->funcs->prog_eq_setting(dio_link_enc, current_FFE,
> - test_req.fields.TXFFE_DEEMPHASIS,
> - test_req.fields.TXFFE_PRESHOOT,
> - test_req.fields.TXFFE_NOFFE,
> - link_settings);
> - }
> - FRL_INFO("FRL LINK TRAINING: TxFFE = %d.\n", current_FFE);
> - override_FFE = false;
> - }
> if (scdc_update.fields.FLT_UPDATE) {
[Severity: Medium]
This problem wasn't introduced by this patch, but can the SCDC status
polling loops in hdmi_frl_perform_link_training() [1] stall the CPU
core by busy-spinning between polls?
drivers/gpu/drm/amd/display/dc/link/protocols/link_hdmi_frl.c:hdmi_frl_perform_link_training() {
...
do {
flt_poll_curr = dm_get_timestamp(ddc_service->ctx);
elapsed = dm_get_elapse_time_in_ns(ddc_service->ctx,
flt_poll_curr, flt_poll_start);
if (elapsed < (num_polls * wait_time_ns))
continue;
num_polls++;
...
}
When FRL link training runs on an HDMI 2.1 display, both the FLT_READY and
FLT_UPDATE loops spin on dm_get_timestamp() and dm_get_elapse_time_in_ns()
while waiting for each 2 ms wait_time_ns interval without sleeping or
yielding the CPU, which monopolizes the core for up to 1 second and can
trigger soft lockup warnings.
[1] https://sashiko.dev/#/bug/linux-4798172c-1032-4f55-aa52-1cbebc19449f
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261110130956.160024-1-andrzej.piatyszek@gmail.com?part=1
next prev parent reply other threads:[~2026-11-10 13:24 UTC|newest]
Thread overview: 7+ 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:24 ` sashiko-bot [this message]
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:34 ` sashiko-bot
2026-11-10 13:09 ` [PATCH 3/3] drm/amd/display: Retry the same FRL rate after a sink timeout Andrzej Piątyszek
2026-11-10 22:20 ` [PATCH 0/3] drm/amd/display: HDMI FRL training fixes for slow sinks Andrzej Piątyszek
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=sashiko-outbox-207117@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=andrzej.piatyszek@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=sashiko-reviews@lists.linux.dev \
/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.