Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
 {
        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;
        }
 
        int steal;
        int i;
 
-       BUG_ON(!atomic_read(&bo->tbo.reserved));
+       BUG_ON(!radeon_bo_is_reserved(bo));
 
        if (!bo->tiling_flags)
                return 0;
                                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)
 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;
 
 
 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)