diff options
author | Xiangliang Yu <Xiangliang.Yu@amd.com> | 2017-04-06 09:43:48 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-04-29 00:32:15 +0300 |
commit | a2f537e03b678887fdd8d0810b03ecad01ba5d36 (patch) | |
tree | b9ed3d1c5891ce98f1d5282e4e02eab46e1c9d37 /drivers/gpu/drm/amd/amdgpu | |
parent | 71f2af890a337dec5a792846a9db36943651e4d0 (diff) | |
download | linux-a2f537e03b678887fdd8d0810b03ecad01ba5d36.tar.xz |
drm/amdgpu/vce4: workaround VCE ring test slow issue
Add VCE ring test slow workaround for SRIOV.
Signed-off-by: Frank Min <Frank.Min@amd.com>
Signed-off-by: Xiangliang Yu <Xiangliang.Yu@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c index c853400805d1..7a8eaeaae94a 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c @@ -955,7 +955,11 @@ int amdgpu_vce_ring_test_ring(struct amdgpu_ring *ring) struct amdgpu_device *adev = ring->adev; uint32_t rptr = amdgpu_ring_get_rptr(ring); unsigned i; - int r; + int r, timeout = adev->usec_timeout; + + /* workaround VCE ring test slow issue for sriov*/ + if (amdgpu_sriov_vf(adev)) + timeout *= 10; /* TODO: remove it if VCE can work for sriov */ if (amdgpu_sriov_vf(adev)) @@ -970,13 +974,13 @@ int amdgpu_vce_ring_test_ring(struct amdgpu_ring *ring) amdgpu_ring_write(ring, VCE_CMD_END); amdgpu_ring_commit(ring); - for (i = 0; i < adev->usec_timeout; i++) { + for (i = 0; i < timeout; i++) { if (amdgpu_ring_get_rptr(ring) != rptr) break; DRM_UDELAY(1); } - if (i < adev->usec_timeout) { + if (i < timeout) { DRM_INFO("ring test on %d succeeded in %d usecs\n", ring->idx, i); } else { |