summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2014-01-17 09:02:55 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2014-01-17 09:16:34 +0000
commit34192006c65640327bc81e2765f5ef5db3c539e3 (patch)
tree9a6057ab6963f3918cf6bd95c3883939f583545a
parentcea442c0d0d7f1ef95d9d8048668eecbdcbc9a4e (diff)
sna: Intensify the move-to-cpu pointer paranoia
Rather than just state that the final pixmap->devPrivate.ptr is non-NULL, we can assert that it matches the shadow value. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/sna_accel.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index 3c3b21f2..5d25bf71 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -2227,7 +2227,7 @@ done:
priv->cpu =
(flags & (MOVE_INPLACE_HINT | MOVE_ASYNC_HINT)) == 0 &&
!DAMAGE_IS_ALL(priv->gpu_damage);
- assert(pixmap->devPrivate.ptr);
+ assert(pixmap->devPrivate.ptr == PTR(priv->ptr));
assert(pixmap->devKind);
assert_pixmap_damage(pixmap);
assert(has_coherent_ptr(sna, sna_pixmap(pixmap), flags));
@@ -2882,7 +2882,7 @@ out:
priv->cpu =
(flags & (MOVE_INPLACE_HINT | MOVE_ASYNC_HINT)) == 0 &&
!DAMAGE_IS_ALL(priv->gpu_damage);
- assert(pixmap->devPrivate.ptr);
+ assert(pixmap->devPrivate.ptr == PTR(priv->ptr));
assert(pixmap->devKind);
assert_pixmap_damage(pixmap);
assert(has_coherent_ptr(sna, sna_pixmap(pixmap), flags));