]> git.karo-electronics.de Git - linux-beck.git/commitdiff
drm/amdgpu: ib test first after gpu reset
authorChunming Zhou <David1.Zhou@amd.com>
Thu, 30 Jun 2016 07:02:26 +0000 (15:02 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 7 Jul 2016 19:06:18 +0000 (15:06 -0400)
Signed-off-by: Chunming Zhou <David1.Zhou@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

index 5ec4ea060bd045b5264661cd71861c9a4ec8e239..29ccd7ca8bc7aaa66e2a44ebd553d04baacf8cb0 100644 (file)
@@ -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) {