From: Hamza Mahfooz <someguy@effective-light.com>
To: "Christian König" <christian.koenig@amd.com>
Cc: dri-devel@lists.freedesktop.org,
"Michel Dänzer" <michel.daenzer@mailbox.org>,
"Mario Limonciello" <mario.limonciello@amd.com>,
"Harry Wentland" <harry.wentland@amd.com>,
"Leo Li" <sunpeng.li@amd.com>,
"Rodrigo Siqueira" <siqueira@igalia.com>,
"Alex Deucher" <alexander.deucher@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>,
"Alex Hung" <alex.hung@amd.com>,
"Aurabindo Pillai" <aurabindo.pillai@amd.com>,
"Wayne Lin" <Wayne.Lin@amd.com>,
"Timur Kristóf" <timur.kristof@gmail.com>,
"Ivan Lipski" <ivan.lipski@amd.com>,
"Dominik Kaszewski" <dominik.kaszewski@amd.com>,
amd-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 2/2] drm/amd/display: add vendor specific reset
Date: Fri, 27 Feb 2026 15:58:43 -0500 [thread overview]
Message-ID: <aaIFg53tniZG5woJ@hal-station> (raw)
In-Reply-To: <c5ef0c6d-3620-4c8e-8b44-0c217897e6ed@amd.com>
On Mon, Feb 23, 2026 at 10:34:17AM +0100, Christian König wrote:
> > @@ -11085,8 +11087,26 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state)
> > /* Signal HW programming completion */
> > drm_atomic_helper_commit_hw_done(state);
> >
> > - if (wait_for_vblank)
> > - drm_atomic_helper_wait_for_flip_done(dev, state);
> > + if (wait_for_vblank &&
> > + drm_atomic_helper_wait_for_flip_done(dev, state)) {
> > + mutex_lock(&dm->dc_lock);
> > + if (dm_dmub_hw_init(adev))
>
> From Michel's explanation that is pretty much a no-go because it potentially causes other atomic commits to react in unforeseen ways.
>
This code would only run if the forced modeset fails, which is to say we
are already in a hung state, so I don't expect any other atomic commits
to be firing off. Also, evidently the timeout isn't a one off, so it's
almost certainly caused by hung firmware and not by a bug in the
driver's vblanking code.
> > + drm_dev_wedged_event(dev, DRM_WEDGE_RECOVERY_REBIND |
> > + DRM_WEDGE_RECOVERY_BUS_RESET,
> > + NULL);
>
> Please completely drop that. This here is a sledge hammer and not going to fly anywhere.
>
I don't feel too strongly about it, though isn't the point to inform
userspace that we were unable to recover? AFAIK the prescribed methods
are mere suggestions and users can choose to ignore them if they feel
that they are too hard hitting.
> > + mutex_unlock(&dm->dc_lock);
> > +
> > + spin_lock_irqsave(&dev->event_lock, flags);
> > + drm_for_each_crtc(crtc, dev) {
>
> This should go over only the CRTCs in the atomic commit currently handled.
>
> Have you tried sending a hotplug event for the connectors in question as Michel suggested?
>
Sure, I can look into that. However, we would still need the firmware
reload. Otherwise, we would just be forcing a modeset twice in
succession.
next prev parent reply other threads:[~2026-02-27 20:59 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-20 17:15 [PATCH v4 1/2] drm: introduce KMS recovery mechanism Hamza Mahfooz
2026-02-20 17:15 ` [PATCH v4 2/2] drm/amd/display: add vendor specific reset Hamza Mahfooz
2026-02-20 17:37 ` Hamza Mahfooz
2026-02-22 1:32 ` kernel test robot
2026-02-23 9:34 ` Christian König
2026-02-27 20:58 ` Hamza Mahfooz [this message]
2026-02-28 18:48 ` [PATCH v4 1/2] drm: introduce KMS recovery mechanism Shengyu Qu
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=aaIFg53tniZG5woJ@hal-station \
--to=someguy@effective-light.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=christian.koenig@amd.com \
--cc=dominik.kaszewski@amd.com \
--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=michel.daenzer@mailbox.org \
--cc=mripard@kernel.org \
--cc=simona@ffwll.ch \
--cc=siqueira@igalia.com \
--cc=sunpeng.li@amd.com \
--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