diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2013-03-12 15:26:28 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2013-03-12 15:27:16 +0000 |
commit | a31831bce86745205369faaa297064770f4350f9 (patch) | |
tree | 8820c573f30ec76a13f1fb40614cb3adba5b5a0a | |
parent | 09862a85eba243babde9ca721ca6521566f5c082 (diff) |
sna: Improve asserts that the CPU bo is not busy after synchronisation
Taking into account that we may not do a full synchronisation.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/sna_accel.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index ce633382..ead4692b 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -1691,6 +1691,7 @@ skip_inplace_map: assert(IS_CPU_MAP(priv->gpu_bo->map)); kgem_bo_sync__cpu_full(&sna->kgem, priv->gpu_bo, FORCE_FULL_SYNC || flags & MOVE_WRITE); + assert((flags & MOVE_WRITE) == 0 || !kgem_bo_is_busy(priv->gpu_bo)); assert_pixmap_damage(pixmap); DBG(("%s: operate inplace (CPU)\n", __FUNCTION__)); return true; @@ -1801,7 +1802,7 @@ done: assert(IS_CPU_MAP(priv->cpu_bo->map)); kgem_bo_sync__cpu_full(&sna->kgem, priv->cpu_bo, FORCE_FULL_SYNC || flags & MOVE_WRITE); - assert(!priv->shm || !kgem_bo_is_busy(priv->cpu_bo)); + assert((flags & MOVE_WRITE) == 0 || !kgem_bo_is_busy(priv->cpu_bo)); } if (flags & MOVE_WRITE) { DBG(("%s: discarding GPU bo in favour of CPU bo\n", __FUNCTION__)); @@ -2333,6 +2334,7 @@ out: assert(IS_CPU_MAP(priv->cpu_bo->map)); kgem_bo_sync__cpu_full(&sna->kgem, priv->cpu_bo, FORCE_FULL_SYNC || flags & MOVE_WRITE); + assert((flags & MOVE_WRITE) == 0 || !kgem_bo_is_busy(priv->cpu_bo)); } priv->cpu = (flags & MOVE_ASYNC_HINT) == 0; assert(pixmap->devPrivate.ptr); |