[PATCH, FIXED] drm/vmwgfx: always use ttm_bo_is_reserved

Maarten Lankhorst maarten.lankhorst at canonical.com
Fri Nov 30 00:18:53 PST 2012


This was missed during the initial conversion, most likely due to the refactoring here.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst at canonical.com>
---
Woops, forgot to stg refresh before sending, fixed. :-)

diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c b/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c
index 93dffe3..ddc8db8 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c
@@ -939,13 +939,13 @@ void vmw_resource_unreserve(struct vmw_resource *res,
 	if (new_backup && new_backup != 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);
 			vmw_dmabuf_unreference(&res->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);
 	}
 	if (new_backup)



More information about the dri-devel mailing list