diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-07-09 11:09:16 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-07-09 11:41:17 +0100 |
commit | b11bc37684181390fc1400afb44054785104ca15 (patch) | |
tree | aa6847b9ba6ebc3baa280161372114804bbfc146 /src/sna/kgem.h | |
parent | 21798a88676e91049917fafd3196dd4374b94226 (diff) |
sna: Simplify the DBG incarnation
It was only ever used in conjunction with HAS_DEBUG_FULL. For debug
purposes it is as easy to redefine DBG locally. By simplifying the DBG
macro we can create it consistently and so reduce the number of compiler
warnings.
Long term, this has to be dynamic. Sigh.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/kgem.h')
-rw-r--r-- | src/sna/kgem.h | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/src/sna/kgem.h b/src/sna/kgem.h index 22ae4019..8d01807b 100644 --- a/src/sna/kgem.h +++ b/src/sna/kgem.h @@ -36,10 +36,10 @@ #include "compiler.h" -#if DEBUG_KGEM -#define DBG_HDR(x) ErrorF x +#if HAS_DEBUG_FULL +#define DBG(x) ErrorF x #else -#define DBG_HDR(x) +#define DBG(x) #endif struct kgem_bo { @@ -455,8 +455,8 @@ static inline bool kgem_bo_can_blt(struct kgem *kgem, static inline bool kgem_bo_is_mappable(struct kgem *kgem, struct kgem_bo *bo) { - DBG_HDR(("%s: domain=%d, offset: %d size: %d\n", - __FUNCTION__, bo->domain, bo->presumed_offset, kgem_bo_size(bo))); + DBG(("%s: domain=%d, offset: %d size: %d\n", + __FUNCTION__, bo->domain, bo->presumed_offset, kgem_bo_size(bo))); if (bo->domain == DOMAIN_GTT) return true; @@ -473,8 +473,8 @@ static inline bool kgem_bo_is_mappable(struct kgem *kgem, static inline bool kgem_bo_mapped(struct kgem_bo *bo) { - DBG_HDR(("%s: map=%p, tiling=%d, domain=%d\n", - __FUNCTION__, bo->map, bo->tiling, bo->domain)); + DBG(("%s: map=%p, tiling=%d, domain=%d\n", + __FUNCTION__, bo->map, bo->tiling, bo->domain)); if (bo->map == NULL) return bo->tiling == I915_TILING_NONE && bo->domain == DOMAIN_CPU; @@ -496,15 +496,15 @@ static inline bool kgem_bo_can_map(struct kgem *kgem, struct kgem_bo *bo) static inline bool kgem_bo_is_busy(struct kgem_bo *bo) { - DBG_HDR(("%s: handle=%d, domain: %d exec? %d, rq? %d\n", __FUNCTION__, - bo->handle, bo->domain, bo->exec != NULL, bo->rq != NULL)); + DBG(("%s: handle=%d, domain: %d exec? %d, rq? %d\n", __FUNCTION__, + bo->handle, bo->domain, bo->exec != NULL, bo->rq != NULL)); return bo->rq; } static inline bool __kgem_bo_is_busy(struct kgem *kgem, struct kgem_bo *bo) { - DBG_HDR(("%s: handle=%d, domain: %d exec? %d, rq? %d\n", __FUNCTION__, - bo->handle, bo->domain, bo->exec != NULL, bo->rq != NULL)); + DBG(("%s: handle=%d, domain: %d exec? %d, rq? %d\n", __FUNCTION__, + bo->handle, bo->domain, bo->exec != NULL, bo->rq != NULL)); if (bo->rq && !bo->exec) kgem_retire(kgem); return kgem_bo_is_busy(bo); @@ -520,7 +520,7 @@ static inline bool kgem_bo_is_dirty(struct kgem_bo *bo) static inline void kgem_bo_mark_dirty(struct kgem_bo *bo) { - DBG_HDR(("%s: handle=%d\n", __FUNCTION__, bo->handle)); + DBG(("%s: handle=%d\n", __FUNCTION__, bo->handle)); bo->dirty = true; } @@ -558,6 +558,4 @@ static inline void __kgem_batch_debug(struct kgem *kgem, uint32_t nbatch) } #endif -#undef DBG_HDR - #endif /* KGEM_H */ |