summaryrefslogtreecommitdiff
path: root/src/sna/kgem.h
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-08-18 14:33:44 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2013-08-18 14:45:39 +0100
commited40a7c3de3bbb178278c05907e59239712b98b6 (patch)
treead52b3bfc1e624debfa2cfe9972ce47a0ad19874 /src/sna/kgem.h
parent4486ae2d829781e32652bce84c08e63ee1960bf0 (diff)
sna/gen6+: Tweak semaphore avoidance for composite operations
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/kgem.h')
-rw-r--r--src/sna/kgem.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/sna/kgem.h b/src/sna/kgem.h
index 63bba4cb..49f0eecf 100644
--- a/src/sna/kgem.h
+++ b/src/sna/kgem.h
@@ -645,6 +645,14 @@ static inline bool __kgem_bo_is_busy(struct kgem *kgem, struct kgem_bo *bo)
return kgem_bo_is_busy(bo);
}
+static inline bool kgem_bo_is_render(struct kgem_bo *bo)
+{
+ DBG(("%s: handle=%d, rq? %d [%d]\n", __FUNCTION__,
+ bo->handle, bo->rq != NULL, RQ_RING(bo->rq)));
+ assert(bo->refcnt);
+ return bo->rq && RQ_RING(bo->rq) == I915_EXEC_RENDER;
+}
+
static inline void kgem_bo_mark_unreusable(struct kgem_bo *bo)
{
while (bo->proxy) {