From: Antonio Quartulli <antonio@mandelbit.com>
To: amd-gfx@lists.freedesktop.org
Cc: antonio@mandelbit.com, linux-kernel@vger.kernel.org,
dri-devel@lists.freedesktop.org, martin.leung@amd.com,
bpinnint@amd.com, aurabindo.pillai@amd.com,
Muhammad.Ahmed@amd.com, Karen.Chen@amd.com, leo.chen@amd.com,
gaghik.khachatrian@amd.com, roman.li@amd.com, wayne.lin@amd.com,
nicholas.kazlauskas@amd.com, christian.koenig@amd.com,
alexander.deucher@amd.com, siqueira@igalia.com, simona@ffwll.ch,
airlied@gmail.com, sunpeng.li@amd.com, harry.wentland@amd.com
Subject: [RFC] amdgpu: fix compressed buffer config routine waiting time
Date: Tue, 19 May 2026 16:45:09 +0200 [thread overview]
Message-ID: <20260519144509.2646680-1-antonio@mandelbit.com> (raw)
Starting with commit 592c5b80110d5 ("drm/amd/display: Migrate HUBBUB register access from hwseq to hubbub component.")
the amdgpu driver is reporting the following WARNING in the kernel log
during boot time:
[ 15.464476] amdgpu 0000:0c:00.0: [drm] REG_WAIT timeout 1us * 100 tries - dcn31_program_compbuf_size line:141
[ 15.464522] ------------[ cut here ]------------
[ 15.464523] !(generic_reg_get(hubbub2->base.ctx, hubbub2->regs->DCHUBBUB_COMPBUF_CTRL, hubbub2->shifts->CONFIG_ERROR, hubbub2->masks->CONFIG_ERROR, &compbuf_size_segments) && !compbuf_size_segments)
[ 15.464524] WARNING: drivers/gpu/drm/amd/amdgpu/../display/dc/hubbub/dcn31/dcn31_hubbub.c:151 at dcn31_program_compbuf_size+0x20e/0x220 [amdgpu], CPU#2: kworker/2:2/184
[ 15.464906] Workqueue: events drm_mode_rmfb_work_fn
[ 15.464910] RIP: 0010:dcn31_program_compbuf_size+0x20e/0x220 [amdgpu]
[ 15.465200] <TASK>
[ 15.465202] dcn20_optimize_bandwidth+0x110/0x210 [amdgpu]
[ 15.465556] dc_commit_state_no_check+0x14ff/0x18a0 [amdgpu]
[ 15.465925] dc_commit_streams+0x471/0x640 [amdgpu]
[ 15.466252] amdgpu_dm_atomic_commit_tail+0x903/0x4430 [amdgpu]
[ 15.467401] commit_tail+0x242/0x2e0
[ 15.467405] drm_atomic_helper_commit+0x28b/0x2a0
[ 15.467407] drm_atomic_commit+0xc3/0xf0
[ 15.467416] drm_mode_rmfb_work_fn+0x85/0xb0
[ 15.467436] ret_from_fork_asm+0x1a/0x30
[ 15.467441] </TASK>
After boot this results in unstable video output, specifically after
resuming from screen sleep. The video may not come back at all
or may come up partly messed up.
This problem seems to affect various people on AMD iGPU, as discussed
on the related GitHub issue.
Giuseppe Ranieri digged up the issue and suggested the proposed code
change.
There was also a previous report on the amd-gfx ml (see related link below)
but it got nowhere.
By looking at the offending commit I am not truly able to understand why
it is breaking. Hence I am posting this patch as RFC only.
What I can say is that this fix has been solid on my platform running
7.1.0-rc3 with this patch.
I am on:
Gigabyte Technology Co., Ltd. B850M DS3H/B850M DS3H + AMD Ryzen 9 9950X
Fixes: 592c5b80110d5 ("drm/amd/display: Migrate HUBBUB register access from hwseq to hubbub component.")
Link: https://github.com/CachyOS/linux-cachyos/issues/810
Link: https://lore.kernel.org/amd-gfx/20260316094232.6bb6f0bf@schienar/
Suggested-by: Giuseppe Ranieri
Signed-off-by: Antonio Quartulli <antonio@mandelbit.com>
---
.../gpu/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c b/drivers/gpu/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c
index 3c298192f3596..9dc1db4524500 100644
--- a/drivers/gpu/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c
+++ b/drivers/gpu/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c
@@ -138,10 +138,10 @@ static void dcn31_program_compbuf_size(struct hubbub *hubbub, unsigned int compb
if (safe_to_increase || compbuf_size_segments <= hubbub2->compbuf_size_segments) {
if (compbuf_size_segments > hubbub2->compbuf_size_segments) {
- REG_WAIT(DCHUBBUB_DET0_CTRL, DET0_SIZE_CURRENT, hubbub2->det0_size, 1, 100);
- REG_WAIT(DCHUBBUB_DET1_CTRL, DET1_SIZE_CURRENT, hubbub2->det1_size, 1, 100);
- REG_WAIT(DCHUBBUB_DET2_CTRL, DET2_SIZE_CURRENT, hubbub2->det2_size, 1, 100);
- REG_WAIT(DCHUBBUB_DET3_CTRL, DET3_SIZE_CURRENT, hubbub2->det3_size, 1, 100);
+ dcn31_wait_for_det_apply(hubbub, 0);
+ dcn31_wait_for_det_apply(hubbub, 1);
+ dcn31_wait_for_det_apply(hubbub, 2);
+ dcn31_wait_for_det_apply(hubbub, 3);
}
/* Should never be hit, if it is we have an erroneous hw config*/
ASSERT(hubbub2->det0_size + hubbub2->det1_size + hubbub2->det2_size
--
2.53.0
next reply other threads:[~2026-05-19 14:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-19 14:45 Antonio Quartulli [this message]
[not found] ` <CH0PR12MB52849BD9E94D9290EFB51B528B002@CH0PR12MB5284.namprd12.prod.outlook.com>
2026-05-31 20:40 ` Antonio Quartulli
2026-06-01 18:41 ` Aurabindo Pillai
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=20260519144509.2646680-1-antonio@mandelbit.com \
--to=antonio@mandelbit.com \
--cc=Karen.Chen@amd.com \
--cc=Muhammad.Ahmed@amd.com \
--cc=airlied@gmail.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=aurabindo.pillai@amd.com \
--cc=bpinnint@amd.com \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=gaghik.khachatrian@amd.com \
--cc=harry.wentland@amd.com \
--cc=leo.chen@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.leung@amd.com \
--cc=nicholas.kazlauskas@amd.com \
--cc=roman.li@amd.com \
--cc=simona@ffwll.ch \
--cc=siqueira@igalia.com \
--cc=sunpeng.li@amd.com \
--cc=wayne.lin@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®