diff options
author | Christian König <christian.koenig@amd.com> | 2018-10-30 08:06:22 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-11-05 14:21:29 -0500 |
commit | 725b2611781a513eeeae260bfdff4026ee8e3601 (patch) | |
tree | 04fa85ab10fd971ccdda04cfa1acc92964af8ca5 /drivers/gpu/drm/amd/amdgpu | |
parent | 9340c36ca5f80e0a75856cf0aeeb9e25ce7f9574 (diff) |
drm/amdgpu: cleanup uvd_v6_0_ring_test_ring
Accidentially missed during the last cleanup.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@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/uvd_v6_0.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c b/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c index 234bc91e91a8..7df41d1c818b 100644 --- a/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c +++ b/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | |||
@@ -947,11 +947,9 @@ static int uvd_v6_0_ring_test_ring(struct amdgpu_ring *ring) | |||
947 | 947 | ||
948 | WREG32(mmUVD_CONTEXT_ID, 0xCAFEDEAD); | 948 | WREG32(mmUVD_CONTEXT_ID, 0xCAFEDEAD); |
949 | r = amdgpu_ring_alloc(ring, 3); | 949 | r = amdgpu_ring_alloc(ring, 3); |
950 | if (r) { | 950 | if (r) |
951 | DRM_ERROR("amdgpu: cp failed to lock ring %d (%d).\n", | ||
952 | ring->idx, r); | ||
953 | return r; | 951 | return r; |
954 | } | 952 | |
955 | amdgpu_ring_write(ring, PACKET0(mmUVD_CONTEXT_ID, 0)); | 953 | amdgpu_ring_write(ring, PACKET0(mmUVD_CONTEXT_ID, 0)); |
956 | amdgpu_ring_write(ring, 0xDEADBEEF); | 954 | amdgpu_ring_write(ring, 0xDEADBEEF); |
957 | amdgpu_ring_commit(ring); | 955 | amdgpu_ring_commit(ring); |
@@ -962,14 +960,9 @@ static int uvd_v6_0_ring_test_ring(struct amdgpu_ring *ring) | |||
962 | DRM_UDELAY(1); | 960 | DRM_UDELAY(1); |
963 | } | 961 | } |
964 | 962 | ||
965 | if (i < adev->usec_timeout) { | 963 | if (i >= adev->usec_timeout) |
966 | DRM_DEBUG("ring test on %d succeeded in %d usecs\n", | 964 | r = -ETIMEDOUT; |
967 | ring->idx, i); | 965 | |
968 | } else { | ||
969 | DRM_ERROR("amdgpu: ring %d test failed (0x%08X)\n", | ||
970 | ring->idx, tmp); | ||
971 | r = -EINVAL; | ||
972 | } | ||
973 | return r; | 966 | return r; |
974 | } | 967 | } |
975 | 968 | ||