From 8d1d3c6e6102ff20fbff74ec6b3b2e94ee757015 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Thu, 7 Feb 2013 14:47:07 +0000 Subject: [PATCH] sna: Fixup an invalid assertion We may choose to operate inplace on a buffer last used by the CPU if we are discarding all the existing damage. Signed-off-by: Chris Wilson --- src/sna/sna_accel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index 87e0c0c0..7c8a3609 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -1581,7 +1581,7 @@ skip_inplace_map: kgem_bo_submit(&sna->kgem, priv->gpu_bo); DBG(("%s: try to operate inplace (GTT)\n", __FUNCTION__)); - assert(priv->cpu == false); + assert((flags & MOVE_READ) == 0 || priv->cpu == false); pixmap->devPrivate.ptr = kgem_bo_map(&sna->kgem, priv->gpu_bo); priv->mapped = pixmap->devPrivate.ptr != NULL;