drm/amdgpu/gfx7: Return error code when compute ring tests fail

The gfx_v7_0_cp_compute_resume() function should only return
success when all compute rings are actually functional.
This will be especially important for soft reset which needs
this to know whether the reset was successful.

Note that the gfx_v8_0_cp_test_all_rings() function already
does this on GFX8, here we just follow the same idea.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Timur Kristóf 2026-07-21 13:43:16 +02:00 committed by Alex Deucher
parent 8107ad93b6
commit c93962a688

View File

@ -3020,12 +3020,14 @@ static int gfx_v7_0_cp_compute_resume(struct amdgpu_device *adev)
gfx_v7_0_cp_compute_enable(adev, true);
r = 0;
for (i = 0; i < adev->gfx.num_compute_rings; i++) {
ring = &adev->gfx.compute_ring[i];
amdgpu_ring_test_helper(ring);
r |= amdgpu_ring_test_helper(ring);
}
return 0;
return r;
}
static void gfx_v7_0_cp_enable(struct amdgpu_device *adev, bool enable)