From: Leo Li <sunpeng.li@amd.com>
To: Hamza Mahfooz <someguy@effective-light.com>,
<dri-devel@lists.freedesktop.org>
Cc: "Harry Wentland" <harry.wentland@amd.com>,
"Rodrigo Siqueira" <siqueira@igalia.com>,
"Alex Deucher" <alexander.deucher@amd.com>,
"Christian König" <christian.koenig@amd.com>,
"David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>,
"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
"Maxime Ripard" <mripard@kernel.org>,
"Thomas Zimmermann" <tzimmermann@suse.de>,
"Mario Limonciello" <mario.limonciello@amd.com>,
"Alex Hung" <alex.hung@amd.com>, "Ray Wu" <ray.wu@amd.com>,
"Wayne Lin" <Wayne.Lin@amd.com>,
"Aurabindo Pillai" <aurabindo.pillai@amd.com>,
"Timur Kristóf" <timur.kristof@gmail.com>,
"Mario Limonciello (AMD)" <superm1@kernel.org>,
"Ivan Lipski" <ivan.lipski@amd.com>,
"Chenyu Chen" <chen-yu.chen@amd.com>,
"Matthew Schwartz" <matthew.schwartz@linux.dev>,
"Yussuf Khalil" <dev@pp3345.net>,
"Tom Chung" <chiahsuan.chung@amd.com>,
"Colin Ian King" <colin.i.king@gmail.com>,
"Charlene Liu" <charlene.liu@amd.com>,
amd-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5 2/2] drm/amd/display: add DMU timeout recovery support
Date: Tue, 5 May 2026 12:41:33 -0400 [thread overview]
Message-ID: <99c2f84f-6453-419a-b7bd-c4fb6cda85e0@amd.com> (raw)
In-Reply-To: <62c4c0e9-6368-4737-afc9-d4b1fa7a94e7@amd.com>
On 2026-05-05 12:36, Leo Li wrote:
>
>
> On 2026-05-05 12:02, Leo Li wrote:
>>> + /*
>>> + * Compositors will refuse to make forward progress unless we send
>>> + * the previous flip's completion event.
>>> + */
>>> + if (WARN_ON(acrtc->event)) {
>>> + drm_crtc_send_vblank_event(&acrtc->base, acrtc->event);
>>> + drm_crtc_vblank_put(&acrtc->base);
>>> + }
>> I would expect this WARN_ON to occur only after the 10s flip_done timeout expires, allowing 'this' commit to progress with the previously armed acrtc->event and ->pflip_status from the previous commit ('this' commit would be gated by drm_atomic_helper_wait_for_dependencies).
>>
>> In which case, we probably want to apply the same above hunk for the cursor path here and also raise a warning: https://elixir.bootlin.com/linux/v6.19.3/source/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c#L10170
>
> Hmm, scratch that, looks like I didn't finish my own thought:
>
> I think this would also mean the compositor sent 'this' commit without waiting for the previous vblank event. IOW it's not that compositors refuse to make forward progress, but wait_for_dependencies() in kernel will wait for a flip_done completion that will never come. And that can be a long time, since the drm_crtc_commit_wait()s stack.
>
> Indeed, it seems to be the case in the dmesg log attached to this issue: https://gitlab.freedesktop.org/drm/amd/-/work_items/4809
>
> The back-to-back WARN_ONs are likely from the hunk above, and one level up at https://elixir.bootlin.com/linux/v7.0.1/source/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c#L10186. The compositor attempts another commit soon after, and hits the series of timeouts within wait_for_dependencies(), before we hit the next series of WARN_ONs from the same locations.
>
> So ultimately, I don't think sending the event here will do anything. Since by the time we hit that WARN_ON, we've already waited through wait_for_dependencies(). At which point, there aren't anymore waiters on it.
>
> I'm thinking an alternative would be to issue a 1-2s delayed worker whenever prepare_flip_isr() is called. The worker is canceled whenever the event is sent from the irq handlers. If it runs, then the expected pflip interrupt never fired, so we deliver the event in the worker. It's effectively a SW fallback for event delivery.
>
> Of course, it is only a fallback, ideally we figure out why interrupts were missed in the first place.
>
> - Leo
(Apologies for the spam)
But regarding this patch, I'm OK with dropping the above hunk but leaving the dm_helpers_dmu_timeout() implementation.
With that change, this is
Reviewed-by: Leo Li <sunpeng.li@amd.com>
next prev parent reply other threads:[~2026-05-05 16:41 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-01 20:35 [PATCH v5 1/2] drm/atomic: attempt full modeset on page flip timeout Hamza Mahfooz
2026-05-01 20:35 ` [PATCH v5 2/2] drm/amd/display: add DMU timeout recovery support Hamza Mahfooz
2026-05-04 21:51 ` Mario Limonciello
2026-05-05 16:02 ` Leo Li
2026-05-05 16:36 ` Leo Li
2026-05-05 16:41 ` Leo Li [this message]
2026-05-04 21:50 ` [PATCH v5 1/2] drm/atomic: attempt full modeset on page flip timeout Mario Limonciello
2026-05-05 11:41 ` Hamza Mahfooz
2026-05-05 15:32 ` Mario Limonciello
2026-05-05 18:12 ` Hamza Mahfooz
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=99c2f84f-6453-419a-b7bd-c4fb6cda85e0@amd.com \
--to=sunpeng.li@amd.com \
--cc=Wayne.Lin@amd.com \
--cc=airlied@gmail.com \
--cc=alex.hung@amd.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=aurabindo.pillai@amd.com \
--cc=charlene.liu@amd.com \
--cc=chen-yu.chen@amd.com \
--cc=chiahsuan.chung@amd.com \
--cc=christian.koenig@amd.com \
--cc=colin.i.king@gmail.com \
--cc=dev@pp3345.net \
--cc=dri-devel@lists.freedesktop.org \
--cc=harry.wentland@amd.com \
--cc=ivan.lipski@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mario.limonciello@amd.com \
--cc=matthew.schwartz@linux.dev \
--cc=mripard@kernel.org \
--cc=ray.wu@amd.com \
--cc=simona@ffwll.ch \
--cc=siqueira@igalia.com \
--cc=someguy@effective-light.com \
--cc=superm1@kernel.org \
--cc=timur.kristof@gmail.com \
--cc=tzimmermann@suse.de \
/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