]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/amdgpu/vcn5: add additional ring reset error checking
authorAlex Deucher <alexander.deucher@amd.com>
Mon, 7 Jul 2025 15:30:14 +0000 (11:30 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 15 Jul 2025 18:07:43 +0000 (14:07 -0400)
Start and stop can fail, so add checks.

Fixes: b54695dae995 ("drm/amd: Add per-ring reset for vcn v5.0.0 use")
Reviewed-by: Mario Limonciello <mari.limonciello@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: Mario Limonciello <mario.limonciello@amd.com>
drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c

index 47c0bcc9e7d801e4ca9ff9f64cb9004ea9e901b5..3d3b4254bd729fbf1f760b0b08d71c478ed607a8 100644 (file)
@@ -1204,8 +1204,12 @@ static int vcn_v5_0_0_ring_reset(struct amdgpu_ring *ring,
                return -EOPNOTSUPP;
 
        drm_sched_wqueue_stop(&ring->sched);
-       vcn_v5_0_0_stop(vinst);
-       vcn_v5_0_0_start(vinst);
+       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)