aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_1.c
diff options
context:
space:
mode:
authorAlex Deucher <[email protected]>2025-05-29 16:58:53 +0000
committerAlex Deucher <[email protected]>2025-06-30 15:57:29 +0000
commit2dee58ca471dae05c473270d0fb74efe01a78ccb (patch)
tree6ac95b2ad849e720ed200a4a0705c922f1e7bec2 /drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_1.c
parentdrm/amdgpu: rework queue reset scheduler interaction (diff)
downloadkernel-2dee58ca471dae05c473270d0fb74efe01a78ccb.tar.gz
kernel-2dee58ca471dae05c473270d0fb74efe01a78ccb.zip
drm/amdgpu: move force completion into ring resets
Move the force completion handling into each ring reset function so that each engine can determine whether or not it needs to force completion on the jobs in the ring. Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_1.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_1.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_1.c b/drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_1.c
index aee4f50a0f52..e7f942dc714a 100644
--- a/drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_1.c
+++ b/drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_1.c
@@ -838,12 +838,18 @@ static int jpeg_v5_0_1_ring_reset(struct amdgpu_ring *ring,
unsigned int vmid,
struct amdgpu_fence *timedout_fence)
{
+ int r;
+
if (amdgpu_sriov_vf(ring->adev))
return -EOPNOTSUPP;
jpeg_v5_0_1_core_stall_reset(ring);
jpeg_v5_0_1_init_jrbc(ring);
- return amdgpu_ring_test_helper(ring);
+ r = amdgpu_ring_test_helper(ring);
+ if (r)
+ return r;
+ amdgpu_fence_driver_force_completion(ring);
+ return 0;
}
static const struct amd_ip_funcs jpeg_v5_0_1_ip_funcs = {