aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
index aabaf2f92575..d97b962bc3de 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
@@ -794,7 +794,6 @@ static int gfx_v8_0_ring_test_ib(struct amdgpu_ring *ring)
794 struct fence *f = NULL; 794 struct fence *f = NULL;
795 uint32_t scratch; 795 uint32_t scratch;
796 uint32_t tmp = 0; 796 uint32_t tmp = 0;
797 unsigned i;
798 int r; 797 int r;
799 798
800 r = amdgpu_gfx_scratch_get(adev, &scratch); 799 r = amdgpu_gfx_scratch_get(adev, &scratch);
@@ -823,23 +822,15 @@ static int gfx_v8_0_ring_test_ib(struct amdgpu_ring *ring)
823 DRM_ERROR("amdgpu: fence wait failed (%d).\n", r); 822 DRM_ERROR("amdgpu: fence wait failed (%d).\n", r);
824 goto err2; 823 goto err2;
825 } 824 }
826 for (i = 0; i < adev->usec_timeout; i++) { 825 tmp = RREG32(scratch);
827 tmp = RREG32(scratch); 826 if (tmp == 0xDEADBEEF) {
828 if (tmp == 0xDEADBEEF) 827 DRM_INFO("ib test on ring %d succeeded\n", ring->idx);
829 break;
830 DRM_UDELAY(1);
831 }
832 if (i < adev->usec_timeout) {
833 DRM_INFO("ib test on ring %d succeeded in %u usecs\n",
834 ring->idx, i);
835 goto err2;
836 } else { 828 } else {
837 DRM_ERROR("amdgpu: ib test failed (scratch(0x%04X)=0x%08X)\n", 829 DRM_ERROR("amdgpu: ib test failed (scratch(0x%04X)=0x%08X)\n",
838 scratch, tmp); 830 scratch, tmp);
839 r = -EINVAL; 831 r = -EINVAL;
840 } 832 }
841err2: 833err2:
842 fence_put(f);
843 amdgpu_ib_free(adev, &ib, NULL); 834 amdgpu_ib_free(adev, &ib, NULL);
844 fence_put(f); 835 fence_put(f);
845err1: 836err1:
@@ -1729,7 +1720,6 @@ static int gfx_v8_0_do_edc_gpr_workarounds(struct amdgpu_device *adev)
1729 RREG32(sec_ded_counter_registers[i]); 1720 RREG32(sec_ded_counter_registers[i]);
1730 1721
1731fail: 1722fail:
1732 fence_put(f);
1733 amdgpu_ib_free(adev, &ib, NULL); 1723 amdgpu_ib_free(adev, &ib, NULL);
1734 fence_put(f); 1724 fence_put(f);
1735 1725