aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/vmwgfx/vmwgfx_resource.c')
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_resource.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c b/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c
index e01a17b407b2..16556170fb32 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c
@@ -959,13 +959,13 @@ void vmw_resource_unreserve(struct vmw_resource *res,
959 if (new_backup && new_backup != res->backup) { 959 if (new_backup && new_backup != res->backup) {
960 960
961 if (res->backup) { 961 if (res->backup) {
962 BUG_ON(atomic_read(&res->backup->base.reserved) == 0); 962 BUG_ON(!ttm_bo_is_reserved(&res->backup->base));
963 list_del_init(&res->mob_head); 963 list_del_init(&res->mob_head);
964 vmw_dmabuf_unreference(&res->backup); 964 vmw_dmabuf_unreference(&res->backup);
965 } 965 }
966 966
967 res->backup = vmw_dmabuf_reference(new_backup); 967 res->backup = vmw_dmabuf_reference(new_backup);
968 BUG_ON(atomic_read(&new_backup->base.reserved) == 0); 968 BUG_ON(!ttm_bo_is_reserved(&new_backup->base));
969 list_add_tail(&res->mob_head, &new_backup->res_list); 969 list_add_tail(&res->mob_head, &new_backup->res_list);
970 } 970 }
971 if (new_backup) 971 if (new_backup)