From: "Lazar, Lijo" <lijo.lazar@amd.com>
To: "Timur Kristóf" <timur.kristof@gmail.com>,
amd-gfx@lists.freedesktop.org, Alexander.Deucher@amd.com,
"Christian König" <christian.koenig@amd.com>,
"Natalie Vock" <natalie.vock@gmx.de>,
"Marek Olšák" <maraeo@gmail.com>,
"Mario Limonciello" <mario.limonciello@amd.com>,
"Tvrtko Ursulin" <tursulin@ursulin.net>,
"Felix Kuehling" <Felix.Kuehling@amd.com>
Subject: Re: [PATCH 5/5] drm/amdgpu/sdma: In legacy queue reset function, check if KFD is initialized
Date: Fri, 28 Aug 2026 19:41:47 +0530 [thread overview]
Message-ID: <efaaf188-bfe0-4fb4-9a13-23cfe386367c@amd.com> (raw)
In-Reply-To: <20260828120729.25908-6-timur.kristof@gmail.com>
On 28-Aug-26 5:37 PM, Timur Kristóf wrote:
> Avoid calling amdgpu_amdkfd_suspend() and amdgpu_amdkfd_resume()
> when the KFD device is not initialized.
>
> This allows the function to be used on GPUs where KFD is
> not supported or the support is hidden behind an experimental
> flag, such as CIK, in the future.
>
> Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c | 9 +++++++--
> 1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c
> index 9eebd8380834..8798caed1ff1 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c
> @@ -664,9 +664,14 @@ int amdgpu_sdma_reset_queue_legacy(struct amdgpu_ring *ring,
>
> amdgpu_ring_reset_helper_begin(ring, timedout_fence);
>
> - amdgpu_amdkfd_suspend(adev, true);
> + if (adev->kfd.dev)
> + amdgpu_amdkfd_suspend(adev, true);
The right place would have been suspend/resume functions and that check
is already there.
Thanks,
Lijo
> +
> r = amdgpu_sdma_reset_engine(adev, ring->me, true);
> - amdgpu_amdkfd_resume(adev, true);
> +
> + if (adev->kfd.dev)
> + amdgpu_amdkfd_resume(adev, true);
> +
> if (r)
> return r;
>
next prev parent reply other threads:[~2026-08-28 14:12 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-28 12:07 [PATCH 0/5] drm/amdgpu/sdma: Improve existing SDMA queue resets Timur Kristóf
2026-08-28 12:07 ` [PATCH 1/5] drm/amdgpu/sdma: Clear SDMA rings after reset before starting them Timur Kristóf
2026-08-28 12:07 ` [PATCH 2/5] drm/amdgpu/sdma: Remove unimplemented soft_reset() for SDMA and SI DMA Timur Kristóf
2026-08-28 14:21 ` Lazar, Lijo
2026-08-28 12:07 ` [PATCH 3/5] drm/amdgpu/sdma: Move SDMA v5.x queue reset to common code Timur Kristóf
2026-08-28 14:20 ` Lazar, Lijo
2026-08-28 15:37 ` Timur Kristóf
2026-08-28 15:52 ` Alex Deucher
2026-08-28 21:49 ` Timur Kristóf
2026-08-28 15:53 ` Lazar, Lijo
2026-08-28 21:42 ` Timur Kristóf
2026-08-28 12:07 ` [PATCH 4/5] drm/amdgpu/sdma: Use common SDMA legacy queue reset on SDMA v4.4.2 Timur Kristóf
2026-08-28 14:16 ` Lazar, Lijo
2026-08-28 15:36 ` Timur Kristóf
2026-08-28 15:46 ` Lazar, Lijo
2026-08-28 12:07 ` [PATCH 5/5] drm/amdgpu/sdma: In legacy queue reset function, check if KFD is initialized Timur Kristóf
2026-08-28 14:11 ` Lazar, Lijo [this message]
2026-08-28 15:34 ` Timur Kristóf
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=efaaf188-bfe0-4fb4-9a13-23cfe386367c@amd.com \
--to=lijo.lazar@amd.com \
--cc=Alexander.Deucher@amd.com \
--cc=Felix.Kuehling@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=christian.koenig@amd.com \
--cc=maraeo@gmail.com \
--cc=mario.limonciello@amd.com \
--cc=natalie.vock@gmx.de \
--cc=timur.kristof@gmail.com \
--cc=tursulin@ursulin.net \
/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