drm/amdgpu: avoid sdma ring reset in sriov
Subsystems (2)
PATCH 1/1 drm/amdgpu: avoid sdma ring reset in sriov
sdma ring reset is not supported in SRIOV. kfd driver does not check reset mask, and could queue sdma ring reset during unmap_queues_cpsch.
Avoid the ring reset for sriov.
Signed-off-by Victor Zhao <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c +3 -0
@@ -558,6 +558,9 @@ int amdgpu_sdma_reset_engine(struct amdgpu_device *adev, uint32_t instance_id,struct amdgpu_ring *gfx_ring = &sdma_instance->ring;struct amdgpu_ring *page_ring = &sdma_instance->page; +if (amdgpu_sriov_vf (adev)) +return -EOPNOTSUPP ; +mutex_lock (&sdma_instance->engine_reset_mutex);if (!caller_handles_kernel_queues) {
Signature · 1 line
2.25.1
Quoted 16 lines · Victor Zhao
sdma ring reset is not supported in SRIOV. kfd driver does not check reset mask, and could queue sdma ring reset during
unmap_queues_cpsch.Avoid the ring reset for sriov.
Signed-off-by Victor Zhao <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c | 3 +++ 1 file changed, 3 insertions(+)drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c +0
-0
drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c int amdgpu_sdma_reset_engine(struct amdgpu_device *adev, uint32_t instance_id, · line 562
Quoted 5 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c +2
-0@@ -558,6 +558,9 @@ int amdgpu_sdma_reset_engine(struct amdgpu_device *adev, uint32_t instance_id,struct amdgpu_ring *gfx_ring = &sdma_instance->ring;struct amdgpu_ring *page_ring = &sdma_instance->page; +if (amdgpu_sriov_vf (adev)) +return -EOPNOTSUPP ;
How about !amdgpu_ring_is_reset_type_supported(ring, AMDGPU_RESET_TYPE_PER_QUEUE) instead in case this ever gets enabled on SR-IOV? Either way:
Reviewed-by Alex Deucher <[email protected]>
Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c +1
-1+mutex_lock (&sdma_instance->engine_reset_mutex);if (!caller_handles_kernel_queues) { --2.25.1