Not used any more.
Unified · Split
| @@ -71,7 +71,7 @@ static inline int amdgpu_bo_reserve(struct amdgpu_bo *bo, bool no_intr) · 70 unmodified lines | ||
| 71 | 71 | { |
| 72 | 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 | 75 | if (unlikely(r != 0)) { |
| 76 | 76 | if (r != -ERESTARTSYS) |
| 77 | 77 | dev_err(bo->adev->dev, "%p reserve failed\n", bo); |
| @@ -367,7 +367,7 @@ static inline int ast_bo_reserve(struct ast_bo *bo, bool no_wait) · 366 unmodified lines | ||
| 367 | 367 | { |
| 368 | 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 | 371 | if (ret) { |
| 372 | 372 | if (ret != -ERESTARTSYS && ret != -EBUSY) |
| 373 | 373 | DRM_ERROR("reserve failed %p\n", bo); |
| @@ -82,7 +82,7 @@ static int bochsfb_create(struct drm_fb_helper *helper, · 81 unmodified lines | ||
| 82 | 82 | |
| 83 | 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 | 86 | if (ret) |
| 87 | 87 | return ret; |
| 88 | 88 | |
| @@ -43,7 +43,7 @@ static int bochs_crtc_mode_set_base(struct drm_crtc *crtc, int x, int y, · 42 unmodified lines | ||
| 43 | 43 | if (old_fb) { |
| 44 | 44 | bochs_fb = to_bochs_framebuffer(old_fb); |
| 45 | 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 | 47 | if (ret) { |
| 48 | 48 | DRM_ERROR("failed to reserve old_fb bo\n"); |
| 49 | 49 | } else { |
| @@ -57,7 +57,7 @@ static int bochs_crtc_mode_set_base(struct drm_crtc *crtc, int x, int y, · 7 unmodified lines | ||
| 57 | 57 | |
| 58 | 58 | bochs_fb = to_bochs_framebuffer(crtc->primary->fb); |
| 59 | 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 | 61 | if (ret) |
| 62 | 62 | return ret; |
| 63 | 63 | |
| @@ -245,7 +245,7 @@ static inline int cirrus_bo_reserve(struct cirrus_bo *bo, bool no_wait) · 244 unmodified lines | ||
| 245 | 245 | { |
| 246 | 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 | 249 | if (ret) { |
| 250 | 250 | if (ret != -ERESTARTSYS && ret != -EBUSY) |
| 251 | 251 | DRM_ERROR("reserve failed %p\n", bo); |
| @@ -281,7 +281,7 @@ static inline int mgag200_bo_reserve(struct mgag200_bo *bo, bool no_wait) · 280 unmodified lines | ||
| 281 | 281 | { |
| 282 | 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 | 285 | if (ret) { |
| 286 | 286 | if (ret != -ERESTARTSYS && ret != -EBUSY) |
| 287 | 287 | DRM_ERROR("reserve failed %p\n", bo); |
| @@ -312,7 +312,7 @@ nouveau_bo_pin(struct nouveau_bo *nvbo, uint32_t memtype, bool contig) · 311 unmodified lines | ||
| 312 | 312 | bool force = false, evict = false; |
| 313 | 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 | 316 | if (ret) |
| 317 | 317 | return ret; |
| 318 | 318 | |
| @@ -385,7 +385,7 @@ nouveau_bo_unpin(struct nouveau_bo *nvbo) · 66 unmodified lines | ||
| 385 | 385 | struct ttm_buffer_object *bo = &nvbo->bo; |
| 386 | 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 | 389 | if (ret) |
| 390 | 390 | return ret; |
| 391 | 391 | |
| @@ -420,7 +420,7 @@ nouveau_bo_map(struct nouveau_bo *nvbo) · 28 unmodified lines | ||
| 420 | 420 | { |
| 421 | 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 | 424 | if (ret) |
| 425 | 425 | return ret; |
| 426 | 426 | |
| @@ -739,7 +739,7 @@ nouveau_crtc_page_flip(struct drm_crtc *crtc, struct drm_framebuffer *fb, · 738 unmodified lines | ||
| 739 | 739 | } |
| 740 | 740 | |
| 741 | 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 | 743 | if (ret) |
| 744 | 744 | goto fail_unpin; |
| 745 | 745 | |
| @@ -753,7 +753,7 @@ nouveau_crtc_page_flip(struct drm_crtc *crtc, struct drm_framebuffer *fb, · 7 unmodified lines | ||
| 753 | 753 | if (new_bo != old_bo) { |
| 754 | 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 | 757 | if (ret) |
| 758 | 758 | goto fail_unpin; |
| 759 | 759 | } |
| @@ -71,7 +71,7 @@ nouveau_gem_object_open(struct drm_gem_object *gem, struct drm_file *file_priv) · 70 unmodified lines | ||
| 71 | 71 | if (!cli->vm) |
| 72 | 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 | 75 | if (ret) |
| 76 | 76 | return ret; |
| 77 | 77 | |
| @@ -156,7 +156,7 @@ nouveau_gem_object_close(struct drm_gem_object *gem, struct drm_file *file_priv) · 78 unmodified lines | ||
| 156 | 156 | if (!cli->vm) |
| 157 | 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 | 160 | if (ret) |
| 161 | 161 | return; |
| 162 | 162 | |
| @@ -409,7 +409,7 @@ retry: · 246 unmodified lines | ||
| 409 | 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 | 413 | if (ret) { |
| 414 | 414 | list_splice_tail_init(&vram_list, &op->list); |
| 415 | 415 | list_splice_tail_init(&gart_list, &op->list); |
| @@ -31,7 +31,7 @@ static inline int qxl_bo_reserve(struct qxl_bo *bo, bool no_wait) · 30 unmodified lines | ||
| 31 | 31 | { |
| 32 | 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 | 35 | if (unlikely(r != 0)) { |
| 36 | 36 | if (r != -ERESTARTSYS) { |
| 37 | 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, · 29 unmodified lines | ||
| 67 | 67 | { |
| 68 | 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 | 71 | if (unlikely(r != 0)) { |
| 72 | 72 | if (r != -ERESTARTSYS) { |
| 73 | 73 | struct qxl_device *qdev = (struct qxl_device *)bo->gem_base.dev->dev_private; |
| @@ -832,7 +832,7 @@ int radeon_bo_wait(struct radeon_bo *bo, u32 *mem_type, bool no_wait) · 831 unmodified lines | ||
| 832 | 832 | { |
| 833 | 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 | 836 | if (unlikely(r != 0)) |
| 837 | 837 | return r; |
| 838 | 838 | if (mem_type) |
| @@ -65,7 +65,7 @@ static inline int radeon_bo_reserve(struct radeon_bo *bo, bool no_intr) · 64 unmodified lines | ||
| 65 | 65 | { |
| 66 | 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 | 69 | if (unlikely(r != 0)) { |
| 70 | 70 | if (r != -ERESTARTSYS) |
| 71 | 71 | dev_err(bo->rdev->dev, "%p reserve failed\n", bo); |
| @@ -452,7 +452,7 @@ static void ttm_bo_cleanup_refs_or_queue(struct ttm_buffer_object *bo) · 451 unmodified lines | ||
| 452 | 452 | int ret; |
| 453 | 453 | |
| 454 | 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 | 457 | if (!ret) { |
| 458 | 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, · 67 unmodified lines | ||
| 526 | 526 | return -EBUSY; |
| 527 | 527 | |
| 528 | 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 | 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) · 62 unmodified lines | ||
| 595 | 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 | 599 | if (remove_all && ret) { |
| 600 | 600 | spin_unlock(&glob->lru_lock); |
| 601 | − ret = __ttm_bo_reserve(entry, false, false, | |
| 602 | − false, NULL); | |
| 601 | + ret = __ttm_bo_reserve(entry, false, false, NULL); | |
| 603 | 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, · 135 unmodified lines | ||
| 741 | 740 | |
| 742 | 741 | spin_lock(&glob->lru_lock); |
| 743 | 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 | 744 | if (!ret) { |
| 746 | 745 | if (place && (place->fpfn || place->lpfn)) { |
| 747 | 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) · 875 unmodified lines | ||
| 1623 | 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 | 1626 | if (unlikely(ret != 0)) |
| 1628 | 1627 | return ret; |
| 1629 | 1628 | ret = ttm_bo_wait(bo, false, true, no_wait); |
| @@ -1656,7 +1655,7 @@ static int ttm_bo_swapout(struct ttm_mem_shrink *shrink) · 26 unmodified lines | ||
| 1656 | 1655 | |
| 1657 | 1656 | spin_lock(&glob->lru_lock); |
| 1658 | 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 | 1659 | if (!ret) |
| 1661 | 1660 | break; |
| 1662 | 1661 | } |
| @@ -1755,7 +1754,7 @@ int ttm_bo_wait_unreserved(struct ttm_buffer_object *bo) · 92 unmodified lines | ||
| 1755 | 1754 | return -ERESTARTSYS; |
| 1756 | 1755 | if (!ww_mutex_is_locked(&bo->resv->lock)) |
| 1757 | 1756 | goto out_unlock; |
| 1758 | − ret = __ttm_bo_reserve(bo, true, false, false, NULL); | |
| 1757 | + ret = __ttm_bo_reserve(bo, true, false, NULL); | |
| 1759 | 1758 | if (unlikely(ret != 0)) |
| 1760 | 1759 | goto out_unlock; |
| 1761 | 1760 | __ttm_bo_unreserve(bo); |
| @@ -108,7 +108,7 @@ static int ttm_bo_vm_fault(struct vm_area_struct *vma, struct vm_fault *vmf) · 107 unmodified lines | ||
| 108 | 108 | * for reserve, and if it fails, retry the fault after waiting |
| 109 | 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 | 112 | if (unlikely(ret != 0)) { |
| 113 | 113 | if (ret != -EBUSY) |
| 114 | 114 | return VM_FAULT_NOPAGE; |
| @@ -112,8 +112,7 @@ int ttm_eu_reserve_buffers(struct ww_acquire_ctx *ticket, · 111 unmodified lines | ||
| 112 | 112 | list_for_each_entry(entry, list, head) { |
| 113 | 113 | struct ttm_buffer_object *bo = entry->bo; |
| 114 | 114 | |
| 115 | − ret = __ttm_bo_reserve(bo, intr, (ticket == NULL), true, | |
| 116 | − ticket); | |
| 115 | + ret = __ttm_bo_reserve(bo, intr, (ticket == NULL), ticket); | |
| 117 | 116 | if (!ret && unlikely(atomic_read(&bo->cpu_writers) > 0)) { |
| 118 | 117 | __ttm_bo_unreserve(bo); |
| 119 | 118 | |
| @@ -400,7 +400,7 @@ static inline int virtio_gpu_object_reserve(struct virtio_gpu_object *bo, · 399 unmodified lines | ||
| 400 | 400 | { |
| 401 | 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 | 404 | if (unlikely(r != 0)) { |
| 405 | 405 | if (r != -ERESTARTSYS) { |
| 406 | 406 | struct virtio_gpu_device *qdev = |
| @@ -155,7 +155,7 @@ int virtio_gpu_object_wait(struct virtio_gpu_object *bo, bool no_wait) · 154 unmodified lines | ||
| 155 | 155 | { |
| 156 | 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 | 159 | if (unlikely(r != 0)) |
| 160 | 160 | return r; |
| 161 | 161 | r = ttm_bo_wait(&bo->tbo, true, true, no_wait); |
| @@ -421,7 +421,7 @@ static int vmw_cotable_resize(struct vmw_resource *res, size_t new_size) · 420 unmodified lines | ||
| 421 | 421 | } |
| 422 | 422 | |
| 423 | 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 | 426 | ret = ttm_bo_wait(old_bo, false, false, false); |
| 427 | 427 | if (unlikely(ret != 0)) { |
| @@ -56,7 +56,7 @@ int vmw_dmabuf_pin_in_placement(struct vmw_private *dev_priv, · 55 unmodified lines | ||
| 56 | 56 | |
| 57 | 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 | 60 | if (unlikely(ret != 0)) |
| 61 | 61 | goto err; |
| 62 | 62 | |
| @@ -98,7 +98,7 @@ int vmw_dmabuf_pin_in_vram_or_gmr(struct vmw_private *dev_priv, · 35 unmodified lines | ||
| 98 | 98 | |
| 99 | 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 | 102 | if (unlikely(ret != 0)) |
| 103 | 103 | goto err; |
| 104 | 104 | |
| @@ -174,7 +174,7 @@ int vmw_dmabuf_pin_in_start_of_vram(struct vmw_private *dev_priv, · 69 unmodified lines | ||
| 174 | 174 | return ret; |
| 175 | 175 | |
| 176 | 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 | 178 | if (unlikely(ret != 0)) |
| 179 | 179 | goto err_unlock; |
| 180 | 180 | |
| @@ -225,7 +225,7 @@ int vmw_dmabuf_unpin(struct vmw_private *dev_priv, · 44 unmodified lines | ||
| 225 | 225 | if (unlikely(ret != 0)) |
| 226 | 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 | 229 | if (unlikely(ret != 0)) |
| 230 | 230 | goto err; |
| 231 | 231 | |
| @@ -326,7 +326,7 @@ static int vmw_dummy_query_bo_create(struct vmw_private *dev_priv) · 325 unmodified lines | ||
| 326 | 326 | if (unlikely(ret != 0)) |
| 327 | 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 | 330 | BUG_ON(ret != 0); |
| 331 | 331 | vmw_bo_pin_reserved(vbo, true); |
| 332 | 332 | |
| @@ -98,7 +98,7 @@ int vmw_cursor_update_dmabuf(struct vmw_private *dev_priv, · 97 unmodified lines | ||
| 98 | 98 | kmap_offset = 0; |
| 99 | 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 | 102 | if (unlikely(ret != 0)) { |
| 103 | 103 | DRM_ERROR("reserve failed\n"); |
| 104 | 104 | return -EINVAL; |
| @@ -318,7 +318,7 @@ void vmw_kms_cursor_snoop(struct vmw_surface *srf, · 213 unmodified lines | ||
| 318 | 318 | kmap_offset = cmd->dma.guest.ptr.offset >> PAGE_SHIFT; |
| 319 | 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 | 322 | if (unlikely(ret != 0)) { |
| 323 | 323 | DRM_ERROR("reserve failed\n"); |
| 324 | 324 | return; |
| @@ -1859,7 +1859,7 @@ int vmw_kms_helper_buffer_prepare(struct vmw_private *dev_priv, · 1534 unmodified lines | ||
| 1859 | 1859 | struct ttm_buffer_object *bo = &buf->base; |
| 1860 | 1860 | int ret; |
| 1861 | 1861 | |
| 1862 | − ttm_bo_reserve(bo, false, false, interruptible, NULL); | |
| 1862 | + ttm_bo_reserve(bo, false, false, NULL); | |
| 1863 | 1863 | ret = vmw_validate_single_buffer(dev_priv, bo, interruptible, |
| 1864 | 1864 | validate_as_mob); |
| 1865 | 1865 | if (ret) |
| @@ -222,7 +222,7 @@ static void vmw_takedown_otable_base(struct vmw_private *dev_priv, · 221 unmodified lines | ||
| 222 | 222 | if (bo) { |
| 223 | 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 | 226 | BUG_ON(ret != 0); |
| 227 | 227 | |
| 228 | 228 | vmw_fence_single_bo(bo, NULL); |
| @@ -262,7 +262,7 @@ static int vmw_otable_batch_setup(struct vmw_private *dev_priv, · 33 unmodified lines | ||
| 262 | 262 | if (unlikely(ret != 0)) |
| 263 | 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 | 266 | BUG_ON(ret != 0); |
| 267 | 267 | ret = vmw_bo_driver.ttm_tt_populate(batch->otable_bo->ttm); |
| 268 | 268 | if (unlikely(ret != 0)) |
| @@ -357,7 +357,7 @@ static void vmw_otable_batch_takedown(struct vmw_private *dev_priv, · 88 unmodified lines | ||
| 357 | 357 | vmw_takedown_otable_base(dev_priv, i, |
| 358 | 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 | 361 | BUG_ON(ret != 0); |
| 362 | 362 | |
| 363 | 363 | vmw_fence_single_bo(bo, NULL); |
| @@ -440,7 +440,7 @@ static int vmw_mob_pt_populate(struct vmw_private *dev_priv, · 76 unmodified lines | ||
| 440 | 440 | if (unlikely(ret != 0)) |
| 441 | 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 | 445 | BUG_ON(ret != 0); |
| 446 | 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, · 98 unmodified lines | ||
| 545 | 545 | const struct vmw_sg_table *vsgt; |
| 546 | 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 | 549 | BUG_ON(ret != 0); |
| 550 | 550 | |
| 551 | 551 | vsgt = vmw_bo_sg_table(bo); |
| @@ -595,7 +595,7 @@ void vmw_mob_unbind(struct vmw_private *dev_priv, · 43 unmodified lines | ||
| 595 | 595 | struct ttm_buffer_object *bo = mob->pt_bo; |
| 596 | 596 | |
| 597 | 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 | 600 | * Noone else should be using this buffer. |
| 601 | 601 | */ |
| @@ -129,7 +129,7 @@ static void vmw_resource_release(struct kref *kref) · 128 unmodified lines | ||
| 129 | 129 | if (res->backup) { |
| 130 | 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 | 133 | if (!list_empty(&res->mob_head) && |
| 134 | 134 | res->func->unbind != NULL) { |
| 135 | 135 | struct ttm_validate_buffer val_buf; |
| @@ -1717,8 +1717,7 @@ int vmw_resource_pin(struct vmw_resource *res, bool interruptible) · 1581 unmodified lines | ||
| 1717 | 1717 | if (res->backup) { |
| 1718 | 1718 | vbo = res->backup; |
| 1719 | 1719 | |
| 1720 | − ttm_bo_reserve(&vbo->base, interruptible, false, false, | |
| 1721 | − NULL); | |
| 1720 | + ttm_bo_reserve(&vbo->base, interruptible, false, NULL); | |
| 1722 | 1721 | if (!vbo->pin_count) { |
| 1723 | 1722 | ret = ttm_bo_validate |
| 1724 | 1723 | (&vbo->base, |
| @@ -1773,7 +1772,7 @@ void vmw_resource_unpin(struct vmw_resource *res) · 48 unmodified lines | ||
| 1773 | 1772 | if (--res->pin_count == 0 && res->backup) { |
| 1774 | 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 | 1776 | vmw_bo_pin_reserved(vbo, false); |
| 1778 | 1777 | ttm_bo_unreserve(&vbo->base); |
| 1779 | 1778 | } |
| @@ -988,7 +988,7 @@ int vmw_compat_shader_add(struct vmw_private *dev_priv, · 987 unmodified lines | ||
| 988 | 988 | if (unlikely(ret != 0)) |
| 989 | 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 | 992 | if (unlikely(ret != 0)) |
| 993 | 993 | goto no_reserve; |
| 994 | 994 | |
| @@ -759,8 +759,7 @@ extern void ttm_bo_add_to_lru(struct ttm_buffer_object *bo); · 758 unmodified lines | ||
| 759 | 759 | * @bo: A pointer to a struct ttm_buffer_object. |
| 760 | 760 | * @interruptible: Sleep interruptible if waiting. |
| 761 | 761 | * @no_wait: Don't sleep while trying to reserve, rather return -EBUSY. |
| 762 | − * @use_ticket: If @bo is already reserved, Only sleep waiting for | |
| 763 | − * it to become unreserved if @ticket->stamp is older. | |
| 762 | + * @ticket: ticket used to acquire the ww_mutex. | |
| 764 | 763 | * |
| 765 | 764 | * Will not remove reserved buffers from the lru lists. |
| 766 | 765 | * Otherwise identical to ttm_bo_reserve. |
| @@ -776,8 +775,7 @@ extern void ttm_bo_add_to_lru(struct ttm_buffer_object *bo); · 9 unmodified lines | ||
| 776 | 775 | * be returned if @use_ticket is set to true. |
| 777 | 776 | */ |
| 778 | 777 | static inline int __ttm_bo_reserve(struct ttm_buffer_object *bo, |
| 779 | − bool interruptible, | |
| 780 | − bool no_wait, bool use_ticket, | |
| 778 | + bool interruptible, bool no_wait, | |
| 781 | 779 | struct ww_acquire_ctx *ticket) |
| 782 | 780 | { |
| 783 | 781 | int ret = 0; |
| @@ -806,8 +804,7 @@ static inline int __ttm_bo_reserve(struct ttm_buffer_object *bo, · 22 unmodified lines | ||
| 806 | 804 | * @bo: A pointer to a struct ttm_buffer_object. |
| 807 | 805 | * @interruptible: Sleep interruptible if waiting. |
| 808 | 806 | * @no_wait: Don't sleep while trying to reserve, rather return -EBUSY. |
| 809 | − * @use_ticket: If @bo is already reserved, Only sleep waiting for | |
| 810 | − * it to become unreserved if @ticket->stamp is older. | |
| 807 | + * @ticket: ticket used to acquire the ww_mutex. | |
| 811 | 808 | * |
| 812 | 809 | * Locks a buffer object for validation. (Or prevents other processes from |
| 813 | 810 | * locking it for validation) and removes it from lru lists, while taking |
| @@ -846,15 +843,14 @@ static inline int __ttm_bo_reserve(struct ttm_buffer_object *bo, · 32 unmodified lines | ||
| 846 | 843 | * be returned if @use_ticket is set to true. |
| 847 | 844 | */ |
| 848 | 845 | static inline int ttm_bo_reserve(struct ttm_buffer_object *bo, |
| 849 | − bool interruptible, | |
| 850 | − bool no_wait, bool use_ticket, | |
| 846 | + bool interruptible, bool no_wait, | |
| 851 | 847 | struct ww_acquire_ctx *ticket) |
| 852 | 848 | { |
| 853 | 849 | int ret; |
| 854 | 850 | |
| 855 | 851 | WARN_ON(!atomic_read(&bo->kref.refcount)); |
| 856 | 852 | |
| 857 | − ret = __ttm_bo_reserve(bo, interruptible, no_wait, use_ticket, ticket); | |
| 853 | + ret = __ttm_bo_reserve(bo, interruptible, no_wait, ticket); | |
| 858 | 854 | if (likely(ret == 0)) |
| 859 | 855 | ttm_bo_del_sub_from_lru(bo); |
| 860 | 856 | |