summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
diff options
context:
space:
mode:
authorDave Airlie2016-07-27 21:51:39 +0200
committerDave Airlie2016-07-27 21:51:39 +0200
commit162b20d2f9ef9dfa833cc329b1e8957beb672349 (patch)
tree5d043eae378bfb89d6bb9b2018c28537aa28387a /drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
parentMerge tag 'drm-intel-next-fixes-2016-07-25' of git://anongit.freedesktop.org/... (diff)
parentdrm/amdgpu: comment out unused defaults_bonaire_pro static const structures to (diff)
downloadkernel-qcow2-linux-162b20d2f9ef9dfa833cc329b1e8957beb672349.tar.gz
kernel-qcow2-linux-162b20d2f9ef9dfa833cc329b1e8957beb672349.tar.xz
kernel-qcow2-linux-162b20d2f9ef9dfa833cc329b1e8957beb672349.zip
Merge branch 'drm-next-4.8' of git://people.freedesktop.org/~agd5f/linux into drm-next
A few more patches for 4.8. Mostly bug fixes and some prep work for iceland powerplay support. I have a couple polaris patches and Edward's misc cleanups that require a merge with Linus'. I don't know if you are planning a merge anytime soon. [airlied: fixed up endian vs 32-bit change in ppatomctrl] * 'drm-next-4.8' of git://people.freedesktop.org/~agd5f/linux: (26 commits) drm/amdgpu: comment out unused defaults_bonaire_pro static const structures to fix the build drm/amdgpu: temporary comment out unused static const structures to fix the build drm/amdgpu: S3 resume fail on Polaris10 drm/amd/powerplay: add pp_tables_get_response_times function in process pptables drm/amd/powerplay: fix the incorrect return value drm/amd/powerplay: add atomctrl_get_voltage_evv function in ppatomctrl drm/amdgpu: add new definitions into ppsmc.h for iceland drm/amd/powerplay: add SMU register macro for future use drm/amdgpu: add ucode_start_address into cgs_firmware_info drm/amdgpu: no need load microcode at sdma if powerplay is enabled drm/amdgpu: rename smumgr to smum for dpm drm/amdgpu: disable GFX PG on CZ/BR/ST drivers: gpu: drm: amd: powerplay: hwmgr: Remove unused variable drm/amdgpu: return -ENOSPC when running out of UVD handles drm/amdgpu: trace need_flush in grab_vm as well drm/amdgpu: always signal all fences drm/amdgpu: check flush fence context instead of same ring v2 drm/radeon: support backlight control for UNIPHY3 drm/amdgpu: support backlight control for UNIPHY3 drm/amdgpu: remove usec timeout loop from IB tests ...
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)
struct fence *f = NULL;
uint32_t scratch;
uint32_t tmp = 0;
- unsigned i;
int r;
r = amdgpu_gfx_scratch_get(adev, &scratch);
@@ -823,23 +822,15 @@ static int gfx_v8_0_ring_test_ib(struct amdgpu_ring *ring)
DRM_ERROR("amdgpu: fence wait failed (%d).\n", r);
goto err2;
}
- for (i = 0; i < adev->usec_timeout; i++) {
- tmp = RREG32(scratch);
- if (tmp == 0xDEADBEEF)
- break;
- DRM_UDELAY(1);
- }
- if (i < adev->usec_timeout) {
- DRM_INFO("ib test on ring %d succeeded in %u usecs\n",
- ring->idx, i);
- goto err2;
+ tmp = RREG32(scratch);
+ if (tmp == 0xDEADBEEF) {
+ DRM_INFO("ib test on ring %d succeeded\n", ring->idx);
} else {
DRM_ERROR("amdgpu: ib test failed (scratch(0x%04X)=0x%08X)\n",
scratch, tmp);
r = -EINVAL;
}
err2:
- fence_put(f);
amdgpu_ib_free(adev, &ib, NULL);
fence_put(f);
err1:
@@ -1729,7 +1720,6 @@ static int gfx_v8_0_do_edc_gpr_workarounds(struct amdgpu_device *adev)
RREG32(sec_ded_counter_registers[i]);
fail:
- fence_put(f);
amdgpu_ib_free(adev, &ib, NULL);
fence_put(f);