diff options
author | Maarten Lankhorst <m.b.lankhorst@gmail.com> | 2013-06-27 13:48:26 +0200 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2013-06-28 04:04:12 +0200 |
commit | 977c38d50ee286b8367b65885346dd58eccd0514 (patch) | |
tree | 772098b649e3a85e8dec5149950516a5029fb08a /drivers/gpu/drm/radeon/radeon_object.c | |
parent | drm/ttm: get rid of ttm_bo_is_reserved usage (diff) | |
download | linux-977c38d50ee286b8367b65885346dd58eccd0514.tar.xz linux-977c38d50ee286b8367b65885346dd58eccd0514.zip |
drm/radeon: get rid of ttm_bo_is_reserved usage
Try to use lockdep_assert_held or other alternatives where possible.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Reviewed-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_object.c')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_object.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_object.c b/drivers/gpu/drm/radeon/radeon_object.c index d850dc66f4da..0219d263e2df 100644 --- a/drivers/gpu/drm/radeon/radeon_object.c +++ b/drivers/gpu/drm/radeon/radeon_object.c @@ -400,7 +400,7 @@ int radeon_bo_get_surface_reg(struct radeon_bo *bo) int steal; int i; - BUG_ON(!radeon_bo_is_reserved(bo)); + lockdep_assert_held(&bo->tbo.resv->lock.base); if (!bo->tiling_flags) return 0; @@ -526,7 +526,8 @@ void radeon_bo_get_tiling_flags(struct radeon_bo *bo, uint32_t *tiling_flags, uint32_t *pitch) { - BUG_ON(!radeon_bo_is_reserved(bo)); + lockdep_assert_held(&bo->tbo.resv->lock.base); + if (tiling_flags) *tiling_flags = bo->tiling_flags; if (pitch) @@ -536,7 +537,8 @@ 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(!radeon_bo_is_reserved(bo) && !force_drop); + if (!force_drop) + lockdep_assert_held(&bo->tbo.resv->lock.base); if (!(bo->tiling_flags & RADEON_TILING_SURFACE)) return 0; |