diff mbox

[FIXED] drm/vmwgfx: always use ttm_bo_is_reserved

Message ID 50B86BED.2050205@canonical.com (mailing list archive)
State New, archived
Headers show

Commit Message

Maarten Lankhorst Nov. 30, 2012, 8:18 a.m. UTC
This was missed during the initial conversion, most likely due to the refactoring here.

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

Comments

Thomas Hellstrom Nov. 30, 2012, 8:53 a.m. UTC | #1
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>

On 11/30/2012 09:18 AM, Maarten Lankhorst wrote:
> This was missed during the initial conversion, most likely due to the refactoring here.
>
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@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)
diff mbox

Patch

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)