From: "Timur Kristóf" <timur.kristof@gmail.com>
To: Jesse Zhang <Jesse.Zhang@amd.com>, amd-gfx@lists.freedesktop.org
Cc: Alexander.Deucher@amd.com,
Christian Koenig <christian.koenig@amd.com>,
Lijo.Lazar@amd.com, Mario.Novales@amd.com, Manu.Rastogi@amd.com,
Jiongyu.Zhu@amd.com
Subject: Re: [PATCH v4 01/13] drm/amdgpu: pass the device to the multi ring reset helpers
Date: Thu, 19 Nov 2026 12:33:21 +0100 [thread overview]
Message-ID: <eeef593a3c6c546dd634277c20a361b6155e482e.camel@gmail.com> (raw)
In-Reply-To: <20261105030612.726542-1-Jesse.Zhang@amd.com>
On Thu, 2026-11-05 at 11:05 +0800, Jesse Zhang wrote:
> amdgpu_multi_ring_reset_helper_begin() and _end() take the device
> from
> the guilty ring. A reset triggered by a hung user queue has no guilty
> kernel ring, so pass the device explicitly and allow a NULL guilty
> ring.
>
> No functional change.
>
> Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_ip.c | 4 ++--
> drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 14 ++++++++------
> drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 6 ++++--
> 3 files changed, 14 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ip.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_ip.c
> index 734f2a0bc79a..d0b0d3eaffc5 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ip.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ip.c
> @@ -465,11 +465,11 @@ int amdgpu_device_ip_soft_reset(struct
> amdgpu_ring *guilty_ring,
> ring_type_mask = amdgpu_ring_mask_from_ip(ip_type);
>
> amdgpu_device_lock_reset_domain(adev->reset_domain);
> - amdgpu_multi_ring_reset_helper_begin(ring_type_mask,
> guilty_ring, guilty_fence);
> + amdgpu_multi_ring_reset_helper_begin(adev, ring_type_mask,
> guilty_ring, guilty_fence);
>
> r = ip_block->version->funcs->soft_reset(ip_block);
>
> - r = amdgpu_multi_ring_reset_helper_end(ring_type_mask,
> guilty_ring, r);
> + r = amdgpu_multi_ring_reset_helper_end(adev, ring_type_mask,
> guilty_ring, r);
> amdgpu_device_unlock_reset_domain(adev->reset_domain);
>
> if (r) {
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c
> index 7b67e8cecca2..edae764eb0c4 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c
> @@ -919,8 +919,9 @@ int amdgpu_ring_reset_helper_end(struct
> amdgpu_ring *ring,
> /**
> * amdgpu_multi_ring_reset_helper_begin() - Prepare multiple rings
> for a reset.
> *
> + * @adev: amdgpu device
> * @ring_type_mask: Bitmask of affected ring types
> - * @guilty_ring: The ring which is guilty of causing a reset.
> + * @guilty_ring: The ring which is guilty of causing a reset, or
> NULL.
> * @guilty_fence: The fence which didn't signal on the guilty ring.
> *
> * Useful when performing a GPU reset method that affects
> @@ -938,11 +939,11 @@ int amdgpu_ring_reset_helper_end(struct
> amdgpu_ring *ring,
> * After the reset is complete, the caller should then call
> * amdgpu_multi_ring_reset_helper_end() to restore the rings.
> */
> -void amdgpu_multi_ring_reset_helper_begin(const u32 ring_type_mask,
> +void amdgpu_multi_ring_reset_helper_begin(struct amdgpu_device
> *adev,
> + const u32 ring_type_mask,
> struct amdgpu_ring
> *guilty_ring,
> struct amdgpu_fence
> *guilty_fence)
> {
> - struct amdgpu_device *adev = guilty_ring->adev;
> struct amdgpu_fence *ring_guilty_fence;
> struct amdgpu_ring *ring;
> bool rings_busy;
> @@ -1034,8 +1035,9 @@ void amdgpu_multi_ring_reset_helper_begin(const
> u32 ring_type_mask,
> /**
> * amdgpu_multi_ring_reset_helper_end() - Prepare multiple rings for
> a reset.
> *
> + * @adev: amdgpu device
> * @ring_type_mask: Bitmask of affected ring types
> - * @guilty_ring: The ring which is guilty of causing a reset.
> + * @guilty_ring: The ring which is guilty of causing a reset, or
> NULL.
> * @ret: Return code from the reset function.
> *
> * After calling amdgpu_multi_ring_reset_helper_begin()
> @@ -1046,10 +1048,10 @@ void
> amdgpu_multi_ring_reset_helper_begin(const u32 ring_type_mask,
> * be called to restore preemption state, but it won't attempt to
> * fully restore the ring contents.
> */
> -int amdgpu_multi_ring_reset_helper_end(const u32 ring_type_mask,
> +int amdgpu_multi_ring_reset_helper_end(struct amdgpu_device *adev,
> + const u32 ring_type_mask,
> struct amdgpu_ring
> *guilty_ring, int ret)
> {
> - struct amdgpu_device *adev = guilty_ring->adev;
> struct amdgpu_ring *ring;
> int i, r;
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h
> index b2040f80b7f2..7e6ed43771f2 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h
> @@ -637,10 +637,12 @@ void amdgpu_ring_reset_helper_begin(struct
> amdgpu_ring *ring,
> struct amdgpu_fence
> *guilty_fence);
> int amdgpu_ring_reset_helper_end(struct amdgpu_ring *ring,
> struct amdgpu_fence *guilty_fence);
> -void amdgpu_multi_ring_reset_helper_begin(const u32 ring_type_mask,
> +void amdgpu_multi_ring_reset_helper_begin(struct amdgpu_device
> *adev,
> + const u32 ring_type_mask,
> struct amdgpu_ring
> *guilty_ring,
> struct amdgpu_fence
> *guilty_fence);
> -int amdgpu_multi_ring_reset_helper_end(const u32 ring_type_mask,
> +int amdgpu_multi_ring_reset_helper_end(struct amdgpu_device *adev,
> + const u32 ring_type_mask,
> struct amdgpu_ring
> *guilty_ring, int ret);
> bool amdgpu_ring_is_reset_type_supported(struct amdgpu_ring *ring,
> u32 reset_type);
prev parent reply other threads:[~2026-11-19 11:33 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-05 3:05 [PATCH v4 01/13] drm/amdgpu: pass the device to the multi ring reset helpers Jesse Zhang
2026-11-05 3:05 ` [PATCH v4 02/13] drm/amdgpu/ring: During multi-queue reset, only call begin helper if needed Jesse Zhang
2026-11-11 23:52 ` Daniel Campos Ramos
2026-11-19 11:34 ` Timur Kristóf
2026-11-05 3:05 ` [PATCH v4 03/13] drm/amdgpu: add an engine scope to the IP block soft reset Jesse Zhang
2026-11-19 11:35 ` Timur Kristóf
2026-11-05 3:05 ` [PATCH v4 04/13] drm/amdgpu/gfx: add callbacks to save and restore a gfx HQD Jesse Zhang
2026-11-19 11:35 ` Timur Kristóf
2026-11-05 3:05 ` [PATCH v4 05/13] drm/amdgpu/gfx12: " Jesse Zhang
2026-11-19 11:35 ` Timur Kristóf
2026-11-05 3:05 ` [PATCH v4 06/13] drm/amdgpu/gfx11: " Jesse Zhang
2026-11-19 11:36 ` Timur Kristóf
2026-11-05 3:05 ` [PATCH v4 07/13] drm/amdgpu/userq: add a helper to signal the fences of a queue up to a point Jesse Zhang
2026-11-19 11:36 ` Timur Kristóf
2026-11-05 3:05 ` [PATCH v4 08/13] drm/amdgpu/userq: add helpers to keep the user queues of one engine across a reset Jesse Zhang
2026-11-19 11:36 ` Timur Kristóf
2026-11-05 3:05 ` [PATCH v4 09/13] drm/amdgpu/gfx12: add a gfx engine soft reset Jesse Zhang
2026-11-19 11:42 ` Timur Kristóf
2026-11-05 3:05 ` [PATCH v4 10/13] drm/amdgpu/gfx11: " Jesse Zhang
2026-11-19 11:47 ` Timur Kristóf
2026-11-05 3:05 ` [PATCH v4 11/13] drm/amdgpu/userq: reset the gfx engine when a gfx user queue reset fails Jesse Zhang
2026-11-19 11:47 ` Timur Kristóf
2026-11-05 3:05 ` [PATCH v4 12/13] drm/amdgpu/gfx12: enable the gfx engine soft reset Jesse Zhang
2026-11-19 11:47 ` Timur Kristóf
2026-11-05 3:05 ` [PATCH v4 13/13] drm/amdgpu/gfx11: " Jesse Zhang
2026-11-19 11:47 ` Timur Kristóf
2026-11-10 2:06 ` [PATCH v4 01/13] drm/amdgpu: pass the device to the multi ring reset helpers Zhang, Jesse(Jie)
2026-11-11 15:28 ` Timur Kristóf
2026-11-19 11:33 ` Timur Kristóf [this message]
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=eeef593a3c6c546dd634277c20a361b6155e482e.camel@gmail.com \
--to=timur.kristof@gmail.com \
--cc=Alexander.Deucher@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 \
--cc=christian.koenig@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 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.