summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-01-15 20:16:45 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2013-01-15 22:24:09 +0000
commitd70be85dc723168a481c1955444afd951c4817bf (patch)
treee1895f66a5ff467d29444b7f4653a2430bbc35f4
parent1287c3a24c277cb42930d8af2943b9f7b016f31d (diff)
sna: Assert that we never try to mix INPLACE / ASYNC hints for move-to-cpu
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/sna_accel.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index a6affcfe..0b46218b 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -1444,13 +1444,15 @@ static inline bool use_cpu_bo_for_upload(struct sna *sna,
static inline bool operate_inplace(struct sna_pixmap *priv, unsigned flags)
{
- if ((priv->create & KGEM_CAN_CREATE_GTT) == 0) {
- DBG(("%s: no, not accessible via GTT\n", __FUNCTION__));
+ if ((flags & MOVE_INPLACE_HINT) == 0) {
+ DBG(("%s: no, inplace operation not suitable\n", __FUNCTION__));
return false;
}
- if ((flags & MOVE_INPLACE_HINT) == 0) {
- DBG(("%s: no, inplace operation not suitable\n", __FUNCTION__));
+ assert((flags & MOVE_ASYNC_HINT) == 0);
+
+ if ((priv->create & KGEM_CAN_CREATE_GTT) == 0) {
+ DBG(("%s: no, not accessible via GTT\n", __FUNCTION__));
return false;
}