aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2018-10-29 05:48:31 -0400
committerAlex Deucher <alexander.deucher@amd.com>2018-11-05 14:21:25 -0500
commitdc9eeff84c77080f545575a30062af0ac65b1eb0 (patch)
treef426bd63d15eac17f1ce7119bffa22d92f7556cf /drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c
parente4312d459a2e572e093c758793bd5357d6bddfd1 (diff)
drm/amdgpu: further ring test cleanups
Move all error messages from IP specific code into the common helper. This way we now uses the ring name in the messages instead of the index and note which device is affected as well. Also cleanup error handling in the IP specific code and consequently use ETIMEDOUT when the ring test timed out. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c
index 3c89c8aa33d8..5b75bdc8dc28 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c
@@ -512,11 +512,17 @@ static void amdgpu_debugfs_ring_fini(struct amdgpu_ring *ring)
512 */ 512 */
513int amdgpu_ring_test_helper(struct amdgpu_ring *ring) 513int amdgpu_ring_test_helper(struct amdgpu_ring *ring)
514{ 514{
515 struct amdgpu_device *adev = ring->adev;
515 int r; 516 int r;
516 517
517 r = amdgpu_ring_test_ring(ring); 518 r = amdgpu_ring_test_ring(ring);
519 if (r)
520 DRM_DEV_ERROR(adev->dev, "ring %s test failed (%d)\n",
521 ring->name, r);
522 else
523 DRM_DEV_DEBUG(adev->dev, "ring test on %s succeeded\n",
524 ring->name);
518 525
519 ring->sched.ready = !r; 526 ring->sched.ready = !r;
520
521 return r; 527 return r;
522} 528}