drm/radeon: Use ttm_bo_is_reserved
Subsystems (2)
PATCH 2/3 drm/radeon: Use ttm_bo_is_reserved
Signed-off-by Maarten Lankhorst <[email protected]>
--- drivers/gpu/drm/radeon/radeon_gart.c | 2 +- drivers/gpu/drm/radeon/radeon_object.c | 6 +++--- drivers/gpu/drm/radeon/radeon_object.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-)
drivers/gpu/drm/radeon/radeon_gart.c +1 -1
@@ -1044,7 +1044,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; }
drivers/gpu/drm/radeon/radeon_object.c +3 -3
@@ -403,7 +403,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 ;
@@ -529,7 +529,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)
@@ -539,7 +539,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 ;
drivers/gpu/drm/radeon/radeon_object.h +1 -1
@@ -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)
Quoted 65 lines · Maarten Lankhorst
Signed-off-by Maarten Lankhorst <[email protected]>--- drivers/gpu/drm/radeon/radeon_gart.c | 2 +- drivers/gpu/drm/radeon/radeon_object.c | 6 +++--- drivers/gpu/drm/radeon/radeon_object.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-)drivers/gpu/drm/radeon/radeon_gart.c +1
-1@@ -1044,7 +1044,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; }drivers/gpu/drm/radeon/radeon_object.c +3
-3@@ -403,7 +403,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 ;@@ -529,7 +529,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)@@ -539,7 +539,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 ;drivers/gpu/drm/radeon/radeon_object.h +1
-1@@ -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)
Quoted 4 lines
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Looks good.
Reviewed-by Thomas Hellstrom <[email protected]>