Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amdgpu: record error code when ring test failed

Otherwise we may miss errors.

Signed-off-by: Chunming Zhou <David1.Zhou@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org

authored by

Chunming Zhou and committed by
Alex Deucher
1f703e66 53960b4f

+3 -2
+3 -2
drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
··· 280 280 int amdgpu_ib_ring_tests(struct amdgpu_device *adev) 281 281 { 282 282 unsigned i; 283 - int r; 283 + int r, ret = 0; 284 284 285 285 for (i = 0; i < AMDGPU_MAX_RINGS; ++i) { 286 286 struct amdgpu_ring *ring = adev->rings[i]; ··· 301 301 } else { 302 302 /* still not good, but we can live with it */ 303 303 DRM_ERROR("amdgpu: failed testing IB on ring %d (%d).\n", i, r); 304 + ret = r; 304 305 } 305 306 } 306 307 } 307 - return 0; 308 + return ret; 308 309 } 309 310 310 311 /*