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>
This commit is contained in:
Chris Wilson 2014-04-23 14:23:55 +01:00
parent 05cf932874
commit c872be6cbe
1 changed files with 2 additions and 6 deletions

View File

@ -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);