Commit 8bd4ce56 authored by Maarten Lankhorst's avatar Maarten Lankhorst Committed by Dave Airlie

drm/vmwgfx: 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 977c38d5
...@@ -302,7 +302,7 @@ void vmw_bo_pin(struct ttm_buffer_object *bo, bool pin) ...@@ -302,7 +302,7 @@ void vmw_bo_pin(struct ttm_buffer_object *bo, bool pin)
uint32_t old_mem_type = bo->mem.mem_type; uint32_t old_mem_type = bo->mem.mem_type;
int ret; int ret;
BUG_ON(!ttm_bo_is_reserved(bo)); lockdep_assert_held(&bo->resv->lock.base);
BUG_ON(old_mem_type != TTM_PL_VRAM && BUG_ON(old_mem_type != TTM_PL_VRAM &&
old_mem_type != VMW_PL_GMR); old_mem_type != VMW_PL_GMR);
......
...@@ -958,13 +958,13 @@ void vmw_resource_unreserve(struct vmw_resource *res, ...@@ -958,13 +958,13 @@ void vmw_resource_unreserve(struct vmw_resource *res,
if (new_backup && new_backup != res->backup) { if (new_backup && new_backup != res->backup) {
if (res->backup) { if (res->backup) {
BUG_ON(!ttm_bo_is_reserved(&res->backup->base)); lockdep_assert_held(&res->backup->base.resv->lock.base);
list_del_init(&res->mob_head); list_del_init(&res->mob_head);
vmw_dmabuf_unreference(&res->backup); vmw_dmabuf_unreference(&res->backup);
} }
res->backup = vmw_dmabuf_reference(new_backup); res->backup = vmw_dmabuf_reference(new_backup);
BUG_ON(!ttm_bo_is_reserved(&new_backup->base)); lockdep_assert_held(&new_backup->base.resv->lock.base);
list_add_tail(&res->mob_head, &new_backup->res_list); list_add_tail(&res->mob_head, &new_backup->res_list);
} }
if (new_backup) if (new_backup)
......
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