[PATCH 07/12] drm/amdgpu: add uvd timeout time.

Rex Zhu Rex.Zhu at amd.com
Thu Jan 26 11:00:33 UTC 2017


in dpm disabled case, we need to wait for more time.
otherwise, uvd can't be initialized in bonarie/hawaii.

Signed-off-by: Rex Zhu <Rex.Zhu at amd.com>
Acked-by: Alex Deucher <alexander.deucher at amd.com>

Change-Id: Ia014a1b1b0ddff48c86309477e8aaf8b8f81d881
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 3 +--
 drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c   | 4 +---
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
index 02b8613..f8aeeec 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
@@ -1170,8 +1170,7 @@ int amdgpu_uvd_ring_test_ib(struct amdgpu_ring *ring, long timeout)
 		DRM_ERROR("amdgpu: failed to get destroy ib (%ld).\n", r);
 		goto error;
 	}
-
-	r = fence_wait_timeout(fence, false, timeout);
+	r = fence_wait_timeout(fence, false, timeout*10);
 	if (r == 0) {
 		DRM_ERROR("amdgpu: IB test timed out.\n");
 		r = -ETIMEDOUT;
diff --git a/drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c b/drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c
index f15df99..1bccda5 100644
--- a/drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c
+++ b/drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c
@@ -320,11 +320,9 @@ static int uvd_v4_2_start(struct amdgpu_device *adev)
 
 	WREG32_P(mmUVD_SOFT_RESET, 0, ~UVD_SOFT_RESET__VCPU_SOFT_RESET_MASK);
 
-	mdelay(10);
-
 	for (i = 0; i < 10; ++i) {
 		uint32_t status;
-		for (j = 0; j < 100; ++j) {
+		for (j = 0; j < 1000; ++j) {
 			status = RREG32(mmUVD_STATUS);
 			if (status & 2)
 				break;
-- 
1.9.1



More information about the amd-gfx mailing list