diff options
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c index e3281cacc586..0f6575e7ef8c 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | |||
| @@ -333,7 +333,7 @@ void amdgpu_uvd_free_handles(struct amdgpu_device *adev, struct drm_file *filp) | |||
| 333 | for (i = 0; i < adev->uvd.max_handles; ++i) { | 333 | for (i = 0; i < adev->uvd.max_handles; ++i) { |
| 334 | uint32_t handle = atomic_read(&adev->uvd.handles[i]); | 334 | uint32_t handle = atomic_read(&adev->uvd.handles[i]); |
| 335 | if (handle != 0 && adev->uvd.filp[i] == filp) { | 335 | if (handle != 0 && adev->uvd.filp[i] == filp) { |
| 336 | struct fence *fence; | 336 | struct dma_fence *fence; |
| 337 | 337 | ||
| 338 | r = amdgpu_uvd_get_destroy_msg(ring, handle, | 338 | r = amdgpu_uvd_get_destroy_msg(ring, handle, |
| 339 | false, &fence); | 339 | false, &fence); |
| @@ -342,8 +342,8 @@ void amdgpu_uvd_free_handles(struct amdgpu_device *adev, struct drm_file *filp) | |||
| 342 | continue; | 342 | continue; |
| 343 | } | 343 | } |
| 344 | 344 | ||
| 345 | fence_wait(fence, false); | 345 | dma_fence_wait(fence, false); |
| 346 | fence_put(fence); | 346 | dma_fence_put(fence); |
| 347 | 347 | ||
| 348 | adev->uvd.filp[i] = NULL; | 348 | adev->uvd.filp[i] = NULL; |
| 349 | atomic_set(&adev->uvd.handles[i], 0); | 349 | atomic_set(&adev->uvd.handles[i], 0); |
| @@ -909,14 +909,14 @@ int amdgpu_uvd_ring_parse_cs(struct amdgpu_cs_parser *parser, uint32_t ib_idx) | |||
| 909 | } | 909 | } |
| 910 | 910 | ||
| 911 | static int amdgpu_uvd_send_msg(struct amdgpu_ring *ring, struct amdgpu_bo *bo, | 911 | static int amdgpu_uvd_send_msg(struct amdgpu_ring *ring, struct amdgpu_bo *bo, |
| 912 | bool direct, struct fence **fence) | 912 | bool direct, struct dma_fence **fence) |
| 913 | { | 913 | { |
| 914 | struct ttm_validate_buffer tv; | 914 | struct ttm_validate_buffer tv; |
| 915 | struct ww_acquire_ctx ticket; | 915 | struct ww_acquire_ctx ticket; |
| 916 | struct list_head head; | 916 | struct list_head head; |
| 917 | struct amdgpu_job *job; | 917 | struct amdgpu_job *job; |
| 918 | struct amdgpu_ib *ib; | 918 | struct amdgpu_ib *ib; |
| 919 | struct fence *f = NULL; | 919 | struct dma_fence *f = NULL; |
| 920 | struct amdgpu_device *adev = ring->adev; | 920 | struct amdgpu_device *adev = ring->adev; |
| 921 | uint64_t addr; | 921 | uint64_t addr; |
| 922 | int i, r; | 922 | int i, r; |
| @@ -960,7 +960,7 @@ static int amdgpu_uvd_send_msg(struct amdgpu_ring *ring, struct amdgpu_bo *bo, | |||
| 960 | 960 | ||
| 961 | if (direct) { | 961 | if (direct) { |
| 962 | r = amdgpu_ib_schedule(ring, 1, ib, NULL, NULL, &f); | 962 | r = amdgpu_ib_schedule(ring, 1, ib, NULL, NULL, &f); |
| 963 | job->fence = fence_get(f); | 963 | job->fence = dma_fence_get(f); |
| 964 | if (r) | 964 | if (r) |
| 965 | goto err_free; | 965 | goto err_free; |
| 966 | 966 | ||
| @@ -975,9 +975,9 @@ static int amdgpu_uvd_send_msg(struct amdgpu_ring *ring, struct amdgpu_bo *bo, | |||
| 975 | ttm_eu_fence_buffer_objects(&ticket, &head, f); | 975 | ttm_eu_fence_buffer_objects(&ticket, &head, f); |
| 976 | 976 | ||
| 977 | if (fence) | 977 | if (fence) |
| 978 | *fence = fence_get(f); | 978 | *fence = dma_fence_get(f); |
| 979 | amdgpu_bo_unref(&bo); | 979 | amdgpu_bo_unref(&bo); |
| 980 | fence_put(f); | 980 | dma_fence_put(f); |
| 981 | 981 | ||
| 982 | return 0; | 982 | return 0; |
| 983 | 983 | ||
| @@ -993,7 +993,7 @@ err: | |||
| 993 | crash the vcpu so just try to emmit a dummy create/destroy msg to | 993 | crash the vcpu so just try to emmit a dummy create/destroy msg to |
| 994 | avoid this */ | 994 | avoid this */ |
| 995 | int amdgpu_uvd_get_create_msg(struct amdgpu_ring *ring, uint32_t handle, | 995 | int amdgpu_uvd_get_create_msg(struct amdgpu_ring *ring, uint32_t handle, |
| 996 | struct fence **fence) | 996 | struct dma_fence **fence) |
| 997 | { | 997 | { |
| 998 | struct amdgpu_device *adev = ring->adev; | 998 | struct amdgpu_device *adev = ring->adev; |
| 999 | struct amdgpu_bo *bo; | 999 | struct amdgpu_bo *bo; |
| @@ -1042,7 +1042,7 @@ int amdgpu_uvd_get_create_msg(struct amdgpu_ring *ring, uint32_t handle, | |||
| 1042 | } | 1042 | } |
| 1043 | 1043 | ||
| 1044 | int amdgpu_uvd_get_destroy_msg(struct amdgpu_ring *ring, uint32_t handle, | 1044 | int amdgpu_uvd_get_destroy_msg(struct amdgpu_ring *ring, uint32_t handle, |
| 1045 | bool direct, struct fence **fence) | 1045 | bool direct, struct dma_fence **fence) |
| 1046 | { | 1046 | { |
| 1047 | struct amdgpu_device *adev = ring->adev; | 1047 | struct amdgpu_device *adev = ring->adev; |
| 1048 | struct amdgpu_bo *bo; | 1048 | struct amdgpu_bo *bo; |
| @@ -1128,7 +1128,7 @@ void amdgpu_uvd_ring_end_use(struct amdgpu_ring *ring) | |||
| 1128 | */ | 1128 | */ |
| 1129 | int amdgpu_uvd_ring_test_ib(struct amdgpu_ring *ring, long timeout) | 1129 | int amdgpu_uvd_ring_test_ib(struct amdgpu_ring *ring, long timeout) |
| 1130 | { | 1130 | { |
| 1131 | struct fence *fence; | 1131 | struct dma_fence *fence; |
| 1132 | long r; | 1132 | long r; |
| 1133 | 1133 | ||
| 1134 | r = amdgpu_uvd_get_create_msg(ring, 1, NULL); | 1134 | r = amdgpu_uvd_get_create_msg(ring, 1, NULL); |
| @@ -1143,7 +1143,7 @@ int amdgpu_uvd_ring_test_ib(struct amdgpu_ring *ring, long timeout) | |||
| 1143 | goto error; | 1143 | goto error; |
| 1144 | } | 1144 | } |
| 1145 | 1145 | ||
| 1146 | r = fence_wait_timeout(fence, false, timeout); | 1146 | r = dma_fence_wait_timeout(fence, false, timeout); |
| 1147 | if (r == 0) { | 1147 | if (r == 0) { |
| 1148 | DRM_ERROR("amdgpu: IB test timed out.\n"); | 1148 | DRM_ERROR("amdgpu: IB test timed out.\n"); |
| 1149 | r = -ETIMEDOUT; | 1149 | r = -ETIMEDOUT; |
| @@ -1154,7 +1154,7 @@ int amdgpu_uvd_ring_test_ib(struct amdgpu_ring *ring, long timeout) | |||
| 1154 | r = 0; | 1154 | r = 0; |
| 1155 | } | 1155 | } |
| 1156 | 1156 | ||
| 1157 | fence_put(fence); | 1157 | dma_fence_put(fence); |
| 1158 | 1158 | ||
| 1159 | error: | 1159 | error: |
| 1160 | return r; | 1160 | return r; |
