summaryrefslogtreecommitdiff
path: root/src/sna/kgem.h
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-10-16 17:57:55 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2011-10-16 19:39:24 +0100
commit6fdc9e3fd3f8defb7ad62de11f8cb069a10e5736 (patch)
treeece1f5a5d51d750fd34da27c928922e37280d596 /src/sna/kgem.h
parent30dff81cd62b5fc5a28d5175a08c5a3ee09667bd (diff)
sna: Simplify busy tracking by trusting the bo->gpu flag
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/kgem.h')
-rw-r--r--src/sna/kgem.h13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/sna/kgem.h b/src/sna/kgem.h
index 49ca3d70..aba8d3fe 100644
--- a/src/sna/kgem.h
+++ b/src/sna/kgem.h
@@ -305,15 +305,12 @@ Bool kgem_bo_write(struct kgem *kgem, struct kgem_bo *bo,
static inline bool kgem_bo_is_busy(struct kgem_bo *bo)
{
- DBG_HDR(("%s: exec? %d, gpu? %d, rq? %d\n",
- __FUNCTION__, bo->exec != NULL, bo->gpu, bo->rq != NULL));
+ DBG_HDR(("%s: gpu? %d exec? %d, rq? %d\n",
+ __FUNCTION__, bo->gpu, bo->exec != NULL, bo->rq != NULL));
- if (bo->exec)
- return true;
- if (!bo->gpu)
- return false;
-
- return bo->rq != NULL;
+ assert(bo->proxy == NULL);
+ assert(bo->gpu || bo->rq == NULL);
+ return bo->gpu;
}
static inline bool kgem_bo_is_dirty(struct kgem_bo *bo)