drm/ttm: remove lazy parameter from ttm_bo_wait
authorChristian König <christian.koenig@amd.com>
Wed, 6 Apr 2016 09:12:04 +0000 (11:12 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 5 May 2016 00:21:26 +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>
13 files changed:
drivers/gpu/drm/nouveau/nouveau_bo.c
drivers/gpu/drm/nouveau/nouveau_gem.c
drivers/gpu/drm/qxl/qxl_cmd.c
drivers/gpu/drm/qxl/qxl_object.h
drivers/gpu/drm/radeon/radeon_object.c
drivers/gpu/drm/ttm/ttm_bo.c
drivers/gpu/drm/ttm/ttm_bo_util.c
drivers/gpu/drm/ttm/ttm_bo_vm.c
drivers/gpu/drm/virtio/virtgpu_object.c
drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c
drivers/gpu/drm/vmwgfx/vmwgfx_cotable.c
drivers/gpu/drm/vmwgfx/vmwgfx_resource.c
include/drm/ttm/ttm_bo_api.h

index ea8928671632c89e22813114b43dd166f3799022..5fe500033a958e1a024df0183148c1bbdae8d43d 100644 (file)
@@ -1322,7 +1322,7 @@ nouveau_bo_move(struct ttm_buffer_object *bo, bool evict, bool intr,
        }
 
        /* Fallback to software copy. */
-       ret = ttm_bo_wait(bo, true, intr, no_wait_gpu);
+       ret = ttm_bo_wait(bo, intr, no_wait_gpu);
        if (ret == 0)
                ret = ttm_bo_move_memcpy(bo, evict, no_wait_gpu, new_mem);
 
index 8d64b65770e00747508e5a35eec65f63397dc559..185aaaa0c85d25d0d329e41e8f555e5e6d10a66f 100644 (file)
@@ -126,7 +126,7 @@ nouveau_gem_object_unmap(struct nouveau_bo *nvbo, struct nvkm_vma *vma)
        list_del(&vma->head);
 
        if (fobj && fobj->shared_count > 1)
-               ttm_bo_wait(&nvbo->bo, true, false, false);
+               ttm_bo_wait(&nvbo->bo, false, false);
        else if (fobj && fobj->shared_count == 1)
                fence = rcu_dereference_protected(fobj->shared[0],
                                                reservation_object_held(resv));
@@ -651,7 +651,7 @@ nouveau_gem_pushbuf_reloc_apply(struct nouveau_cli *cli,
                                data |= r->vor;
                }
 
-               ret = ttm_bo_wait(&nvbo->bo, true, false, false);
+               ret = ttm_bo_wait(&nvbo->bo, false, false);
                if (ret) {
                        NV_PRINTK(err, cli, "reloc wait_idle failed: %d\n", ret);
                        break;
index fdc1833b1af8eef1675dbb73db5a6c82e75e6d93..b5d4b41361bdf3d78575e60d9c95d0b9da23a0d6 100644 (file)
@@ -624,7 +624,7 @@ static int qxl_reap_surf(struct qxl_device *qdev, struct qxl_bo *surf, bool stal
        if (stall)
                mutex_unlock(&qdev->surf_evict_mutex);
 
-       ret = ttm_bo_wait(&surf->tbo, true, true, !stall);
+       ret = ttm_bo_wait(&surf->tbo, true, !stall);
 
        if (stall)
                mutex_lock(&qdev->surf_evict_mutex);
index 483f131cefdf41578c6d968486deaa24aebb873b..4d8311373ba3ee6116256c6a1d5d32b86cc3e9b4 100644 (file)
@@ -79,7 +79,7 @@ static inline int qxl_bo_wait(struct qxl_bo *bo, u32 *mem_type,
        if (mem_type)
                *mem_type = bo->tbo.mem.mem_type;
 
-       r = ttm_bo_wait(&bo->tbo, true, true, no_wait);
+       r = ttm_bo_wait(&bo->tbo, true, no_wait);
        ttm_bo_unreserve(&bo->tbo);
        return r;
 }
index 7e0c16c74cf3a08582f6b40ff1c3e43e38be4db0..be30861afae9a8e2bb1fcc6ee261b5285f4dcb44 100644 (file)
@@ -838,7 +838,7 @@ int radeon_bo_wait(struct radeon_bo *bo, u32 *mem_type, bool no_wait)
        if (mem_type)
                *mem_type = bo->tbo.mem.mem_type;
 
-       r = ttm_bo_wait(&bo->tbo, true, true, no_wait);
+       r = ttm_bo_wait(&bo->tbo, true, no_wait);
        ttm_bo_unreserve(&bo->tbo);
        return r;
 }
index 75f04b5f8c0900923eb318dc4f41628776c5e74f..2631a4d25622d49063d0dd3d11a3bb337285570f 100644 (file)
@@ -455,7 +455,7 @@ static void ttm_bo_cleanup_refs_or_queue(struct ttm_buffer_object *bo)
        ret = __ttm_bo_reserve(bo, false, true, NULL);
 
        if (!ret) {
-               if (!ttm_bo_wait(bo, false, false, true)) {
+               if (!ttm_bo_wait(bo, false, true)) {
                        put_count = ttm_bo_del_from_lru(bo);
 
                        spin_unlock(&glob->lru_lock);
@@ -508,7 +508,7 @@ static int ttm_bo_cleanup_refs_and_unlock(struct ttm_buffer_object *bo,
        int put_count;
        int ret;
 
-       ret = ttm_bo_wait(bo, false, false, true);
+       ret = ttm_bo_wait(bo, false, true);
 
        if (ret && !no_wait_gpu) {
                long lret;
@@ -545,7 +545,7 @@ static int ttm_bo_cleanup_refs_and_unlock(struct ttm_buffer_object *bo,
                 * remove sync_obj with ttm_bo_wait, the wait should be
                 * finished, and no new wait object should have been added.
                 */
-               ret = ttm_bo_wait(bo, false, false, true);
+               ret = ttm_bo_wait(bo, false, true);
                WARN_ON(ret);
        }
 
@@ -684,7 +684,7 @@ static int ttm_bo_evict(struct ttm_buffer_object *bo, bool interruptible,
        struct ttm_placement placement;
        int ret = 0;
 
-       ret = ttm_bo_wait(bo, false, interruptible, no_wait_gpu);
+       ret = ttm_bo_wait(bo, interruptible, no_wait_gpu);
 
        if (unlikely(ret != 0)) {
                if (ret != -ERESTARTSYS) {
@@ -1006,7 +1006,7 @@ static int ttm_bo_move_buffer(struct ttm_buffer_object *bo,
                 * Have the driver move function wait for idle when necessary,
                 * instead of doing it here.
                 */
-               ret = ttm_bo_wait(bo, false, interruptible, no_wait_gpu);
+               ret = ttm_bo_wait(bo, interruptible, no_wait_gpu);
                if (ret)
                        return ret;
        }
@@ -1567,7 +1567,7 @@ void ttm_bo_unmap_virtual(struct ttm_buffer_object *bo)
 EXPORT_SYMBOL(ttm_bo_unmap_virtual);
 
 int ttm_bo_wait(struct ttm_buffer_object *bo,
-               bool lazy, bool interruptible, bool no_wait)
+               bool interruptible, bool no_wait)
 {
        struct reservation_object_list *fobj;
        struct reservation_object *resv;
@@ -1625,7 +1625,7 @@ int ttm_bo_synccpu_write_grab(struct ttm_buffer_object *bo, bool no_wait)
        ret = ttm_bo_reserve(bo, true, no_wait, NULL);
        if (unlikely(ret != 0))
                return ret;
-       ret = ttm_bo_wait(bo, false, true, no_wait);
+       ret = ttm_bo_wait(bo, true, no_wait);
        if (likely(ret == 0))
                atomic_inc(&bo->cpu_writers);
        ttm_bo_unreserve(bo);
@@ -1682,7 +1682,7 @@ static int ttm_bo_swapout(struct ttm_mem_shrink *shrink)
         * Wait for GPU, then move to system cached.
         */
 
-       ret = ttm_bo_wait(bo, false, false, false);
+       ret = ttm_bo_wait(bo, false, false);
 
        if (unlikely(ret != 0))
                goto out;
index ac6fe40b99f753b267a5e78647c0bdb2e078c5bd..d9831559706eb9312cf4803ac43e7113a6e41c5c 100644 (file)
@@ -645,7 +645,7 @@ int ttm_bo_move_accel_cleanup(struct ttm_buffer_object *bo,
 
        reservation_object_add_excl_fence(bo->resv, fence);
        if (evict) {
-               ret = ttm_bo_wait(bo, false, false, false);
+               ret = ttm_bo_wait(bo, false, false);
                if (ret)
                        return ret;
 
index dbd8d58cbc7d4a0a0c4010564eedfa029413e0da..3216878bced3d3debd16cca931589706de897795 100644 (file)
@@ -54,7 +54,7 @@ static int ttm_bo_vm_fault_idle(struct ttm_buffer_object *bo,
        /*
         * Quick non-stalling check for idle.
         */
-       ret = ttm_bo_wait(bo, false, false, true);
+       ret = ttm_bo_wait(bo, false, true);
        if (likely(ret == 0))
                goto out_unlock;
 
@@ -68,14 +68,14 @@ static int ttm_bo_vm_fault_idle(struct ttm_buffer_object *bo,
                        goto out_unlock;
 
                up_read(&vma->vm_mm->mmap_sem);
-               (void) ttm_bo_wait(bo, false, true, false);
+               (void) ttm_bo_wait(bo, true, false);
                goto out_unlock;
        }
 
        /*
         * Ordinary wait.
         */
-       ret = ttm_bo_wait(bo, false, true, false);
+       ret = ttm_bo_wait(bo, true, false);
        if (unlikely(ret != 0))
                ret = (ret != -ERESTARTSYS) ? VM_FAULT_SIGBUS :
                        VM_FAULT_NOPAGE;
index 208a1fdb21f46c15a14d27c54275e836905406d1..1483daebe057d099dcaf05cfe964b241efec12f9 100644 (file)
@@ -158,7 +158,7 @@ int virtio_gpu_object_wait(struct virtio_gpu_object *bo, bool no_wait)
        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);
+       r = ttm_bo_wait(&bo->tbo, true, no_wait);
        ttm_bo_unreserve(&bo->tbo);
        return r;
 }
index 3329f623c8bf7b89a4460287582b4f6b7fb204bd..e09423d75b6b8d0f08543383a88bf9d6e4392d85 100644 (file)
@@ -839,7 +839,7 @@ static void vmw_move_notify(struct ttm_buffer_object *bo,
  */
 static void vmw_swap_notify(struct ttm_buffer_object *bo)
 {
-       ttm_bo_wait(bo, false, false, false);
+       ttm_bo_wait(bo, false, false);
 }
 
 
index ddb3dd997437b76877a2fa23438fc1ee8fe0249f..265c81e6cf39412c8e9f7bea114fda72fa282e74 100644 (file)
@@ -423,7 +423,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, NULL));
 
-       ret = ttm_bo_wait(old_bo, false, false, false);
+       ret = ttm_bo_wait(old_bo, false, false);
        if (unlikely(ret != 0)) {
                DRM_ERROR("Failed waiting for cotable unbind.\n");
                goto out_wait;
index 9608d33a9fc4186dc06c933cd32868ad01837ca7..6a328d507a285e027bf9f355b2f5cb9b9a6da8c7 100644 (file)
@@ -1512,7 +1512,7 @@ void vmw_resource_move_notify(struct ttm_buffer_object *bo,
                        list_del_init(&res->mob_head);
                }
 
-               (void) ttm_bo_wait(bo, false, false, false);
+               (void) ttm_bo_wait(bo, false, false);
        }
 }
 
@@ -1605,7 +1605,7 @@ void vmw_query_move_notify(struct ttm_buffer_object *bo,
                if (fence != NULL)
                        vmw_fence_obj_unreference(&fence);
 
-               (void) ttm_bo_wait(bo, false, false, false);
+               (void) ttm_bo_wait(bo, false, false);
        } else
                mutex_unlock(&dev_priv->binding_mutex);
 
index 055a08ddac02a4a5b1149470f7bd74a03b173096..c801d9028e37388bc30a8254be8c4ae7df6acb22 100644 (file)
@@ -314,7 +314,7 @@ ttm_bo_reference(struct ttm_buffer_object *bo)
  * Returns -EBUSY if no_wait is true and the buffer is busy.
  * Returns -ERESTARTSYS if interrupted by a signal.
  */
-extern int ttm_bo_wait(struct ttm_buffer_object *bo, bool lazy,
+extern int ttm_bo_wait(struct ttm_buffer_object *bo,
                       bool interruptible, bool no_wait);
 /**
  * ttm_bo_validate