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>
This commit is contained in:
Maarten Lankhorst
2013-06-27 13:48:26 +02:00
committed by Dave Airlie
parent 009a9dadb6
commit 977c38d50e
3 changed files with 43 additions and 45 deletions

View File

@@ -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;