From 39970c67b77014caac9a4c3a33765ac7a312b54e Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Mon, 6 Jul 2009 13:34:24 +1000 Subject: radeon: move cs space checking code to libdrm_radeon. This ports a lot of the space checking code into a the common library, so that the DDX and mesa can use it. --- libdrm/radeon/radeon_bo.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'libdrm/radeon/radeon_bo.h') diff --git a/libdrm/radeon/radeon_bo.h b/libdrm/radeon/radeon_bo.h index 3cabdfc4..597d0ef6 100644 --- a/libdrm/radeon/radeon_bo.h +++ b/libdrm/radeon/radeon_bo.h @@ -68,6 +68,7 @@ struct radeon_bo_funcs { int (*bo_map)(struct radeon_bo *bo, int write); int (*bo_unmap)(struct radeon_bo *bo); int (*bo_wait)(struct radeon_bo *bo); + int (*bo_is_static)(struct radeon_bo *bo); }; struct radeon_bo_manager { @@ -161,6 +162,13 @@ static inline int _radeon_bo_wait(struct radeon_bo *bo, return bo->bom->funcs->bo_wait(bo); } +static inline int radeon_bo_is_static(struct radeon_bo *bo) +{ + if (bo->bom->funcs->bo_is_static) + return bo->bom->funcs->bo_is_static(bo); + return 0; +} + #define radeon_bo_open(bom, h, s, a, d, f)\ _radeon_bo_open(bom, h, s, a, d, f, __FILE__, __FUNCTION__, __LINE__) #define radeon_bo_ref(bo)\ -- cgit v1.2.3