aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm
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
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')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_object.h2
-rw-r--r--drivers/gpu/drm/ast/ast_drv.h2
-rw-r--r--drivers/gpu/drm/bochs/bochs_fbdev.c2
-rw-r--r--drivers/gpu/drm/bochs/bochs_kms.c4
-rw-r--r--drivers/gpu/drm/cirrus/cirrus_drv.h2
-rw-r--r--drivers/gpu/drm/mgag200/mgag200_drv.h2
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_bo.c6
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_display.c4
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_gem.c6
-rw-r--r--drivers/gpu/drm/qxl/qxl_object.h4
-rw-r--r--drivers/gpu/drm/radeon/radeon_object.c2
-rw-r--r--drivers/gpu/drm/radeon/radeon_object.h2
-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
-rw-r--r--drivers/gpu/drm/virtio/virtgpu_drv.h2
-rw-r--r--drivers/gpu/drm/virtio/virtgpu_object.c2
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_cotable.c2
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_dmabuf.c8
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_drv.c2
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_kms.c6
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_mob.c12
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_resource.c7
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_shader.c2
24 files changed, 50 insertions, 53 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h
index acc08018c6cc..bdb01d932548 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h
@@ -71,7 +71,7 @@ static inline int amdgpu_bo_reserve(struct amdgpu_bo *bo, bool no_intr)
71{ 71{
72 int r; 72 int r;
73 73
74 r = ttm_bo_reserve(&bo->tbo, !no_intr, false, false, 0); 74 r = ttm_bo_reserve(&bo->tbo, !no_intr, false, NULL);
75 if (unlikely(r != 0)) { 75 if (unlikely(r != 0)) {
76 if (r != -ERESTARTSYS) 76 if (r != -ERESTARTSYS)
77 dev_err(bo->adev->dev, "%p reserve failed\n", bo); 77 dev_err(bo->adev->dev, "%p reserve failed\n", bo);
diff --git a/drivers/gpu/drm/ast/ast_drv.h b/drivers/gpu/drm/ast/ast_drv.h
index eb5715994ac2..908011d2c8f5 100644
--- a/drivers/gpu/drm/ast/ast_drv.h
+++ b/drivers/gpu/drm/ast/ast_drv.h
@@ -367,7 +367,7 @@ static inline int ast_bo_reserve(struct ast_bo *bo, bool no_wait)
367{ 367{
368 int ret; 368 int ret;
369 369
370 ret = ttm_bo_reserve(&bo->bo, true, no_wait, false, NULL); 370 ret = ttm_bo_reserve(&bo->bo, true, no_wait, NULL);
371 if (ret) { 371 if (ret) {
372 if (ret != -ERESTARTSYS && ret != -EBUSY) 372 if (ret != -ERESTARTSYS && ret != -EBUSY)
373 DRM_ERROR("reserve failed %p\n", bo); 373 DRM_ERROR("reserve failed %p\n", bo);
diff --git a/drivers/gpu/drm/bochs/bochs_fbdev.c b/drivers/gpu/drm/bochs/bochs_fbdev.c
index 369f11f10c72..e1ec498a6b6e 100644
--- a/drivers/gpu/drm/bochs/bochs_fbdev.c
+++ b/drivers/gpu/drm/bochs/bochs_fbdev.c
@@ -82,7 +82,7 @@ static int bochsfb_create(struct drm_fb_helper *helper,
82 82
83 bo = gem_to_bochs_bo(gobj); 83 bo = gem_to_bochs_bo(gobj);
84 84
85 ret = ttm_bo_reserve(&bo->bo, true, false, false, NULL); 85 ret = ttm_bo_reserve(&bo->bo, true, false, NULL);
86 if (ret) 86 if (ret)
87 return ret; 87 return ret;
88 88
diff --git a/drivers/gpu/drm/bochs/bochs_kms.c b/drivers/gpu/drm/bochs/bochs_kms.c
index 89adfd916a7c..207a2cbcc113 100644
--- a/drivers/gpu/drm/bochs/bochs_kms.c
+++ b/drivers/gpu/drm/bochs/bochs_kms.c
@@ -43,7 +43,7 @@ static int bochs_crtc_mode_set_base(struct drm_crtc *crtc, int x, int y,
43 if (old_fb) { 43 if (old_fb) {
44 bochs_fb = to_bochs_framebuffer(old_fb); 44 bochs_fb = to_bochs_framebuffer(old_fb);
45 bo = gem_to_bochs_bo(bochs_fb->obj); 45 bo = gem_to_bochs_bo(bochs_fb->obj);
46 ret = ttm_bo_reserve(&bo->bo, true, false, false, NULL); 46 ret = ttm_bo_reserve(&bo->bo, true, false, NULL);
47 if (ret) { 47 if (ret) {
48 DRM_ERROR("failed to reserve old_fb bo\n"); 48 DRM_ERROR("failed to reserve old_fb bo\n");
49 } else { 49 } else {
@@ -57,7 +57,7 @@ static int bochs_crtc_mode_set_base(struct drm_crtc *crtc, int x, int y,
57 57
58 bochs_fb = to_bochs_framebuffer(crtc->primary->fb); 58 bochs_fb = to_bochs_framebuffer(crtc->primary->fb);
59 bo = gem_to_bochs_bo(bochs_fb->obj); 59 bo = gem_to_bochs_bo(bochs_fb->obj);
60 ret = ttm_bo_reserve(&bo->bo, true, false, false, NULL); 60 ret = ttm_bo_reserve(&bo->bo, true, false, NULL);
61 if (ret) 61 if (ret)
62 return ret; 62 return ret;
63 63
diff --git a/drivers/gpu/drm/cirrus/cirrus_drv.h b/drivers/gpu/drm/cirrus/cirrus_drv.h
index b774d637a00f..2188d6b61b3e 100644
--- a/drivers/gpu/drm/cirrus/cirrus_drv.h
+++ b/drivers/gpu/drm/cirrus/cirrus_drv.h
@@ -245,7 +245,7 @@ static inline int cirrus_bo_reserve(struct cirrus_bo *bo, bool no_wait)
245{ 245{
246 int ret; 246 int ret;
247 247
248 ret = ttm_bo_reserve(&bo->bo, true, no_wait, false, NULL); 248 ret = ttm_bo_reserve(&bo->bo, true, no_wait, NULL);
249 if (ret) { 249 if (ret) {
250 if (ret != -ERESTARTSYS && ret != -EBUSY) 250 if (ret != -ERESTARTSYS && ret != -EBUSY)
251 DRM_ERROR("reserve failed %p\n", bo); 251 DRM_ERROR("reserve failed %p\n", bo);
diff --git a/drivers/gpu/drm/mgag200/mgag200_drv.h b/drivers/gpu/drm/mgag200/mgag200_drv.h
index 205b2801d3b8..3e02ac20777c 100644
--- a/drivers/gpu/drm/mgag200/mgag200_drv.h
+++ b/drivers/gpu/drm/mgag200/mgag200_drv.h
@@ -281,7 +281,7 @@ static inline int mgag200_bo_reserve(struct mgag200_bo *bo, bool no_wait)
281{ 281{
282 int ret; 282 int ret;
283 283
284 ret = ttm_bo_reserve(&bo->bo, true, no_wait, false, NULL); 284 ret = ttm_bo_reserve(&bo->bo, true, no_wait, NULL);
285 if (ret) { 285 if (ret) {
286 if (ret != -ERESTARTSYS && ret != -EBUSY) 286 if (ret != -ERESTARTSYS && ret != -EBUSY)
287 DRM_ERROR("reserve failed %p\n", bo); 287 DRM_ERROR("reserve failed %p\n", bo);
diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c
index 2cdaea58678d..ea8928671632 100644
--- a/drivers/gpu/drm/nouveau/nouveau_bo.c
+++ b/drivers/gpu/drm/nouveau/nouveau_bo.c
@@ -312,7 +312,7 @@ nouveau_bo_pin(struct nouveau_bo *nvbo, uint32_t memtype, bool contig)
312 bool force = false, evict = false; 312 bool force = false, evict = false;
313 int ret; 313 int ret;
314 314
315 ret = ttm_bo_reserve(bo, false, false, false, NULL); 315 ret = ttm_bo_reserve(bo, false, false, NULL);
316 if (ret) 316 if (ret)
317 return ret; 317 return ret;
318 318
@@ -385,7 +385,7 @@ nouveau_bo_unpin(struct nouveau_bo *nvbo)
385 struct ttm_buffer_object *bo = &nvbo->bo; 385 struct ttm_buffer_object *bo = &nvbo->bo;
386 int ret, ref; 386 int ret, ref;
387 387
388 ret = ttm_bo_reserve(bo, false, false, false, NULL); 388 ret = ttm_bo_reserve(bo, false, false, NULL);
389 if (ret) 389 if (ret)
390 return ret; 390 return ret;
391 391
@@ -420,7 +420,7 @@ nouveau_bo_map(struct nouveau_bo *nvbo)
420{ 420{
421 int ret; 421 int ret;
422 422
423 ret = ttm_bo_reserve(&nvbo->bo, false, false, false, NULL); 423 ret = ttm_bo_reserve(&nvbo->bo, false, false, NULL);
424 if (ret) 424 if (ret)
425 return ret; 425 return ret;
426 426
diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c
index 816342645f42..cf6e6171b428 100644
--- a/drivers/gpu/drm/nouveau/nouveau_display.c
+++ b/drivers/gpu/drm/nouveau/nouveau_display.c
@@ -739,7 +739,7 @@ nouveau_crtc_page_flip(struct drm_crtc *crtc, struct drm_framebuffer *fb,
739 } 739 }
740 740
741 mutex_lock(&cli->mutex); 741 mutex_lock(&cli->mutex);
742 ret = ttm_bo_reserve(&new_bo->bo, true, false, false, NULL); 742 ret = ttm_bo_reserve(&new_bo->bo, true, false, NULL);
743 if (ret) 743 if (ret)
744 goto fail_unpin; 744 goto fail_unpin;
745 745
@@ -753,7 +753,7 @@ nouveau_crtc_page_flip(struct drm_crtc *crtc, struct drm_framebuffer *fb,
753 if (new_bo != old_bo) { 753 if (new_bo != old_bo) {
754 ttm_bo_unreserve(&new_bo->bo); 754 ttm_bo_unreserve(&new_bo->bo);
755 755
756 ret = ttm_bo_reserve(&old_bo->bo, true, false, false, NULL); 756 ret = ttm_bo_reserve(&old_bo->bo, true, false, NULL);
757 if (ret) 757 if (ret)
758 goto fail_unpin; 758 goto fail_unpin;
759 } 759 }
diff --git a/drivers/gpu/drm/nouveau/nouveau_gem.c b/drivers/gpu/drm/nouveau/nouveau_gem.c
index a0865c49ec83..8d64b65770e0 100644
--- a/drivers/gpu/drm/nouveau/nouveau_gem.c
+++ b/drivers/gpu/drm/nouveau/nouveau_gem.c
@@ -71,7 +71,7 @@ nouveau_gem_object_open(struct drm_gem_object *gem, struct drm_file *file_priv)
71 if (!cli->vm) 71 if (!cli->vm)
72 return 0; 72 return 0;
73 73
74 ret = ttm_bo_reserve(&nvbo->bo, false, false, false, NULL); 74 ret = ttm_bo_reserve(&nvbo->bo, false, false, NULL);
75 if (ret) 75 if (ret)
76 return ret; 76 return ret;
77 77
@@ -156,7 +156,7 @@ nouveau_gem_object_close(struct drm_gem_object *gem, struct drm_file *file_priv)
156 if (!cli->vm) 156 if (!cli->vm)
157 return; 157 return;
158 158
159 ret = ttm_bo_reserve(&nvbo->bo, false, false, false, NULL); 159 ret = ttm_bo_reserve(&nvbo->bo, false, false, NULL);
160 if (ret) 160 if (ret)
161 return; 161 return;
162 162
@@ -409,7 +409,7 @@ retry:
409 break; 409 break;
410 } 410 }
411 411
412 ret = ttm_bo_reserve(&nvbo->bo, true, false, true, &op->ticket); 412 ret = ttm_bo_reserve(&nvbo->bo, true, false, &op->ticket);
413 if (ret) { 413 if (ret) {
414 list_splice_tail_init(&vram_list, &op->list); 414 list_splice_tail_init(&vram_list, &op->list);
415 list_splice_tail_init(&gart_list, &op->list); 415 list_splice_tail_init(&gart_list, &op->list);
diff --git a/drivers/gpu/drm/qxl/qxl_object.h b/drivers/gpu/drm/qxl/qxl_object.h
index 37af1bc0dd00..483f131cefdf 100644
--- a/drivers/gpu/drm/qxl/qxl_object.h
+++ b/drivers/gpu/drm/qxl/qxl_object.h
@@ -31,7 +31,7 @@ static inline int qxl_bo_reserve(struct qxl_bo *bo, bool no_wait)
31{ 31{
32 int r; 32 int r;
33 33
34 r = ttm_bo_reserve(&bo->tbo, true, no_wait, false, NULL); 34 r = ttm_bo_reserve(&bo->tbo, true, no_wait, NULL);
35 if (unlikely(r != 0)) { 35 if (unlikely(r != 0)) {
36 if (r != -ERESTARTSYS) { 36 if (r != -ERESTARTSYS) {
37 struct qxl_device *qdev = (struct qxl_device *)bo->gem_base.dev->dev_private; 37 struct qxl_device *qdev = (struct qxl_device *)bo->gem_base.dev->dev_private;
@@ -67,7 +67,7 @@ static inline int qxl_bo_wait(struct qxl_bo *bo, u32 *mem_type,
67{ 67{
68 int r; 68 int r;
69 69
70 r = ttm_bo_reserve(&bo->tbo, true, no_wait, false, NULL); 70 r = ttm_bo_reserve(&bo->tbo, true, no_wait, NULL);
71 if (unlikely(r != 0)) { 71 if (unlikely(r != 0)) {
72 if (r != -ERESTARTSYS) { 72 if (r != -ERESTARTSYS) {
73 struct qxl_device *qdev = (struct qxl_device *)bo->gem_base.dev->dev_private; 73 struct qxl_device *qdev = (struct qxl_device *)bo->gem_base.dev->dev_private;
diff --git a/drivers/gpu/drm/radeon/radeon_object.c b/drivers/gpu/drm/radeon/radeon_object.c
index 2d901bf28a94..7e0c16c74cf3 100644
--- a/drivers/gpu/drm/radeon/radeon_object.c
+++ b/drivers/gpu/drm/radeon/radeon_object.c
@@ -832,7 +832,7 @@ int radeon_bo_wait(struct radeon_bo *bo, u32 *mem_type, bool no_wait)
832{ 832{
833 int r; 833 int r;
834 834
835 r = ttm_bo_reserve(&bo->tbo, true, no_wait, false, NULL); 835 r = ttm_bo_reserve(&bo->tbo, true, no_wait, NULL);
836 if (unlikely(r != 0)) 836 if (unlikely(r != 0))
837 return r; 837 return r;
838 if (mem_type) 838 if (mem_type)
diff --git a/drivers/gpu/drm/radeon/radeon_object.h b/drivers/gpu/drm/radeon/radeon_object.h
index d8d295ee7c12..a10bb3deee54 100644
--- a/drivers/gpu/drm/radeon/radeon_object.h
+++ b/drivers/gpu/drm/radeon/radeon_object.h
@@ -65,7 +65,7 @@ static inline int radeon_bo_reserve(struct radeon_bo *bo, bool no_intr)
65{ 65{
66 int r; 66 int r;
67 67
68 r = ttm_bo_reserve(&bo->tbo, !no_intr, false, false, NULL); 68 r = ttm_bo_reserve(&bo->tbo, !no_intr, false, NULL);
69 if (unlikely(r != 0)) { 69 if (unlikely(r != 0)) {
70 if (r != -ERESTARTSYS) 70 if (r != -ERESTARTSYS)
71 dev_err(bo->rdev->dev, "%p reserve failed\n", bo); 71 dev_err(bo->rdev->dev, "%p reserve failed\n", bo);
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
diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.h b/drivers/gpu/drm/virtio/virtgpu_drv.h
index 8f486f4c7023..0a54f43f846a 100644
--- a/drivers/gpu/drm/virtio/virtgpu_drv.h
+++ b/drivers/gpu/drm/virtio/virtgpu_drv.h
@@ -400,7 +400,7 @@ static inline int virtio_gpu_object_reserve(struct virtio_gpu_object *bo,
400{ 400{
401 int r; 401 int r;
402 402
403 r = ttm_bo_reserve(&bo->tbo, true, no_wait, false, NULL); 403 r = ttm_bo_reserve(&bo->tbo, true, no_wait, NULL);
404 if (unlikely(r != 0)) { 404 if (unlikely(r != 0)) {
405 if (r != -ERESTARTSYS) { 405 if (r != -ERESTARTSYS) {
406 struct virtio_gpu_device *qdev = 406 struct virtio_gpu_device *qdev =
diff --git a/drivers/gpu/drm/virtio/virtgpu_object.c b/drivers/gpu/drm/virtio/virtgpu_object.c
index f300eba95bb1..208a1fdb21f4 100644
--- a/drivers/gpu/drm/virtio/virtgpu_object.c
+++ b/drivers/gpu/drm/virtio/virtgpu_object.c
@@ -155,7 +155,7 @@ int virtio_gpu_object_wait(struct virtio_gpu_object *bo, bool no_wait)
155{ 155{
156 int r; 156 int r;
157 157
158 r = ttm_bo_reserve(&bo->tbo, true, no_wait, false, NULL); 158 r = ttm_bo_reserve(&bo->tbo, true, no_wait, NULL);
159 if (unlikely(r != 0)) 159 if (unlikely(r != 0))
160 return r; 160 return r;
161 r = ttm_bo_wait(&bo->tbo, true, true, no_wait); 161 r = ttm_bo_wait(&bo->tbo, true, true, no_wait);
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_cotable.c b/drivers/gpu/drm/vmwgfx/vmwgfx_cotable.c
index 092ea81eeff7..ddb3dd997437 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_cotable.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_cotable.c
@@ -421,7 +421,7 @@ static int vmw_cotable_resize(struct vmw_resource *res, size_t new_size)
421 } 421 }
422 422
423 bo = &buf->base; 423 bo = &buf->base;
424 WARN_ON_ONCE(ttm_bo_reserve(bo, false, true, false, NULL)); 424 WARN_ON_ONCE(ttm_bo_reserve(bo, false, true, NULL));
425 425
426 ret = ttm_bo_wait(old_bo, false, false, false); 426 ret = ttm_bo_wait(old_bo, false, false, false);
427 if (unlikely(ret != 0)) { 427 if (unlikely(ret != 0)) {
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_dmabuf.c b/drivers/gpu/drm/vmwgfx/vmwgfx_dmabuf.c
index 299925a1f6c6..9b078a493996 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_dmabuf.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_dmabuf.c
@@ -56,7 +56,7 @@ int vmw_dmabuf_pin_in_placement(struct vmw_private *dev_priv,
56 56
57 vmw_execbuf_release_pinned_bo(dev_priv); 57 vmw_execbuf_release_pinned_bo(dev_priv);
58 58
59 ret = ttm_bo_reserve(bo, interruptible, false, false, NULL); 59 ret = ttm_bo_reserve(bo, interruptible, false, NULL);
60 if (unlikely(ret != 0)) 60 if (unlikely(ret != 0))
61 goto err; 61 goto err;
62 62
@@ -98,7 +98,7 @@ int vmw_dmabuf_pin_in_vram_or_gmr(struct vmw_private *dev_priv,
98 98
99 vmw_execbuf_release_pinned_bo(dev_priv); 99 vmw_execbuf_release_pinned_bo(dev_priv);
100 100
101 ret = ttm_bo_reserve(bo, interruptible, false, false, NULL); 101 ret = ttm_bo_reserve(bo, interruptible, false, NULL);
102 if (unlikely(ret != 0)) 102 if (unlikely(ret != 0))
103 goto err; 103 goto err;
104 104
@@ -174,7 +174,7 @@ int vmw_dmabuf_pin_in_start_of_vram(struct vmw_private *dev_priv,
174 return ret; 174 return ret;
175 175
176 vmw_execbuf_release_pinned_bo(dev_priv); 176 vmw_execbuf_release_pinned_bo(dev_priv);
177 ret = ttm_bo_reserve(bo, interruptible, false, false, NULL); 177 ret = ttm_bo_reserve(bo, interruptible, false, NULL);
178 if (unlikely(ret != 0)) 178 if (unlikely(ret != 0))
179 goto err_unlock; 179 goto err_unlock;
180 180
@@ -225,7 +225,7 @@ int vmw_dmabuf_unpin(struct vmw_private *dev_priv,
225 if (unlikely(ret != 0)) 225 if (unlikely(ret != 0))
226 return ret; 226 return ret;
227 227
228 ret = ttm_bo_reserve(bo, interruptible, false, false, NULL); 228 ret = ttm_bo_reserve(bo, interruptible, false, NULL);
229 if (unlikely(ret != 0)) 229 if (unlikely(ret != 0))
230 goto err; 230 goto err;
231 231
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
index e7335a48ebf6..9555e204814a 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
@@ -326,7 +326,7 @@ static int vmw_dummy_query_bo_create(struct vmw_private *dev_priv)
326 if (unlikely(ret != 0)) 326 if (unlikely(ret != 0))
327 return ret; 327 return ret;
328 328
329 ret = ttm_bo_reserve(&vbo->base, false, true, false, NULL); 329 ret = ttm_bo_reserve(&vbo->base, false, true, NULL);
330 BUG_ON(ret != 0); 330 BUG_ON(ret != 0);
331 vmw_bo_pin_reserved(vbo, true); 331 vmw_bo_pin_reserved(vbo, true);
332 332
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
index 4742ec4ead27..fc20d45e3da9 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
@@ -98,7 +98,7 @@ int vmw_cursor_update_dmabuf(struct vmw_private *dev_priv,
98 kmap_offset = 0; 98 kmap_offset = 0;
99 kmap_num = (width*height*4 + PAGE_SIZE - 1) >> PAGE_SHIFT; 99 kmap_num = (width*height*4 + PAGE_SIZE - 1) >> PAGE_SHIFT;
100 100
101 ret = ttm_bo_reserve(&dmabuf->base, true, false, false, NULL); 101 ret = ttm_bo_reserve(&dmabuf->base, true, false, NULL);
102 if (unlikely(ret != 0)) { 102 if (unlikely(ret != 0)) {
103 DRM_ERROR("reserve failed\n"); 103 DRM_ERROR("reserve failed\n");
104 return -EINVAL; 104 return -EINVAL;
@@ -318,7 +318,7 @@ void vmw_kms_cursor_snoop(struct vmw_surface *srf,
318 kmap_offset = cmd->dma.guest.ptr.offset >> PAGE_SHIFT; 318 kmap_offset = cmd->dma.guest.ptr.offset >> PAGE_SHIFT;
319 kmap_num = (64*64*4) >> PAGE_SHIFT; 319 kmap_num = (64*64*4) >> PAGE_SHIFT;
320 320
321 ret = ttm_bo_reserve(bo, true, false, false, NULL); 321 ret = ttm_bo_reserve(bo, true, false, NULL);
322 if (unlikely(ret != 0)) { 322 if (unlikely(ret != 0)) {
323 DRM_ERROR("reserve failed\n"); 323 DRM_ERROR("reserve failed\n");
324 return; 324 return;
@@ -1859,7 +1859,7 @@ int vmw_kms_helper_buffer_prepare(struct vmw_private *dev_priv,
1859 struct ttm_buffer_object *bo = &buf->base; 1859 struct ttm_buffer_object *bo = &buf->base;
1860 int ret; 1860 int ret;
1861 1861
1862 ttm_bo_reserve(bo, false, false, interruptible, NULL); 1862 ttm_bo_reserve(bo, false, false, NULL);
1863 ret = vmw_validate_single_buffer(dev_priv, bo, interruptible, 1863 ret = vmw_validate_single_buffer(dev_priv, bo, interruptible,
1864 validate_as_mob); 1864 validate_as_mob);
1865 if (ret) 1865 if (ret)
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_mob.c b/drivers/gpu/drm/vmwgfx/vmwgfx_mob.c
index 23db16008e39..b6126a5f1269 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_mob.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_mob.c
@@ -222,7 +222,7 @@ static void vmw_takedown_otable_base(struct vmw_private *dev_priv,
222 if (bo) { 222 if (bo) {
223 int ret; 223 int ret;
224 224
225 ret = ttm_bo_reserve(bo, false, true, false, NULL); 225 ret = ttm_bo_reserve(bo, false, true, NULL);
226 BUG_ON(ret != 0); 226 BUG_ON(ret != 0);
227 227
228 vmw_fence_single_bo(bo, NULL); 228 vmw_fence_single_bo(bo, NULL);
@@ -262,7 +262,7 @@ static int vmw_otable_batch_setup(struct vmw_private *dev_priv,
262 if (unlikely(ret != 0)) 262 if (unlikely(ret != 0))
263 goto out_no_bo; 263 goto out_no_bo;
264 264
265 ret = ttm_bo_reserve(batch->otable_bo, false, true, false, NULL); 265 ret = ttm_bo_reserve(batch->otable_bo, false, true, NULL);
266 BUG_ON(ret != 0); 266 BUG_ON(ret != 0);
267 ret = vmw_bo_driver.ttm_tt_populate(batch->otable_bo->ttm); 267 ret = vmw_bo_driver.ttm_tt_populate(batch->otable_bo->ttm);
268 if (unlikely(ret != 0)) 268 if (unlikely(ret != 0))
@@ -357,7 +357,7 @@ static void vmw_otable_batch_takedown(struct vmw_private *dev_priv,
357 vmw_takedown_otable_base(dev_priv, i, 357 vmw_takedown_otable_base(dev_priv, i,
358 &batch->otables[i]); 358 &batch->otables[i]);
359 359
360 ret = ttm_bo_reserve(bo, false, true, false, NULL); 360 ret = ttm_bo_reserve(bo, false, true, NULL);
361 BUG_ON(ret != 0); 361 BUG_ON(ret != 0);
362 362
363 vmw_fence_single_bo(bo, NULL); 363 vmw_fence_single_bo(bo, NULL);
@@ -440,7 +440,7 @@ static int vmw_mob_pt_populate(struct vmw_private *dev_priv,
440 if (unlikely(ret != 0)) 440 if (unlikely(ret != 0))
441 return ret; 441 return ret;
442 442
443 ret = ttm_bo_reserve(mob->pt_bo, false, true, false, NULL); 443 ret = ttm_bo_reserve(mob->pt_bo, false, true, NULL);
444 444
445 BUG_ON(ret != 0); 445 BUG_ON(ret != 0);
446 ret = vmw_bo_driver.ttm_tt_populate(mob->pt_bo->ttm); 446 ret = vmw_bo_driver.ttm_tt_populate(mob->pt_bo->ttm);
@@ -545,7 +545,7 @@ static void vmw_mob_pt_setup(struct vmw_mob *mob,
545 const struct vmw_sg_table *vsgt; 545 const struct vmw_sg_table *vsgt;
546 int ret; 546 int ret;
547 547
548 ret = ttm_bo_reserve(bo, false, true, false, NULL); 548 ret = ttm_bo_reserve(bo, false, true, NULL);
549 BUG_ON(ret != 0); 549 BUG_ON(ret != 0);
550 550
551 vsgt = vmw_bo_sg_table(bo); 551 vsgt = vmw_bo_sg_table(bo);
@@ -595,7 +595,7 @@ void vmw_mob_unbind(struct vmw_private *dev_priv,
595 struct ttm_buffer_object *bo = mob->pt_bo; 595 struct ttm_buffer_object *bo = mob->pt_bo;
596 596
597 if (bo) { 597 if (bo) {
598 ret = ttm_bo_reserve(bo, false, true, false, NULL); 598 ret = ttm_bo_reserve(bo, false, true, NULL);
599 /* 599 /*
600 * Noone else should be using this buffer. 600 * Noone else should be using this buffer.
601 */ 601 */
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c b/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c
index e57667ca7557..9608d33a9fc4 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c
@@ -129,7 +129,7 @@ static void vmw_resource_release(struct kref *kref)
129 if (res->backup) { 129 if (res->backup) {
130 struct ttm_buffer_object *bo = &res->backup->base; 130 struct ttm_buffer_object *bo = &res->backup->base;
131 131
132 ttm_bo_reserve(bo, false, false, false, NULL); 132 ttm_bo_reserve(bo, false, false, NULL);
133 if (!list_empty(&res->mob_head) && 133 if (!list_empty(&res->mob_head) &&
134 res->func->unbind != NULL) { 134 res->func->unbind != NULL) {
135 struct ttm_validate_buffer val_buf; 135 struct ttm_validate_buffer val_buf;
@@ -1717,8 +1717,7 @@ int vmw_resource_pin(struct vmw_resource *res, bool interruptible)
1717 if (res->backup) { 1717 if (res->backup) {
1718 vbo = res->backup; 1718 vbo = res->backup;
1719 1719
1720 ttm_bo_reserve(&vbo->base, interruptible, false, false, 1720 ttm_bo_reserve(&vbo->base, interruptible, false, NULL);
1721 NULL);
1722 if (!vbo->pin_count) { 1721 if (!vbo->pin_count) {
1723 ret = ttm_bo_validate 1722 ret = ttm_bo_validate
1724 (&vbo->base, 1723 (&vbo->base,
@@ -1773,7 +1772,7 @@ void vmw_resource_unpin(struct vmw_resource *res)
1773 if (--res->pin_count == 0 && res->backup) { 1772 if (--res->pin_count == 0 && res->backup) {
1774 struct vmw_dma_buffer *vbo = res->backup; 1773 struct vmw_dma_buffer *vbo = res->backup;
1775 1774
1776 ttm_bo_reserve(&vbo->base, false, false, false, NULL); 1775 ttm_bo_reserve(&vbo->base, false, false, NULL);
1777 vmw_bo_pin_reserved(vbo, false); 1776 vmw_bo_pin_reserved(vbo, false);
1778 ttm_bo_unreserve(&vbo->base); 1777 ttm_bo_unreserve(&vbo->base);
1779 } 1778 }
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_shader.c b/drivers/gpu/drm/vmwgfx/vmwgfx_shader.c
index fd47547b0234..92f8b1d04f0f 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_shader.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_shader.c
@@ -988,7 +988,7 @@ int vmw_compat_shader_add(struct vmw_private *dev_priv,
988 if (unlikely(ret != 0)) 988 if (unlikely(ret != 0))
989 goto out; 989 goto out;
990 990
991 ret = ttm_bo_reserve(&buf->base, false, true, false, NULL); 991 ret = ttm_bo_reserve(&buf->base, false, true, NULL);
992 if (unlikely(ret != 0)) 992 if (unlikely(ret != 0))
993 goto no_reserve; 993 goto no_reserve;
994 994