[PATCH] drm/amdgpu/sdam: Skip SDMA queue reset for SRIOV
Zhang, Jesse(Jie)
Jesse.Zhang at amd.com
Tue Mar 18 08:05:22 UTC 2025
[AMD Official Use Only - AMD Internal Distribution Only]
In the reset queue, the check for sriov already exists.
static int sdma_v4_4_2_stop_queue(struct amdgpu_device *adev, uint32_t instance_id)
{
...
if (amdgpu_sriov_vf(adev))
return -EINVAL;
Thank
Jesse
-----Original Message-----
From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> On Behalf Of Ahmad Rehman
Sent: Tuesday, March 18, 2025 11:50 AM
To: amd-gfx at lists.freedesktop.org
Cc: Chander, Vignesh <Vignesh.Chander at amd.com>; Rehman, Ahmad <Ahmad.Rehman at amd.com>
Subject: [PATCH] drm/amdgpu/sdam: Skip SDMA queue reset for SRIOV
For SRIOV, skip the SDMA queue reset and return error. The engine/queue reset failure will trigger FLR in the sequence.
Signed-off-by: Ahmad Rehman <Ahmad.Rehman at amd.com>
---
drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c b/drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c
index fd34dc138081..5b2d4ca92c17 100644
--- a/drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c
+++ b/drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c
@@ -1666,6 +1666,11 @@ static int sdma_v4_4_2_reset_queue(struct amdgpu_ring *ring, unsigned int vmid) {
struct amdgpu_device *adev = ring->adev;
u32 id = GET_INST(SDMA0, ring->me);
+
+ /* Return error for SRIOV will result in FLR */
+ if (amdgpu_sriov_vf(adev))
+ return -EINVAL;
+
return amdgpu_sdma_reset_engine(adev, id, true); }
--
2.34.1
More information about the amd-gfx
mailing list