Commit 42f6e3da authored by Maarten Lankhorst's avatar Maarten Lankhorst

drm/vmwgfx: always use ttm_bo_is_reserved

Signed-off-by: default avatarMaarten Lankhorst <maarten.lankhorst@canonical.com>
Reviewed-by: default avatarThomas Hellstrom <thellstrom@vmware.com>
parent 7b4cf994
...@@ -959,13 +959,13 @@ void vmw_resource_unreserve(struct vmw_resource *res, ...@@ -959,13 +959,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(atomic_read(&res->backup->base.reserved) == 0); BUG_ON(!ttm_bo_is_reserved(&res->backup->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(atomic_read(&new_backup->base.reserved) == 0); BUG_ON(!ttm_bo_is_reserved(&new_backup->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