drm/amdgpu/sdam: Skip SDMA queue reset for SRIOV
Subsystems (2)
PATCH 1/1 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.
--- drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c +5 -0
@@ -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); }
Signature · 1 line
2.34.1
Quoted 14 lines · Ahmad Rehman
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 <[email protected]>--- drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c | 5 +++++ 1 file changed, 5 insertions(+)drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c +0
-0
drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c static int sdma_v4_4_2_reset_queue(struct amdgpu_ring *ring, unsigned int vmid) · line 1672
Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c +4
-0@@ -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 ;
Prefer something like below -
if (!(adev->sdma.supported_reset & AMDGPU_RESET_TYPE_PER_QUEUE))
return -EOPNOTSUPP;
Then keep the supported_reset mask updated for VF in sdma_v4_4_2_update_reset_mask() => if (amdgpu_sriov_vf(adev)) return; // do nothing.
Thanks,
Lijo
Quoted 4 lines
drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c +1
-0+return amdgpu_sdma_reset_engine (adev, id, true); }
[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 <[email protected]> On Behalf Of Ahmad Rehman
Sent: Tuesday, March 18, 2025 11:50 AM
To: [email protected]
Cc: Chander, Vignesh <[email protected]>; Rehman, Ahmad <[email protected]>
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.
--- drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c +5 -1
@@ -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