aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/ttm
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2016-04-06 05:12:03 -0400
committerAlex Deucher <alexander.deucher@amd.com>2016-05-04 20:21:21 -0400
commitdfd5e50ea43ca4a89de061fb69618299760eb682 (patch)
tree85fd07aa14292b45fb8c4056cc5a4fa75cde5d17 /drivers/gpu/drm/ttm
parent5ee7b41a8b83e5d73d8b0725561ba43de5cb9443 (diff)
drm/ttm: remove use_ticket parameter from ttm_bo_reserve
Not used any more. Reviewed-by: Sinclair Yeh <syeh@vmware.com> 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/ttm')
-rw-r--r--drivers/gpu/drm/ttm/ttm_bo.c17
-rw-r--r--drivers/gpu/drm/ttm/ttm_bo_vm.c2
-rw-r--r--drivers/gpu/drm/ttm/ttm_execbuf_util.c3
3 files changed, 10 insertions, 12 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
index c1f22cb3ea43..75f04b5f8c09 100644
--- a/drivers/gpu/drm/ttm/ttm_bo.c
+++ b/drivers/gpu/drm/ttm/ttm_bo.c
@@ -452,7 +452,7 @@ static void ttm_bo_cleanup_refs_or_queue(struct ttm_buffer_object *bo)
452 int ret; 452 int ret;
453 453
454 spin_lock(&glob->lru_lock); 454 spin_lock(&glob->lru_lock);
455 ret = __ttm_bo_reserve(bo, false, true, false, NULL); 455 ret = __ttm_bo_reserve(bo, false, true, NULL);
456 456
457 if (!ret) { 457 if (!ret) {
458 if (!ttm_bo_wait(bo, false, false, true)) { 458 if (!ttm_bo_wait(bo, false, false, true)) {
@@ -526,7 +526,7 @@ static int ttm_bo_cleanup_refs_and_unlock(struct ttm_buffer_object *bo,
526 return -EBUSY; 526 return -EBUSY;
527 527
528 spin_lock(&glob->lru_lock); 528 spin_lock(&glob->lru_lock);
529 ret = __ttm_bo_reserve(bo, false, true, false, NULL); 529 ret = __ttm_bo_reserve(bo, false, true, NULL);
530 530
531 /* 531 /*
532 * We raced, and lost, someone else holds the reservation now, 532 * We raced, and lost, someone else holds the reservation now,
@@ -595,11 +595,10 @@ static int ttm_bo_delayed_delete(struct ttm_bo_device *bdev, bool remove_all)
595 kref_get(&nentry->list_kref); 595 kref_get(&nentry->list_kref);
596 } 596 }
597 597
598 ret = __ttm_bo_reserve(entry, false, true, false, NULL); 598 ret = __ttm_bo_reserve(entry, false, true, NULL);
599 if (remove_all && ret) { 599 if (remove_all && ret) {
600 spin_unlock(&glob->lru_lock); 600 spin_unlock(&glob->lru_lock);
601 ret = __ttm_bo_reserve(entry, false, false, 601 ret = __ttm_bo_reserve(entry, false, false, NULL);
602 false, NULL);
603 spin_lock(&glob->lru_lock); 602 spin_lock(&glob->lru_lock);
604 } 603 }
605 604
@@ -741,7 +740,7 @@ static int ttm_mem_evict_first(struct ttm_bo_device *bdev,
741 740
742 spin_lock(&glob->lru_lock); 741 spin_lock(&glob->lru_lock);
743 list_for_each_entry(bo, &man->lru, lru) { 742 list_for_each_entry(bo, &man->lru, lru) {
744 ret = __ttm_bo_reserve(bo, false, true, false, NULL); 743 ret = __ttm_bo_reserve(bo, false, true, NULL);
745 if (!ret) { 744 if (!ret) {
746 if (place && (place->fpfn || place->lpfn)) { 745 if (place && (place->fpfn || place->lpfn)) {
747 /* Don't evict this BO if it's outside of the 746 /* Don't evict this BO if it's outside of the
@@ -1623,7 +1622,7 @@ int ttm_bo_synccpu_write_grab(struct ttm_buffer_object *bo, bool no_wait)
1623 * Using ttm_bo_reserve makes sure the lru lists are updated. 1622 * Using ttm_bo_reserve makes sure the lru lists are updated.
1624 */ 1623 */
1625 1624
1626 ret = ttm_bo_reserve(bo, true, no_wait, false, NULL); 1625 ret = ttm_bo_reserve(bo, true, no_wait, NULL);
1627 if (unlikely(ret != 0)) 1626 if (unlikely(ret != 0))
1628 return ret; 1627 return ret;
1629 ret = ttm_bo_wait(bo, false, true, no_wait); 1628 ret = ttm_bo_wait(bo, false, true, no_wait);
@@ -1656,7 +1655,7 @@ static int ttm_bo_swapout(struct ttm_mem_shrink *shrink)
1656 1655
1657 spin_lock(&glob->lru_lock); 1656 spin_lock(&glob->lru_lock);
1658 list_for_each_entry(bo, &glob->swap_lru, swap) { 1657 list_for_each_entry(bo, &glob->swap_lru, swap) {
1659 ret = __ttm_bo_reserve(bo, false, true, false, NULL); 1658 ret = __ttm_bo_reserve(bo, false, true, NULL);
1660 if (!ret) 1659 if (!ret)
1661 break; 1660 break;
1662 } 1661 }
@@ -1755,7 +1754,7 @@ int ttm_bo_wait_unreserved(struct ttm_buffer_object *bo)
1755 return -ERESTARTSYS; 1754 return -ERESTARTSYS;
1756 if (!ww_mutex_is_locked(&bo->resv->lock)) 1755 if (!ww_mutex_is_locked(&bo->resv->lock))
1757 goto out_unlock; 1756 goto out_unlock;
1758 ret = __ttm_bo_reserve(bo, true, false, false, NULL); 1757 ret = __ttm_bo_reserve(bo, true, false, NULL);
1759 if (unlikely(ret != 0)) 1758 if (unlikely(ret != 0))
1760 goto out_unlock; 1759 goto out_unlock;
1761 __ttm_bo_unreserve(bo); 1760 __ttm_bo_unreserve(bo);
diff --git a/drivers/gpu/drm/ttm/ttm_bo_vm.c b/drivers/gpu/drm/ttm/ttm_bo_vm.c
index 06d26dc438b2..dbd8d58cbc7d 100644
--- a/drivers/gpu/drm/ttm/ttm_bo_vm.c
+++ b/drivers/gpu/drm/ttm/ttm_bo_vm.c
@@ -108,7 +108,7 @@ static int ttm_bo_vm_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
108 * for reserve, and if it fails, retry the fault after waiting 108 * for reserve, and if it fails, retry the fault after waiting
109 * for the buffer to become unreserved. 109 * for the buffer to become unreserved.
110 */ 110 */
111 ret = ttm_bo_reserve(bo, true, true, false, NULL); 111 ret = ttm_bo_reserve(bo, true, true, NULL);
112 if (unlikely(ret != 0)) { 112 if (unlikely(ret != 0)) {
113 if (ret != -EBUSY) 113 if (ret != -EBUSY)
114 return VM_FAULT_NOPAGE; 114 return VM_FAULT_NOPAGE;
diff --git a/drivers/gpu/drm/ttm/ttm_execbuf_util.c b/drivers/gpu/drm/ttm/ttm_execbuf_util.c
index 3820ae97a030..a80717b35dc6 100644
--- a/drivers/gpu/drm/ttm/ttm_execbuf_util.c
+++ b/drivers/gpu/drm/ttm/ttm_execbuf_util.c
@@ -112,8 +112,7 @@ int ttm_eu_reserve_buffers(struct ww_acquire_ctx *ticket,
112 list_for_each_entry(entry, list, head) { 112 list_for_each_entry(entry, list, head) {
113 struct ttm_buffer_object *bo = entry->bo; 113 struct ttm_buffer_object *bo = entry->bo;
114 114
115 ret = __ttm_bo_reserve(bo, intr, (ticket == NULL), true, 115 ret = __ttm_bo_reserve(bo, intr, (ticket == NULL), ticket);
116 ticket);
117 if (!ret && unlikely(atomic_read(&bo->cpu_writers) > 0)) { 116 if (!ret && unlikely(atomic_read(&bo->cpu_writers) > 0)) {
118 __ttm_bo_unreserve(bo); 117 __ttm_bo_unreserve(bo);
119 118