]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/amdgpu/vcn5: re-emit unprocessed state on ring reset
authorAlex Deucher <alexander.deucher@amd.com>
Thu, 29 May 2025 19:26:37 +0000 (15:26 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 16 Jul 2025 20:16:55 +0000 (16:16 -0400)
Re-emit the unprocessed state after resetting the queue.

Reviewed-by: Sathishkumar S <sathishkumar.sundararaju@amd.com>
Tested-by: Sathishkumar S <sathishkumar.sundararaju@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c

index a137bef918ed55da7fa84cde42b8aed153c5a807..ec0268b5666cc73c7367c06913d07407e053f4b8 100644 (file)
@@ -1204,20 +1204,14 @@ static int vcn_v5_0_0_ring_reset(struct amdgpu_ring *ring,
        if (!(adev->vcn.supported_reset & AMDGPU_RESET_TYPE_PER_QUEUE))
                return -EOPNOTSUPP;
 
-       drm_sched_wqueue_stop(&ring->sched);
+       amdgpu_ring_reset_helper_begin(ring, timedout_fence);
        r = vcn_v5_0_0_stop(vinst);
        if (r)
                return r;
        r = vcn_v5_0_0_start(vinst);
        if (r)
                return r;
-
-       r = amdgpu_ring_test_helper(ring);
-       if (r)
-               return r;
-       amdgpu_fence_driver_force_completion(ring);
-       drm_sched_wqueue_start(&ring->sched);
-       return 0;
+       return amdgpu_ring_reset_helper_end(ring, timedout_fence);
 }
 
 static const struct amdgpu_ring_funcs vcn_v5_0_0_unified_ring_vm_funcs = {