From: "Timur Kristóf" <timur.kristof@gmail.com>
To: "Zhang, Jesse(Jie)" <Jesse.Zhang@amd.com>,
"amd-gfx@lists.freedesktop.org" <amd-gfx@lists.freedesktop.org>
Cc: "Deucher, Alexander" <Alexander.Deucher@amd.com>,
"Koenig, Christian" <Christian.Koenig@amd.com>,
"Lazar, Lijo" <Lijo.Lazar@amd.com>,
Mario Sopena-Novales <Mario.Novales@amd.com>,
"Rastogi, Manu" <Manu.Rastogi@amd.com>,
"Zhu, Jiongyu (Joey)" <Jiongyu.Zhu@amd.com>
Subject: Re: [PATCH v3 02/15] drm/amdgpu: complete the guilty fence at the end of a multi ring reset
Date: Wed, 04 Nov 2026 23:46:37 +0100 [thread overview]
Message-ID: <837f5db76982c9d84f45bc5ecd04e0bd9de16a4d.camel@gmail.com> (raw)
In-Reply-To: <BL1PR12MB51441296195645049FBB4763E3682@BL1PR12MB5144.namprd12.prod.outlook.com>
On Wed, 2026-11-04 at 02:46 +0000, Zhang, Jesse(Jie) wrote:
> > > + r = amdgpu_ring_reset_helper_end(ring, ring ==
> > > guilty_ring ?
> > > + guilty_fence :
> > > ring->guilty_fence);
> >
> > Can you help me understand what was wrong with the line before?
> > I think guilty_fence == ring->guilty_fence when ring == guilty_ring
> > no?
>
> Usually yes, but not when the soft reset follows a failed ring reset
> of the
> same job.
> amdgpu_ring_reset(ring, vmid, job->hw_fence)
> -> amdgpu_ring_reset_helper_begin(ring, F)
> -> amdgpu_ring_backup_unprocessed_commands(ring, F)
> sets ring->guilty_fence = F.
>
> So by the time the end helper runs, ring->guilty_fence no longer
> equals the
> guilty fence: the begin helper cleared it.
I think I see the problem.
I re-read the queue reset code and the helpers. During a queue reset,
it makes a backup and saves the guilty fence but if the queue reset
fails, it doesn't restore the contents, and on a subsequent call it
clears the guilty fence and the backed up contents.
Unfortunately I think this commit doesn't completely fix that because
the reset begin helper will still clear the backed up contents on the
second call (sets ring_backup_entries_to_copy = 0).
I think the correct fix would be to make sure we don't repeat the ring
reset begin helper:
https://gitlab.freedesktop.org/Venemo/linux/-/commit/86f2bf222caee0da267f9d9e12362513fe4f7f9e
Please take a look and if you agree feel free to take that patch in
your series.
Timur
next prev parent reply other threads:[~2026-11-04 22:46 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-28 8:56 [PATCH v3 01/15] drm/amdgpu: pass the device to the multi ring reset helpers Jesse Zhang
2026-10-28 8:56 ` [PATCH v3 02/15] drm/amdgpu: complete the guilty fence at the end of a multi ring reset Jesse Zhang
2026-11-03 20:12 ` Timur Kristóf
2026-11-04 2:46 ` Zhang, Jesse(Jie)
2026-11-04 22:46 ` Timur Kristóf [this message]
2026-11-05 2:09 ` Zhang, Jesse(Jie)
2026-11-05 8:54 ` Timur Kristóf
2026-10-28 8:56 ` [PATCH v3 03/15] drm/amdgpu: add an engine scope to the IP block soft reset Jesse Zhang
2026-11-03 20:15 ` Timur Kristóf
2026-11-04 3:32 ` Zhang, Jesse(Jie)
2026-11-04 22:49 ` Timur Kristóf
2026-11-05 2:41 ` Zhang, Jesse(Jie)
2026-10-28 8:56 ` [PATCH v3 04/15] drm/amdgpu/gfx: add a reset_engine callback Jesse Zhang
2026-11-03 20:16 ` Timur Kristóf
2026-10-28 8:56 ` [PATCH v3 05/15] drm/amdgpu/gfx12: add a gfx engine reset Jesse Zhang
2026-10-28 8:56 ` [PATCH v3 06/15] drm/amdgpu/gfx11: " Jesse Zhang
2026-11-03 20:22 ` Timur Kristóf
2026-10-28 8:56 ` [PATCH v3 07/15] drm/amdgpu/gfx: add callbacks to read and restore the ring state of a gfx queue Jesse Zhang
2026-11-03 20:29 ` Timur Kristóf
2026-10-28 8:56 ` [PATCH v3 08/15] drm/amdgpu/gfx12: " Jesse Zhang
2026-10-28 8:56 ` [PATCH v3 09/15] drm/amdgpu/gfx11: " Jesse Zhang
2026-10-28 8:56 ` [PATCH v3 10/15] drm/amdgpu/userq: add a helper to signal the fences of a queue up to a point Jesse Zhang
2026-10-28 8:56 ` [PATCH v3 11/15] drm/amdgpu/userq: add helpers to keep the user queues of one engine across a reset Jesse Zhang
2026-11-03 20:37 ` Timur Kristóf
2026-10-28 8:56 ` [PATCH v3 12/15] drm/amdgpu/gfx: add a gfx engine soft reset Jesse Zhang
2026-11-03 20:38 ` Timur Kristóf
2026-10-28 8:56 ` [PATCH v3 13/15] drm/amdgpu/userq: reset the gfx engine when a gfx user queue reset fails Jesse Zhang
2026-10-28 8:56 ` [PATCH v3 14/15] drm/amdgpu/gfx12: enable the gfx engine soft reset Jesse Zhang
2026-10-28 8:56 ` [PATCH v3 15/15] drm/amdgpu/gfx11: " Jesse Zhang
2026-11-03 20:41 ` Timur Kristóf
2026-11-04 5:54 ` Zhang, Jesse(Jie)
2026-11-04 22:51 ` Timur Kristóf
2026-11-02 1:28 ` [PATCH v3 01/15] drm/amdgpu: pass the device to the multi ring reset helpers Zhang, Jesse(Jie)
2026-11-02 16:24 ` Timur Kristóf
2026-11-04 1:45 ` Zhang, Jesse(Jie)
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=837f5db76982c9d84f45bc5ecd04e0bd9de16a4d.camel@gmail.com \
--to=timur.kristof@gmail.com \
--cc=Alexander.Deucher@amd.com \
--cc=Christian.Koenig@amd.com \
--cc=Jesse.Zhang@amd.com \
--cc=Jiongyu.Zhu@amd.com \
--cc=Lijo.Lazar@amd.com \
--cc=Manu.Rastogi@amd.com \
--cc=Mario.Novales@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
/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.