aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Deucher <[email protected]>2025-07-07 14:52:49 +0000
committerAlex Deucher <[email protected]>2025-07-16 20:08:17 +0000
commitc9bfafc1a672978b7608fcfb5f498ea1acf4dd24 (patch)
tree23d2bbb0d4a877fdd15cac1d69ea67ac34c2bdfb
parentdrm/amdgpu: clean up sdma reset functions (diff)
downloadkernel-c9bfafc1a672978b7608fcfb5f498ea1acf4dd24.tar.gz
kernel-c9bfafc1a672978b7608fcfb5f498ea1acf4dd24.zip
drm/amdgpu/jpeg2: add additional ring reset error checking
Start and stop can fail, so add checks. Fixes: 500c04d2a708 ("drm/amdgpu: Add ring reset callback for JPEG2_0_0") Reviewed-by: Sathishkumar S <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: Sathishkumar S <[email protected]>
-rw-r--r--drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c b/drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c
index 781a5a8a8361..5ba1c5ad9a5e 100644
--- a/drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c
@@ -771,8 +771,12 @@ static int jpeg_v2_0_ring_reset(struct amdgpu_ring *ring,
int r;
drm_sched_wqueue_stop(&ring->sched);
- jpeg_v2_0_stop(ring->adev);
- jpeg_v2_0_start(ring->adev);
+ r = jpeg_v2_0_stop(ring->adev);
+ if (r)
+ return r;
+ r = jpeg_v2_0_start(ring->adev);
+ if (r)
+ return r;
r = amdgpu_ring_test_helper(ring);
if (r)
return r;