aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2016-10-27 21:33:52 -0400
committerDave Airlie <airlied@redhat.com>2016-10-27 21:33:52 -0400
commit220196b38483be6d84a295d318d48595f65da443 (patch)
treef91c2e6e64ef59afdc075d843d51f23369e9164a /drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
parenta1873c62710b23e9afbd2faeed5f28649cbe4739 (diff)
parent56df51d003203f1c3a8eab05605973515aa15feb (diff)
Merge tag 'topic/drm-misc-2016-10-27' of git://anongit.freedesktop.org/git/drm-intel into drm-next
Pull request already again to get the s/fence/dma_fence/ stuff in and allow everyone to resync. Otherwise really just misc stuff all over, and a new bridge driver. * tag 'topic/drm-misc-2016-10-27' of git://anongit.freedesktop.org/git/drm-intel: drm/bridge: fix platform_no_drv_owner.cocci warnings drm/bridge: fix semicolon.cocci warnings drm: Print some debug/error info during DP dual mode detect drm: mark drm_of_component_match_add dummy inline drm/bridge: add Silicon Image SiI8620 driver dt-bindings: add Silicon Image SiI8620 bridge bindings video: add header file for Mobile High-Definition Link (MHL) interface drm: convert DT component matching to component_match_add_release() dma-buf: Rename struct fence to dma_fence dma-buf/fence: add an lockdep_assert_held() drm/dp: Factor out helper to distinguish between branch and sink devices drm/edid: Only print the bad edid when aborting drm/msm: add missing header dependencies drm/msm/adreno: move function declarations to header file drm/i2c/tda998x: mark symbol static where possible doc: add missing docbook parameter for fence-array drm: RIP mode_config->rotation_property drm/msm/mdp5: Advertize 180 degree rotation drm/msm/mdp5: Use per-plane rotation property
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
index f1a206df9823..1821c05484d0 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
@@ -287,7 +287,7 @@ static int amdgpu_move_blit(struct ttm_buffer_object *bo,
287 struct drm_mm_node *old_mm, *new_mm; 287 struct drm_mm_node *old_mm, *new_mm;
288 uint64_t old_start, old_size, new_start, new_size; 288 uint64_t old_start, old_size, new_start, new_size;
289 unsigned long num_pages; 289 unsigned long num_pages;
290 struct fence *fence = NULL; 290 struct dma_fence *fence = NULL;
291 int r; 291 int r;
292 292
293 BUILD_BUG_ON((PAGE_SIZE % AMDGPU_GPU_PAGE_SIZE) != 0); 293 BUILD_BUG_ON((PAGE_SIZE % AMDGPU_GPU_PAGE_SIZE) != 0);
@@ -313,7 +313,7 @@ static int amdgpu_move_blit(struct ttm_buffer_object *bo,
313 num_pages = new_mem->num_pages; 313 num_pages = new_mem->num_pages;
314 while (num_pages) { 314 while (num_pages) {
315 unsigned long cur_pages = min(old_size, new_size); 315 unsigned long cur_pages = min(old_size, new_size);
316 struct fence *next; 316 struct dma_fence *next;
317 317
318 r = amdgpu_copy_buffer(ring, old_start, new_start, 318 r = amdgpu_copy_buffer(ring, old_start, new_start,
319 cur_pages * PAGE_SIZE, 319 cur_pages * PAGE_SIZE,
@@ -321,7 +321,7 @@ static int amdgpu_move_blit(struct ttm_buffer_object *bo,
321 if (r) 321 if (r)
322 goto error; 322 goto error;
323 323
324 fence_put(fence); 324 dma_fence_put(fence);
325 fence = next; 325 fence = next;
326 326
327 num_pages -= cur_pages; 327 num_pages -= cur_pages;
@@ -353,13 +353,13 @@ static int amdgpu_move_blit(struct ttm_buffer_object *bo,
353 } 353 }
354 354
355 r = ttm_bo_pipeline_move(bo, fence, evict, new_mem); 355 r = ttm_bo_pipeline_move(bo, fence, evict, new_mem);
356 fence_put(fence); 356 dma_fence_put(fence);
357 return r; 357 return r;
358 358
359error: 359error:
360 if (fence) 360 if (fence)
361 fence_wait(fence, false); 361 dma_fence_wait(fence, false);
362 fence_put(fence); 362 dma_fence_put(fence);
363 return r; 363 return r;
364} 364}
365 365
@@ -1316,7 +1316,7 @@ int amdgpu_copy_buffer(struct amdgpu_ring *ring,
1316 uint64_t dst_offset, 1316 uint64_t dst_offset,
1317 uint32_t byte_count, 1317 uint32_t byte_count,
1318 struct reservation_object *resv, 1318 struct reservation_object *resv,
1319 struct fence **fence, bool direct_submit) 1319 struct dma_fence **fence, bool direct_submit)
1320{ 1320{
1321 struct amdgpu_device *adev = ring->adev; 1321 struct amdgpu_device *adev = ring->adev;
1322 struct amdgpu_job *job; 1322 struct amdgpu_job *job;
@@ -1363,7 +1363,7 @@ int amdgpu_copy_buffer(struct amdgpu_ring *ring,
1363 if (direct_submit) { 1363 if (direct_submit) {
1364 r = amdgpu_ib_schedule(ring, job->num_ibs, job->ibs, 1364 r = amdgpu_ib_schedule(ring, job->num_ibs, job->ibs,
1365 NULL, NULL, fence); 1365 NULL, NULL, fence);
1366 job->fence = fence_get(*fence); 1366 job->fence = dma_fence_get(*fence);
1367 if (r) 1367 if (r)
1368 DRM_ERROR("Error scheduling IBs (%d)\n", r); 1368 DRM_ERROR("Error scheduling IBs (%d)\n", r);
1369 amdgpu_job_free(job); 1369 amdgpu_job_free(job);
@@ -1384,7 +1384,7 @@ error_free:
1384int amdgpu_fill_buffer(struct amdgpu_bo *bo, 1384int amdgpu_fill_buffer(struct amdgpu_bo *bo,
1385 uint32_t src_data, 1385 uint32_t src_data,
1386 struct reservation_object *resv, 1386 struct reservation_object *resv,
1387 struct fence **fence) 1387 struct dma_fence **fence)
1388{ 1388{
1389 struct amdgpu_device *adev = amdgpu_ttm_adev(bo->tbo.bdev); 1389 struct amdgpu_device *adev = amdgpu_ttm_adev(bo->tbo.bdev);
1390 struct amdgpu_job *job; 1390 struct amdgpu_job *job;