From: Chunming Zhou Date: Thu, 30 Jun 2016 07:02:26 +0000 (+0800) Subject: drm/amdgpu: ib test first after gpu reset X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=1f465087219e00042186210a66b7181db48286be;p=linux-beck.git drm/amdgpu: ib test first after gpu reset Signed-off-by: Chunming Zhou Reviewed-by: Christian König Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index 5ec4ea060bd0..29ccd7ca8bc7 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -1987,6 +1987,16 @@ retry: /* restore scratch */ amdgpu_atombios_scratch_regs_restore(adev); if (!r) { + r = amdgpu_ib_ring_tests(adev); + if (r) { + dev_err(adev->dev, "ib ring test failed (%d).\n", r); + if (saved) { + saved = false; + r = amdgpu_suspend(adev); + goto retry; + } + } + for (i = 0; i < AMDGPU_MAX_RINGS; ++i) { struct amdgpu_ring *ring = adev->rings[i]; if (!ring) @@ -1997,16 +2007,6 @@ retry: ring_sizes[i] = 0; ring_data[i] = NULL; } - - r = amdgpu_ib_ring_tests(adev); - if (r) { - dev_err(adev->dev, "ib ring test failed (%d).\n", r); - if (saved) { - saved = false; - r = amdgpu_suspend(adev); - goto retry; - } - } } else { dev_err(adev->dev, "asic resume failed (%d).\n", r); for (i = 0; i < AMDGPU_MAX_RINGS; ++i) {