Commit 1f703e66 authored by Chunming Zhou's avatar Chunming Zhou Committed by Alex Deucher

drm/amdgpu: record error code when ring test failed

Otherwise we may miss errors.
Signed-off-by: default avatarChunming Zhou <David1.Zhou@amd.com>
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
parent 53960b4f
...@@ -280,7 +280,7 @@ void amdgpu_ib_pool_fini(struct amdgpu_device *adev) ...@@ -280,7 +280,7 @@ void amdgpu_ib_pool_fini(struct amdgpu_device *adev)
int amdgpu_ib_ring_tests(struct amdgpu_device *adev) int amdgpu_ib_ring_tests(struct amdgpu_device *adev)
{ {
unsigned i; unsigned i;
int r; int r, ret = 0;
for (i = 0; i < AMDGPU_MAX_RINGS; ++i) { for (i = 0; i < AMDGPU_MAX_RINGS; ++i) {
struct amdgpu_ring *ring = adev->rings[i]; struct amdgpu_ring *ring = adev->rings[i];
...@@ -301,10 +301,11 @@ int amdgpu_ib_ring_tests(struct amdgpu_device *adev) ...@@ -301,10 +301,11 @@ int amdgpu_ib_ring_tests(struct amdgpu_device *adev)
} else { } else {
/* still not good, but we can live with it */ /* still not good, but we can live with it */
DRM_ERROR("amdgpu: failed testing IB on ring %d (%d).\n", i, r); DRM_ERROR("amdgpu: failed testing IB on ring %d (%d).\n", i, r);
ret = r;
} }
} }
} }
return 0; return ret;
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment