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

Fixes: d1a46cdd0053 ("drm/amd: Add per-ring reset for vcn v4.0.5 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_v4_0_5.c

index 7e37ddea63550d89b0e0a7933735cd26feec989c..6000c528ad6aecea825c88f88d851fe49e01c2a3 100644 (file)
@@ -1477,8 +1477,12 @@ static int vcn_v4_0_5_ring_reset(struct amdgpu_ring *ring,
                return -EOPNOTSUPP;
 
        drm_sched_wqueue_stop(&ring->sched);
-       vcn_v4_0_5_stop(vinst);
-       vcn_v4_0_5_start(vinst);
+       r = vcn_v4_0_5_stop(vinst);
+       if (r)
+               return r;
+       r = vcn_v4_0_5_start(vinst);
+       if (r)
+               return r;
 
        r = amdgpu_ring_test_helper(ring);
        if (r)