aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/jpeg_v3_0.c
diff options
context:
space:
mode:
authorAlex Deucher <[email protected]>2025-07-11 17:31:14 +0000
committerAlex Deucher <[email protected]>2025-07-16 20:10:01 +0000
commite3f15cfd8b5dce72d3517c85b7eb6f6633905f6e (patch)
tree044f8a0da790353fa3a2903ab1b9a1f921ab0fe5 /drivers/gpu/drm/amd/amdgpu/jpeg_v3_0.c
parentdrm/amdgpu/vcn: don't enable per queue resets on SR-IOV (diff)
downloadkernel-e3f15cfd8b5dce72d3517c85b7eb6f6633905f6e.tar.gz
kernel-e3f15cfd8b5dce72d3517c85b7eb6f6633905f6e.zip
drm/amdgpu: clean up jpeg reset functions
Make them consistent and use the reset flags. Reviewed-by: Sathishkumar S <[email protected]> Acked-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/jpeg_v3_0.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/jpeg_v3_0.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/jpeg_v3_0.c b/drivers/gpu/drm/amd/amdgpu/jpeg_v3_0.c
index 5428930eafa3..5d54c882d889 100644
--- a/drivers/gpu/drm/amd/amdgpu/jpeg_v3_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/jpeg_v3_0.c
@@ -132,7 +132,8 @@ static int jpeg_v3_0_sw_init(struct amdgpu_ip_block *ip_block)
if (r)
return r;
- adev->jpeg.supported_reset = AMDGPU_RESET_TYPE_PER_QUEUE;
+ if (!amdgpu_sriov_vf(adev))
+ adev->jpeg.supported_reset = AMDGPU_RESET_TYPE_PER_QUEUE;
r = amdgpu_jpeg_sysfs_reset_mask_init(adev);
return r;
@@ -561,6 +562,9 @@ static int jpeg_v3_0_ring_reset(struct amdgpu_ring *ring,
{
int r;
+ if (!(ring->adev->jpeg.supported_reset & AMDGPU_RESET_TYPE_PER_QUEUE))
+ return -EOPNOTSUPP;
+
drm_sched_wqueue_stop(&ring->sched);
r = jpeg_v3_0_stop(ring->adev);
if (r)