drm/ttm: Remove the ttm_bo_block_reservation() function.

It's unused and buggy in its current form, since it can place a bo
in the reserved state without removing it from lru lists.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
Thomas Hellstrom
2010-04-28 11:33:25 +02:00
committed by Dave Airlie
parent 5be6eff965
commit 8cfe92d683
2 changed files with 1 additions and 57 deletions

View File

@@ -1716,40 +1716,12 @@ int ttm_bo_wait(struct ttm_buffer_object *bo,
}
EXPORT_SYMBOL(ttm_bo_wait);
void ttm_bo_unblock_reservation(struct ttm_buffer_object *bo)
{
atomic_set(&bo->reserved, 0);
wake_up_all(&bo->event_queue);
}
int ttm_bo_block_reservation(struct ttm_buffer_object *bo, bool interruptible,
bool no_wait)
{
int ret;
while (unlikely(atomic_cmpxchg(&bo->reserved, 0, 1) != 0)) {
if (no_wait)
return -EBUSY;
else if (interruptible) {
ret = wait_event_interruptible
(bo->event_queue, atomic_read(&bo->reserved) == 0);
if (unlikely(ret != 0))
return ret;
} else {
wait_event(bo->event_queue,
atomic_read(&bo->reserved) == 0);
}
}
return 0;
}
int ttm_bo_synccpu_write_grab(struct ttm_buffer_object *bo, bool no_wait)
{
int ret = 0;
/*
* Using ttm_bo_reserve instead of ttm_bo_block_reservation
* makes sure the lru lists are updated.
* Using ttm_bo_reserve makes sure the lru lists are updated.
*/
ret = ttm_bo_reserve(bo, true, no_wait, false, 0);