This patch series is :-
Reviewed-by: Sathishkumar S <[email protected]>
One nit-pick, amdgpu_ring_backup_unprocessed_commands function could use
amdgpu_fence instead of dma_fence as argument.
And JPEG/VCN changes in this series are also :-
Tested-by: Sathishkumar S <[email protected]>
Note:
JPEG5 and JPEG4_0_5 reset fails due to DPG mode, they work fine in
non-dpg, failure is not related this series.
Couldn't test JPEG4_0_3 and VCN4_0_3, but the changes look good.
Regards,
Sathish
On 6/6/2025 12:13 PM, Alex Deucher wrote:
Re-emit the unprocessed state after resetting the queue.
Signed-off-by: Alex Deucher <[email protected]>
---
drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c
b/drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c
index d74c1862ac860..208b366c580da 100644
--- a/drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c
@@ -1202,15 +1202,23 @@ static int vcn_v5_0_0_ring_reset(struct amdgpu_ring
*ring,
if (!(adev->vcn.supported_reset & AMDGPU_RESET_TYPE_PER_QUEUE))
return -EOPNOTSUPP;
+ amdgpu_ring_backup_unprocessed_commands(ring, &job->hw_fence.base, true);
+
vcn_v5_0_0_stop(vinst);
vcn_v5_0_0_start(vinst);
-
- r = amdgpu_ring_test_helper(ring);
+ r = amdgpu_ring_test_ring(ring);
if (r)
return r;
+
dma_fence_set_error(&job->base.s_fence->finished, -ETIME);
- amdgpu_fence_driver_force_completion(ring);
+ /* signal the fence of the bad job */
+ amdgpu_fence_driver_guilty_force_completion(&job->hw_fence.base);
atomic_inc(&ring->adev->gpu_reset_counter);
+ r = amdgpu_ring_reemit_unprocessed_commands(ring);
+ if (r)
+ /* if we fail to reemit, force complete all fences */
+ amdgpu_fence_driver_force_completion(ring);
+
return 0;
}