drm/radeon: Use ttm_bo_is_reserved
authorMaarten Lankhorst <maarten.lankhorst@canonical.com>
Fri, 12 Oct 2012 14:59:17 +0000 (14:59 +0000)
committerDave Airlie <airlied@redhat.com>
Wed, 7 Nov 2012 00:58:14 +0000 (10:58 +1000)
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/radeon/radeon_gart.c
drivers/gpu/drm/radeon/radeon_object.c
drivers/gpu/drm/radeon/radeon_object.h

index 4debd60e5aa63390f0f386ee236bfc42fe4f8cf3..8690be757d80e532cf20700499efc0cca902f212 100644 (file)
@@ -1237,7 +1237,7 @@ void radeon_vm_bo_invalidate(struct radeon_device *rdev,
 {
        struct radeon_bo_va *bo_va;
 
-       BUG_ON(!atomic_read(&bo->tbo.reserved));
+       BUG_ON(!radeon_bo_is_reserved(bo));
        list_for_each_entry(bo_va, &bo->va, bo_list) {
                bo_va->valid = false;
        }
index b91118ccef867f5b59effd78d0ee93d65a932f8b..65c55556fd3f7677fe78dd2c16ae8ecbb4a13072 100644 (file)
@@ -384,7 +384,7 @@ int radeon_bo_get_surface_reg(struct radeon_bo *bo)
        int steal;
        int i;
 
-       BUG_ON(!atomic_read(&bo->tbo.reserved));
+       BUG_ON(!radeon_bo_is_reserved(bo));
 
        if (!bo->tiling_flags)
                return 0;
@@ -510,7 +510,7 @@ void radeon_bo_get_tiling_flags(struct radeon_bo *bo,
                                uint32_t *tiling_flags,
                                uint32_t *pitch)
 {
-       BUG_ON(!atomic_read(&bo->tbo.reserved));
+       BUG_ON(!radeon_bo_is_reserved(bo));
        if (tiling_flags)
                *tiling_flags = bo->tiling_flags;
        if (pitch)
@@ -520,7 +520,7 @@ void radeon_bo_get_tiling_flags(struct radeon_bo *bo,
 int radeon_bo_check_tiling(struct radeon_bo *bo, bool has_moved,
                                bool force_drop)
 {
-       BUG_ON(!atomic_read(&bo->tbo.reserved));
+       BUG_ON(!radeon_bo_is_reserved(bo));
 
        if (!(bo->tiling_flags & RADEON_TILING_SURFACE))
                return 0;
index 93cd491fff2ee381929def0859828728b565dc4a..5fc86b03043b60e95d9c5d2dc5b1487fb62316be 100644 (file)
@@ -80,7 +80,7 @@ static inline unsigned long radeon_bo_size(struct radeon_bo *bo)
 
 static inline bool radeon_bo_is_reserved(struct radeon_bo *bo)
 {
-       return !!atomic_read(&bo->tbo.reserved);
+       return ttm_bo_is_reserved(&bo->tbo);
 }
 
 static inline unsigned radeon_bo_ngpu_pages(struct radeon_bo *bo)