drm/ttm: remove use_ticket parameter from ttm_bo_reserve
authorChristian König <christian.koenig@amd.com>
Wed, 6 Apr 2016 09:12:03 +0000 (11:12 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 5 May 2016 00:21:21 +0000 (20:21 -0400)
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>
25 files changed:
drivers/gpu/drm/amd/amdgpu/amdgpu_object.h
drivers/gpu/drm/ast/ast_drv.h
drivers/gpu/drm/bochs/bochs_fbdev.c
drivers/gpu/drm/bochs/bochs_kms.c
drivers/gpu/drm/cirrus/cirrus_drv.h
drivers/gpu/drm/mgag200/mgag200_drv.h
drivers/gpu/drm/nouveau/nouveau_bo.c
drivers/gpu/drm/nouveau/nouveau_display.c
drivers/gpu/drm/nouveau/nouveau_gem.c
drivers/gpu/drm/qxl/qxl_object.h
drivers/gpu/drm/radeon/radeon_object.c
drivers/gpu/drm/radeon/radeon_object.h
drivers/gpu/drm/ttm/ttm_bo.c
drivers/gpu/drm/ttm/ttm_bo_vm.c
drivers/gpu/drm/ttm/ttm_execbuf_util.c
drivers/gpu/drm/virtio/virtgpu_drv.h
drivers/gpu/drm/virtio/virtgpu_object.c
drivers/gpu/drm/vmwgfx/vmwgfx_cotable.c
drivers/gpu/drm/vmwgfx/vmwgfx_dmabuf.c
drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
drivers/gpu/drm/vmwgfx/vmwgfx_mob.c
drivers/gpu/drm/vmwgfx/vmwgfx_resource.c
drivers/gpu/drm/vmwgfx/vmwgfx_shader.c
include/drm/ttm/ttm_bo_driver.h

index acc08018c6cc1ebfb50493b4e6a6080ab04de49a..bdb01d932548992099f5b77ed42de3fd2442a25e 100644 (file)
@@ -71,7 +71,7 @@ static inline int amdgpu_bo_reserve(struct amdgpu_bo *bo, bool no_intr)
 {
        int r;
 
-       r = ttm_bo_reserve(&bo->tbo, !no_intr, false, false, 0);
+       r = ttm_bo_reserve(&bo->tbo, !no_intr, false, NULL);
        if (unlikely(r != 0)) {
                if (r != -ERESTARTSYS)
                        dev_err(bo->adev->dev, "%p reserve failed\n", bo);
index eb5715994ac26e7a2c0b5c4844ca55bdabee72bb..908011d2c8f5200e92cc8db772b85315d5c16343 100644 (file)
@@ -367,7 +367,7 @@ static inline int ast_bo_reserve(struct ast_bo *bo, bool no_wait)
 {
        int ret;
 
-       ret = ttm_bo_reserve(&bo->bo, true, no_wait, false, NULL);
+       ret = ttm_bo_reserve(&bo->bo, true, no_wait, NULL);
        if (ret) {
                if (ret != -ERESTARTSYS && ret != -EBUSY)
                        DRM_ERROR("reserve failed %p\n", bo);
index 369f11f10c72df5eff55e3cfbfa7be34bf9bdccb..e1ec498a6b6eb3fa7577ec5e575b6640111d0511 100644 (file)
@@ -82,7 +82,7 @@ static int bochsfb_create(struct drm_fb_helper *helper,
 
        bo = gem_to_bochs_bo(gobj);
 
-       ret = ttm_bo_reserve(&bo->bo, true, false, false, NULL);
+       ret = ttm_bo_reserve(&bo->bo, true, false, NULL);
        if (ret)
                return ret;
 
index 89adfd916a7c5b1a78e6a1ec2a9ad2f5e9f4cd48..207a2cbcc1133c829dd1b2c28138bab82fbf216d 100644 (file)
@@ -43,7 +43,7 @@ static int bochs_crtc_mode_set_base(struct drm_crtc *crtc, int x, int y,
        if (old_fb) {
                bochs_fb = to_bochs_framebuffer(old_fb);
                bo = gem_to_bochs_bo(bochs_fb->obj);
-               ret = ttm_bo_reserve(&bo->bo, true, false, false, NULL);
+               ret = ttm_bo_reserve(&bo->bo, true, false, NULL);
                if (ret) {
                        DRM_ERROR("failed to reserve old_fb bo\n");
                } else {
@@ -57,7 +57,7 @@ static int bochs_crtc_mode_set_base(struct drm_crtc *crtc, int x, int y,
 
        bochs_fb = to_bochs_framebuffer(crtc->primary->fb);
        bo = gem_to_bochs_bo(bochs_fb->obj);
-       ret = ttm_bo_reserve(&bo->bo, true, false, false, NULL);
+       ret = ttm_bo_reserve(&bo->bo, true, false, NULL);
        if (ret)
                return ret;
 
index b774d637a00f8a020bce2018c31dd42f69744b25..2188d6b61b3ead5c2ad712ba60082d9d1327b348 100644 (file)
@@ -245,7 +245,7 @@ static inline int cirrus_bo_reserve(struct cirrus_bo *bo, bool no_wait)
 {
        int ret;
 
-       ret = ttm_bo_reserve(&bo->bo, true, no_wait, false, NULL);
+       ret = ttm_bo_reserve(&bo->bo, true, no_wait, NULL);
        if (ret) {
                if (ret != -ERESTARTSYS && ret != -EBUSY)
                        DRM_ERROR("reserve failed %p\n", bo);
index 205b2801d3b8674932c7781b8a714ae193abe098..3e02ac20777ce82fdf40b632ef8648064eb1a2dc 100644 (file)
@@ -281,7 +281,7 @@ static inline int mgag200_bo_reserve(struct mgag200_bo *bo, bool no_wait)
 {
        int ret;
 
-       ret = ttm_bo_reserve(&bo->bo, true, no_wait, false, NULL);
+       ret = ttm_bo_reserve(&bo->bo, true, no_wait, NULL);
        if (ret) {
                if (ret != -ERESTARTSYS && ret != -EBUSY)
                        DRM_ERROR("reserve failed %p\n", bo);
index 2cdaea58678daa204ce8909c8f38f124b5a5ed1e..ea8928671632c89e22813114b43dd166f3799022 100644 (file)
@@ -312,7 +312,7 @@ nouveau_bo_pin(struct nouveau_bo *nvbo, uint32_t memtype, bool contig)
        bool force = false, evict = false;
        int ret;
 
-       ret = ttm_bo_reserve(bo, false, false, false, NULL);
+       ret = ttm_bo_reserve(bo, false, false, NULL);
        if (ret)
                return ret;
 
@@ -385,7 +385,7 @@ nouveau_bo_unpin(struct nouveau_bo *nvbo)
        struct ttm_buffer_object *bo = &nvbo->bo;
        int ret, ref;
 
-       ret = ttm_bo_reserve(bo, false, false, false, NULL);
+       ret = ttm_bo_reserve(bo, false, false, NULL);
        if (ret)
                return ret;
 
@@ -420,7 +420,7 @@ nouveau_bo_map(struct nouveau_bo *nvbo)
 {
        int ret;
 
-       ret = ttm_bo_reserve(&nvbo->bo, false, false, false, NULL);
+       ret = ttm_bo_reserve(&nvbo->bo, false, false, NULL);
        if (ret)
                return ret;
 
index 816342645f42caf1ce558b06a82775f789ddc6b5..cf6e6171b428da1eab956ec91448d0fed4cf76ca 100644 (file)
@@ -739,7 +739,7 @@ nouveau_crtc_page_flip(struct drm_crtc *crtc, struct drm_framebuffer *fb,
        }
 
        mutex_lock(&cli->mutex);
-       ret = ttm_bo_reserve(&new_bo->bo, true, false, false, NULL);
+       ret = ttm_bo_reserve(&new_bo->bo, true, false, NULL);
        if (ret)
                goto fail_unpin;
 
@@ -753,7 +753,7 @@ nouveau_crtc_page_flip(struct drm_crtc *crtc, struct drm_framebuffer *fb,
        if (new_bo != old_bo) {
                ttm_bo_unreserve(&new_bo->bo);
 
-               ret = ttm_bo_reserve(&old_bo->bo, true, false, false, NULL);
+               ret = ttm_bo_reserve(&old_bo->bo, true, false, NULL);
                if (ret)
                        goto fail_unpin;
        }
index a0865c49ec83e95cb5477a41e1df4a1e2dc24160..8d64b65770e00747508e5a35eec65f63397dc559 100644 (file)
@@ -71,7 +71,7 @@ nouveau_gem_object_open(struct drm_gem_object *gem, struct drm_file *file_priv)
        if (!cli->vm)
                return 0;
 
-       ret = ttm_bo_reserve(&nvbo->bo, false, false, false, NULL);
+       ret = ttm_bo_reserve(&nvbo->bo, false, false, NULL);
        if (ret)
                return ret;
 
@@ -156,7 +156,7 @@ nouveau_gem_object_close(struct drm_gem_object *gem, struct drm_file *file_priv)
        if (!cli->vm)
                return;
 
-       ret = ttm_bo_reserve(&nvbo->bo, false, false, false, NULL);
+       ret = ttm_bo_reserve(&nvbo->bo, false, false, NULL);
        if (ret)
                return;
 
@@ -409,7 +409,7 @@ retry:
                        break;
                }
 
-               ret = ttm_bo_reserve(&nvbo->bo, true, false, true, &op->ticket);
+               ret = ttm_bo_reserve(&nvbo->bo, true, false, &op->ticket);
                if (ret) {
                        list_splice_tail_init(&vram_list, &op->list);
                        list_splice_tail_init(&gart_list, &op->list);
index 37af1bc0dd00102431e1f9415e0af7cf39b4edf8..483f131cefdf41578c6d968486deaa24aebb873b 100644 (file)
@@ -31,7 +31,7 @@ static inline int qxl_bo_reserve(struct qxl_bo *bo, bool no_wait)
 {
        int r;
 
-       r = ttm_bo_reserve(&bo->tbo, true, no_wait, false, NULL);
+       r = ttm_bo_reserve(&bo->tbo, true, no_wait, NULL);
        if (unlikely(r != 0)) {
                if (r != -ERESTARTSYS) {
                        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,
 {
        int r;
 
-       r = ttm_bo_reserve(&bo->tbo, true, no_wait, false, NULL);
+       r = ttm_bo_reserve(&bo->tbo, true, no_wait, NULL);
        if (unlikely(r != 0)) {
                if (r != -ERESTARTSYS) {
                        struct qxl_device *qdev = (struct qxl_device *)bo->gem_base.dev->dev_private;
index 2d901bf28a9448a90fc364f7eee0a2c7feec338f..7e0c16c74cf3a08582f6b40ff1c3e43e38be4db0 100644 (file)
@@ -832,7 +832,7 @@ int radeon_bo_wait(struct radeon_bo *bo, u32 *mem_type, bool no_wait)
 {
        int r;
 
-       r = ttm_bo_reserve(&bo->tbo, true, no_wait, false, NULL);
+       r = ttm_bo_reserve(&bo->tbo, true, no_wait, NULL);
        if (unlikely(r != 0))
                return r;
        if (mem_type)
index d8d295ee7c12d7c1106c97683526060bc78d8354..a10bb3deee5417a0481014d019a046c6d2b15c19 100644 (file)
@@ -65,7 +65,7 @@ static inline int radeon_bo_reserve(struct radeon_bo *bo, bool no_intr)
 {
        int r;
 
-       r = ttm_bo_reserve(&bo->tbo, !no_intr, false, false, NULL);
+       r = ttm_bo_reserve(&bo->tbo, !no_intr, false, NULL);
        if (unlikely(r != 0)) {
                if (r != -ERESTARTSYS)
                        dev_err(bo->rdev->dev, "%p reserve failed\n", bo);
index c1f22cb3ea43b461cb3978bb524315cc58d974eb..75f04b5f8c0900923eb318dc4f41628776c5e74f 100644 (file)
@@ -452,7 +452,7 @@ static void ttm_bo_cleanup_refs_or_queue(struct ttm_buffer_object *bo)
        int ret;
 
        spin_lock(&glob->lru_lock);
-       ret = __ttm_bo_reserve(bo, false, true, false, NULL);
+       ret = __ttm_bo_reserve(bo, false, true, NULL);
 
        if (!ret) {
                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,
                        return -EBUSY;
 
                spin_lock(&glob->lru_lock);
-               ret = __ttm_bo_reserve(bo, false, true, false, NULL);
+               ret = __ttm_bo_reserve(bo, false, true, NULL);
 
                /*
                 * 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)
                        kref_get(&nentry->list_kref);
                }
 
-               ret = __ttm_bo_reserve(entry, false, true, false, NULL);
+               ret = __ttm_bo_reserve(entry, false, true, NULL);
                if (remove_all && ret) {
                        spin_unlock(&glob->lru_lock);
-                       ret = __ttm_bo_reserve(entry, false, false,
-                                              false, NULL);
+                       ret = __ttm_bo_reserve(entry, false, false, NULL);
                        spin_lock(&glob->lru_lock);
                }
 
@@ -741,7 +740,7 @@ static int ttm_mem_evict_first(struct ttm_bo_device *bdev,
 
        spin_lock(&glob->lru_lock);
        list_for_each_entry(bo, &man->lru, lru) {
-               ret = __ttm_bo_reserve(bo, false, true, false, NULL);
+               ret = __ttm_bo_reserve(bo, false, true, NULL);
                if (!ret) {
                        if (place && (place->fpfn || place->lpfn)) {
                                /* 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)
         * Using ttm_bo_reserve makes sure the lru lists are updated.
         */
 
-       ret = ttm_bo_reserve(bo, true, no_wait, false, NULL);
+       ret = ttm_bo_reserve(bo, true, no_wait, NULL);
        if (unlikely(ret != 0))
                return ret;
        ret = ttm_bo_wait(bo, false, true, no_wait);
@@ -1656,7 +1655,7 @@ static int ttm_bo_swapout(struct ttm_mem_shrink *shrink)
 
        spin_lock(&glob->lru_lock);
        list_for_each_entry(bo, &glob->swap_lru, swap) {
-               ret = __ttm_bo_reserve(bo, false, true, false, NULL);
+               ret = __ttm_bo_reserve(bo, false, true, NULL);
                if (!ret)
                        break;
        }
@@ -1755,7 +1754,7 @@ int ttm_bo_wait_unreserved(struct ttm_buffer_object *bo)
                return -ERESTARTSYS;
        if (!ww_mutex_is_locked(&bo->resv->lock))
                goto out_unlock;
-       ret = __ttm_bo_reserve(bo, true, false, false, NULL);
+       ret = __ttm_bo_reserve(bo, true, false, NULL);
        if (unlikely(ret != 0))
                goto out_unlock;
        __ttm_bo_unreserve(bo);
index 06d26dc438b264dd76e7cbba28fd6b3d7c92fea3..dbd8d58cbc7d4a0a0c4010564eedfa029413e0da 100644 (file)
@@ -108,7 +108,7 @@ static int ttm_bo_vm_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
         * for reserve, and if it fails, retry the fault after waiting
         * for the buffer to become unreserved.
         */
-       ret = ttm_bo_reserve(bo, true, true, false, NULL);
+       ret = ttm_bo_reserve(bo, true, true, NULL);
        if (unlikely(ret != 0)) {
                if (ret != -EBUSY)
                        return VM_FAULT_NOPAGE;
index 3820ae97a03039cf0d95ee3b473642b589262299..a80717b35dc675cfd1e5c0d6da323073f471983d 100644 (file)
@@ -112,8 +112,7 @@ int ttm_eu_reserve_buffers(struct ww_acquire_ctx *ticket,
        list_for_each_entry(entry, list, head) {
                struct ttm_buffer_object *bo = entry->bo;
 
-               ret = __ttm_bo_reserve(bo, intr, (ticket == NULL), true,
-                                      ticket);
+               ret = __ttm_bo_reserve(bo, intr, (ticket == NULL), ticket);
                if (!ret && unlikely(atomic_read(&bo->cpu_writers) > 0)) {
                        __ttm_bo_unreserve(bo);
 
index 8f486f4c70235d11891fefb0f17124c746c4cc1f..0a54f43f846a9d560d4b626872a86eecda1cdaf7 100644 (file)
@@ -400,7 +400,7 @@ static inline int virtio_gpu_object_reserve(struct virtio_gpu_object *bo,
 {
        int r;
 
-       r = ttm_bo_reserve(&bo->tbo, true, no_wait, false, NULL);
+       r = ttm_bo_reserve(&bo->tbo, true, no_wait, NULL);
        if (unlikely(r != 0)) {
                if (r != -ERESTARTSYS) {
                        struct virtio_gpu_device *qdev =
index f300eba95bb1bff32ad8e9be2a8250779ec255b6..208a1fdb21f46c15a14d27c54275e836905406d1 100644 (file)
@@ -155,7 +155,7 @@ int virtio_gpu_object_wait(struct virtio_gpu_object *bo, bool no_wait)
 {
        int r;
 
-       r = ttm_bo_reserve(&bo->tbo, true, no_wait, false, NULL);
+       r = ttm_bo_reserve(&bo->tbo, true, no_wait, NULL);
        if (unlikely(r != 0))
                return r;
        r = ttm_bo_wait(&bo->tbo, true, true, no_wait);
index 092ea81eeff7116266caba8012fb2bc4fe38e42a..ddb3dd997437b76877a2fa23438fc1ee8fe0249f 100644 (file)
@@ -421,7 +421,7 @@ static int vmw_cotable_resize(struct vmw_resource *res, size_t new_size)
        }
 
        bo = &buf->base;
-       WARN_ON_ONCE(ttm_bo_reserve(bo, false, true, false, NULL));
+       WARN_ON_ONCE(ttm_bo_reserve(bo, false, true, NULL));
 
        ret = ttm_bo_wait(old_bo, false, false, false);
        if (unlikely(ret != 0)) {
index 299925a1f6c6783716ecacf6b70b9979b4646427..9b078a4939968d8521a96b3f83280f4f06b407bc 100644 (file)
@@ -56,7 +56,7 @@ int vmw_dmabuf_pin_in_placement(struct vmw_private *dev_priv,
 
        vmw_execbuf_release_pinned_bo(dev_priv);
 
-       ret = ttm_bo_reserve(bo, interruptible, false, false, NULL);
+       ret = ttm_bo_reserve(bo, interruptible, false, NULL);
        if (unlikely(ret != 0))
                goto err;
 
@@ -98,7 +98,7 @@ int vmw_dmabuf_pin_in_vram_or_gmr(struct vmw_private *dev_priv,
 
        vmw_execbuf_release_pinned_bo(dev_priv);
 
-       ret = ttm_bo_reserve(bo, interruptible, false, false, NULL);
+       ret = ttm_bo_reserve(bo, interruptible, false, NULL);
        if (unlikely(ret != 0))
                goto err;
 
@@ -174,7 +174,7 @@ int vmw_dmabuf_pin_in_start_of_vram(struct vmw_private *dev_priv,
                return ret;
 
        vmw_execbuf_release_pinned_bo(dev_priv);
-       ret = ttm_bo_reserve(bo, interruptible, false, false, NULL);
+       ret = ttm_bo_reserve(bo, interruptible, false, NULL);
        if (unlikely(ret != 0))
                goto err_unlock;
 
@@ -225,7 +225,7 @@ int vmw_dmabuf_unpin(struct vmw_private *dev_priv,
        if (unlikely(ret != 0))
                return ret;
 
-       ret = ttm_bo_reserve(bo, interruptible, false, false, NULL);
+       ret = ttm_bo_reserve(bo, interruptible, false, NULL);
        if (unlikely(ret != 0))
                goto err;
 
index e7335a48ebf6ec6ce51c288d04f017309d7a06d0..9555e204814a6cd1b56a87660c6b518a1038c9de 100644 (file)
@@ -326,7 +326,7 @@ static int vmw_dummy_query_bo_create(struct vmw_private *dev_priv)
        if (unlikely(ret != 0))
                return ret;
 
-       ret = ttm_bo_reserve(&vbo->base, false, true, false, NULL);
+       ret = ttm_bo_reserve(&vbo->base, false, true, NULL);
        BUG_ON(ret != 0);
        vmw_bo_pin_reserved(vbo, true);
 
index 4742ec4ead27c71629b806291e0c9b6ce9b10cc8..fc20d45e3da95f07c82ed84f670c90853a8c72d4 100644 (file)
@@ -98,7 +98,7 @@ int vmw_cursor_update_dmabuf(struct vmw_private *dev_priv,
        kmap_offset = 0;
        kmap_num = (width*height*4 + PAGE_SIZE - 1) >> PAGE_SHIFT;
 
-       ret = ttm_bo_reserve(&dmabuf->base, true, false, false, NULL);
+       ret = ttm_bo_reserve(&dmabuf->base, true, false, NULL);
        if (unlikely(ret != 0)) {
                DRM_ERROR("reserve failed\n");
                return -EINVAL;
@@ -318,7 +318,7 @@ void vmw_kms_cursor_snoop(struct vmw_surface *srf,
        kmap_offset = cmd->dma.guest.ptr.offset >> PAGE_SHIFT;
        kmap_num = (64*64*4) >> PAGE_SHIFT;
 
-       ret = ttm_bo_reserve(bo, true, false, false, NULL);
+       ret = ttm_bo_reserve(bo, true, false, NULL);
        if (unlikely(ret != 0)) {
                DRM_ERROR("reserve failed\n");
                return;
@@ -1859,7 +1859,7 @@ int vmw_kms_helper_buffer_prepare(struct vmw_private *dev_priv,
        struct ttm_buffer_object *bo = &buf->base;
        int ret;
 
-       ttm_bo_reserve(bo, false, false, interruptible, NULL);
+       ttm_bo_reserve(bo, false, false, NULL);
        ret = vmw_validate_single_buffer(dev_priv, bo, interruptible,
                                         validate_as_mob);
        if (ret)
index 23db16008e39f1301e5c25d49d9562ad9ce95f13..b6126a5f12695074a5f22a7d81ae31f4b9af9f83 100644 (file)
@@ -222,7 +222,7 @@ static void vmw_takedown_otable_base(struct vmw_private *dev_priv,
        if (bo) {
                int ret;
 
-               ret = ttm_bo_reserve(bo, false, true, false, NULL);
+               ret = ttm_bo_reserve(bo, false, true, NULL);
                BUG_ON(ret != 0);
 
                vmw_fence_single_bo(bo, NULL);
@@ -262,7 +262,7 @@ static int vmw_otable_batch_setup(struct vmw_private *dev_priv,
        if (unlikely(ret != 0))
                goto out_no_bo;
 
-       ret = ttm_bo_reserve(batch->otable_bo, false, true, false, NULL);
+       ret = ttm_bo_reserve(batch->otable_bo, false, true, NULL);
        BUG_ON(ret != 0);
        ret = vmw_bo_driver.ttm_tt_populate(batch->otable_bo->ttm);
        if (unlikely(ret != 0))
@@ -357,7 +357,7 @@ static void vmw_otable_batch_takedown(struct vmw_private *dev_priv,
                        vmw_takedown_otable_base(dev_priv, i,
                                                 &batch->otables[i]);
 
-       ret = ttm_bo_reserve(bo, false, true, false, NULL);
+       ret = ttm_bo_reserve(bo, false, true, NULL);
        BUG_ON(ret != 0);
 
        vmw_fence_single_bo(bo, NULL);
@@ -440,7 +440,7 @@ static int vmw_mob_pt_populate(struct vmw_private *dev_priv,
        if (unlikely(ret != 0))
                return ret;
 
-       ret = ttm_bo_reserve(mob->pt_bo, false, true, false, NULL);
+       ret = ttm_bo_reserve(mob->pt_bo, false, true, NULL);
 
        BUG_ON(ret != 0);
        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,
        const struct vmw_sg_table *vsgt;
        int ret;
 
-       ret = ttm_bo_reserve(bo, false, true, false, NULL);
+       ret = ttm_bo_reserve(bo, false, true, NULL);
        BUG_ON(ret != 0);
 
        vsgt = vmw_bo_sg_table(bo);
@@ -595,7 +595,7 @@ void vmw_mob_unbind(struct vmw_private *dev_priv,
        struct ttm_buffer_object *bo = mob->pt_bo;
 
        if (bo) {
-               ret = ttm_bo_reserve(bo, false, true, false, NULL);
+               ret = ttm_bo_reserve(bo, false, true, NULL);
                /*
                 * Noone else should be using this buffer.
                 */
index e57667ca75573d720cc7ec5143babb0da1e5693d..9608d33a9fc4186dc06c933cd32868ad01837ca7 100644 (file)
@@ -129,7 +129,7 @@ static void vmw_resource_release(struct kref *kref)
        if (res->backup) {
                struct ttm_buffer_object *bo = &res->backup->base;
 
-               ttm_bo_reserve(bo, false, false, false, NULL);
+               ttm_bo_reserve(bo, false, false, NULL);
                if (!list_empty(&res->mob_head) &&
                    res->func->unbind != NULL) {
                        struct ttm_validate_buffer val_buf;
@@ -1717,8 +1717,7 @@ int vmw_resource_pin(struct vmw_resource *res, bool interruptible)
                if (res->backup) {
                        vbo = res->backup;
 
-                       ttm_bo_reserve(&vbo->base, interruptible, false, false,
-                                      NULL);
+                       ttm_bo_reserve(&vbo->base, interruptible, false, NULL);
                        if (!vbo->pin_count) {
                                ret = ttm_bo_validate
                                        (&vbo->base,
@@ -1773,7 +1772,7 @@ void vmw_resource_unpin(struct vmw_resource *res)
        if (--res->pin_count == 0 && res->backup) {
                struct vmw_dma_buffer *vbo = res->backup;
 
-               ttm_bo_reserve(&vbo->base, false, false, false, NULL);
+               ttm_bo_reserve(&vbo->base, false, false, NULL);
                vmw_bo_pin_reserved(vbo, false);
                ttm_bo_unreserve(&vbo->base);
        }
index fd47547b0234c6e1299e3311ab9f23be03c08810..92f8b1d04f0f67cbcb4814fedc169c8c2d7d9f23 100644 (file)
@@ -988,7 +988,7 @@ int vmw_compat_shader_add(struct vmw_private *dev_priv,
        if (unlikely(ret != 0))
                goto out;
 
-       ret = ttm_bo_reserve(&buf->base, false, true, false, NULL);
+       ret = ttm_bo_reserve(&buf->base, false, true, NULL);
        if (unlikely(ret != 0))
                goto no_reserve;
 
index cb91f80c15b3d43dd50615dc07dc2c525644013c..2f622bca65613b044b57fffdfa715cfcbc5df0ad 100644 (file)
@@ -759,8 +759,7 @@ extern void ttm_bo_add_to_lru(struct ttm_buffer_object *bo);
  * @bo: A pointer to a struct ttm_buffer_object.
  * @interruptible: Sleep interruptible if waiting.
  * @no_wait: Don't sleep while trying to reserve, rather return -EBUSY.
- * @use_ticket: If @bo is already reserved, Only sleep waiting for
- * it to become unreserved if @ticket->stamp is older.
+ * @ticket: ticket used to acquire the ww_mutex.
  *
  * Will not remove reserved buffers from the lru lists.
  * Otherwise identical to ttm_bo_reserve.
@@ -776,8 +775,7 @@ extern void ttm_bo_add_to_lru(struct ttm_buffer_object *bo);
  * be returned if @use_ticket is set to true.
  */
 static inline int __ttm_bo_reserve(struct ttm_buffer_object *bo,
-                                  bool interruptible,
-                                  bool no_wait, bool use_ticket,
+                                  bool interruptible, bool no_wait,
                                   struct ww_acquire_ctx *ticket)
 {
        int ret = 0;
@@ -806,8 +804,7 @@ static inline int __ttm_bo_reserve(struct ttm_buffer_object *bo,
  * @bo: A pointer to a struct ttm_buffer_object.
  * @interruptible: Sleep interruptible if waiting.
  * @no_wait: Don't sleep while trying to reserve, rather return -EBUSY.
- * @use_ticket: If @bo is already reserved, Only sleep waiting for
- * it to become unreserved if @ticket->stamp is older.
+ * @ticket: ticket used to acquire the ww_mutex.
  *
  * Locks a buffer object for validation. (Or prevents other processes from
  * 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,
  * be returned if @use_ticket is set to true.
  */
 static inline int ttm_bo_reserve(struct ttm_buffer_object *bo,
-                                bool interruptible,
-                                bool no_wait, bool use_ticket,
+                                bool interruptible, bool no_wait,
                                 struct ww_acquire_ctx *ticket)
 {
        int ret;
 
        WARN_ON(!atomic_read(&bo->kref.refcount));
 
-       ret = __ttm_bo_reserve(bo, interruptible, no_wait, use_ticket, ticket);
+       ret = __ttm_bo_reserve(bo, interruptible, no_wait, ticket);
        if (likely(ret == 0))
                ttm_bo_del_sub_from_lru(bo);