Commit 009a9dad authored by Maarten Lankhorst's avatar Maarten Lankhorst Committed by Dave Airlie

drm/ttm: get rid of ttm_bo_is_reserved usage

Use lockdep_assert_held instead.
Signed-off-by: default avatarMaarten Lankhorst <maarten.lankhorst@canonical.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 34820324
...@@ -166,7 +166,7 @@ void ttm_bo_add_to_lru(struct ttm_buffer_object *bo) ...@@ -166,7 +166,7 @@ void ttm_bo_add_to_lru(struct ttm_buffer_object *bo)
struct ttm_bo_device *bdev = bo->bdev; struct ttm_bo_device *bdev = bo->bdev;
struct ttm_mem_type_manager *man; struct ttm_mem_type_manager *man;
BUG_ON(!ttm_bo_is_reserved(bo)); lockdep_assert_held(&bo->resv->lock.base);
if (!(bo->mem.placement & TTM_PL_FLAG_NO_EVICT)) { if (!(bo->mem.placement & TTM_PL_FLAG_NO_EVICT)) {
...@@ -671,7 +671,7 @@ static int ttm_bo_evict(struct ttm_buffer_object *bo, bool interruptible, ...@@ -671,7 +671,7 @@ static int ttm_bo_evict(struct ttm_buffer_object *bo, bool interruptible,
goto out; goto out;
} }
BUG_ON(!ttm_bo_is_reserved(bo)); lockdep_assert_held(&bo->resv->lock.base);
evict_mem = bo->mem; evict_mem = bo->mem;
evict_mem.mm_node = NULL; evict_mem.mm_node = NULL;
...@@ -961,7 +961,7 @@ int ttm_bo_move_buffer(struct ttm_buffer_object *bo, ...@@ -961,7 +961,7 @@ int ttm_bo_move_buffer(struct ttm_buffer_object *bo,
struct ttm_mem_reg mem; struct ttm_mem_reg mem;
struct ttm_bo_device *bdev = bo->bdev; struct ttm_bo_device *bdev = bo->bdev;
BUG_ON(!ttm_bo_is_reserved(bo)); lockdep_assert_held(&bo->resv->lock.base);
/* /*
* FIXME: It's possible to pipeline buffer moves. * FIXME: It's possible to pipeline buffer moves.
...@@ -1020,7 +1020,7 @@ int ttm_bo_validate(struct ttm_buffer_object *bo, ...@@ -1020,7 +1020,7 @@ int ttm_bo_validate(struct ttm_buffer_object *bo,
{ {
int ret; int ret;
BUG_ON(!ttm_bo_is_reserved(bo)); lockdep_assert_held(&bo->resv->lock.base);
/* Check that range is valid */ /* Check that range is valid */
if (placement->lpfn || placement->fpfn) if (placement->lpfn || placement->fpfn)
if (placement->fpfn > placement->lpfn || if (placement->fpfn > placement->lpfn ||
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment