diff options
author | Chunming Zhou <david1.zhou@amd.com> | 2015-08-03 01:11:04 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2015-08-17 16:50:51 -0400 |
commit | 0e3f154a9eb9f7a5ec365c4586a606ba882a3f15 (patch) | |
tree | 00e8c0f2ad43e943005e7f47ecb4392909fb48fe /drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | |
parent | bb1e38a4bead5025ecca90544f0f733f59996b13 (diff) |
drm/amdgpu: change uvd ib test to use kernel fence directly
Signed-off-by: Chunming Zhou <david1.zhou@amd.com>
Reviewed-by: Christian K?nig <christian.koenig@amd.com>
Reviewed-by: Jammy Zhou <jammy.zhou@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c index c1be7db36a69..9b2730599134 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | |||
@@ -288,7 +288,7 @@ void amdgpu_uvd_free_handles(struct amdgpu_device *adev, struct drm_file *filp) | |||
288 | for (i = 0; i < AMDGPU_MAX_UVD_HANDLES; ++i) { | 288 | for (i = 0; i < AMDGPU_MAX_UVD_HANDLES; ++i) { |
289 | uint32_t handle = atomic_read(&adev->uvd.handles[i]); | 289 | uint32_t handle = atomic_read(&adev->uvd.handles[i]); |
290 | if (handle != 0 && adev->uvd.filp[i] == filp) { | 290 | if (handle != 0 && adev->uvd.filp[i] == filp) { |
291 | struct amdgpu_fence *fence; | 291 | struct fence *fence; |
292 | 292 | ||
293 | amdgpu_uvd_note_usage(adev); | 293 | amdgpu_uvd_note_usage(adev); |
294 | 294 | ||
@@ -298,8 +298,8 @@ void amdgpu_uvd_free_handles(struct amdgpu_device *adev, struct drm_file *filp) | |||
298 | continue; | 298 | continue; |
299 | } | 299 | } |
300 | 300 | ||
301 | amdgpu_fence_wait(fence, false); | 301 | fence_wait(fence, false); |
302 | amdgpu_fence_unref(&fence); | 302 | fence_put(fence); |
303 | 303 | ||
304 | adev->uvd.filp[i] = NULL; | 304 | adev->uvd.filp[i] = NULL; |
305 | atomic_set(&adev->uvd.handles[i], 0); | 305 | atomic_set(&adev->uvd.handles[i], 0); |
@@ -819,7 +819,7 @@ static int amdgpu_uvd_free_job( | |||
819 | 819 | ||
820 | static int amdgpu_uvd_send_msg(struct amdgpu_ring *ring, | 820 | static int amdgpu_uvd_send_msg(struct amdgpu_ring *ring, |
821 | struct amdgpu_bo *bo, | 821 | struct amdgpu_bo *bo, |
822 | struct amdgpu_fence **fence) | 822 | struct fence **fence) |
823 | { | 823 | { |
824 | struct ttm_validate_buffer tv; | 824 | struct ttm_validate_buffer tv; |
825 | struct ww_acquire_ctx ticket; | 825 | struct ww_acquire_ctx ticket; |
@@ -876,7 +876,7 @@ static int amdgpu_uvd_send_msg(struct amdgpu_ring *ring, | |||
876 | ttm_eu_fence_buffer_objects(&ticket, &head, &ib->fence->base); | 876 | ttm_eu_fence_buffer_objects(&ticket, &head, &ib->fence->base); |
877 | 877 | ||
878 | if (fence) | 878 | if (fence) |
879 | *fence = amdgpu_fence_ref(ib->fence); | 879 | *fence = fence_get(&ib->fence->base); |
880 | amdgpu_bo_unref(&bo); | 880 | amdgpu_bo_unref(&bo); |
881 | 881 | ||
882 | if (amdgpu_enable_scheduler) | 882 | if (amdgpu_enable_scheduler) |
@@ -898,7 +898,7 @@ err: | |||
898 | crash the vcpu so just try to emmit a dummy create/destroy msg to | 898 | crash the vcpu so just try to emmit a dummy create/destroy msg to |
899 | avoid this */ | 899 | avoid this */ |
900 | int amdgpu_uvd_get_create_msg(struct amdgpu_ring *ring, uint32_t handle, | 900 | int amdgpu_uvd_get_create_msg(struct amdgpu_ring *ring, uint32_t handle, |
901 | struct amdgpu_fence **fence) | 901 | struct fence **fence) |
902 | { | 902 | { |
903 | struct amdgpu_device *adev = ring->adev; | 903 | struct amdgpu_device *adev = ring->adev; |
904 | struct amdgpu_bo *bo; | 904 | struct amdgpu_bo *bo; |
@@ -945,7 +945,7 @@ int amdgpu_uvd_get_create_msg(struct amdgpu_ring *ring, uint32_t handle, | |||
945 | } | 945 | } |
946 | 946 | ||
947 | int amdgpu_uvd_get_destroy_msg(struct amdgpu_ring *ring, uint32_t handle, | 947 | int amdgpu_uvd_get_destroy_msg(struct amdgpu_ring *ring, uint32_t handle, |
948 | struct amdgpu_fence **fence) | 948 | struct fence **fence) |
949 | { | 949 | { |
950 | struct amdgpu_device *adev = ring->adev; | 950 | struct amdgpu_device *adev = ring->adev; |
951 | struct amdgpu_bo *bo; | 951 | struct amdgpu_bo *bo; |