diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2014-04-23 14:23:55 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2014-04-24 13:54:30 +0100 |
commit | c872be6cbef3b07dc79fc8f83d719543c0adcdee (patch) | |
tree | fdc4da8e6bafe5a17a3aeaf5a02ba3ce39123df7 | |
parent | 05cf93287419992208493f5098fc7b089e95b20c (diff) |
sna: INPLACE has early exits in move-to-cpu
We can update the priv->cpu flag more accurately by accounting for the
early exits for the INPLACE accessors.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/sna_accel.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index 4c10f1b0..1a42d963 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -2272,9 +2272,7 @@ done: assert((flags & MOVE_WRITE) == 0 || !kgem_bo_is_busy(priv->cpu_bo)); } } - priv->cpu = - (flags & (MOVE_INPLACE_HINT | MOVE_ASYNC_HINT)) == 0 && - !DAMAGE_IS_ALL(priv->gpu_damage); + priv->cpu |= (flags & (MOVE_WRITE |MOVE_ASYNC_HINT)) == MOVE_WRITE; assert(pixmap->devPrivate.ptr == PTR(priv->ptr)); assert(pixmap->devKind); assert_pixmap_damage(pixmap); @@ -2970,9 +2968,7 @@ out: FORCE_FULL_SYNC || flags & MOVE_WRITE); assert((flags & MOVE_WRITE) == 0 || !kgem_bo_is_busy(priv->cpu_bo)); } - priv->cpu = - (flags & (MOVE_INPLACE_HINT | MOVE_ASYNC_HINT)) == 0 && - !DAMAGE_IS_ALL(priv->gpu_damage); + priv->cpu |= (flags & (MOVE_WRITE |MOVE_ASYNC_HINT)) == MOVE_WRITE; assert(pixmap->devPrivate.ptr == PTR(priv->ptr)); assert(pixmap->devKind); assert_pixmap_damage(pixmap); |