summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2015-04-01 15:50:46 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2015-04-01 15:55:11 +0100
commitcdac2b369ad0b88bc6765617a29fc14cc9543afc (patch)
treedcab10c0e3a751ba7b22cf2dc3789bf41e21f06d
parent35537ec4bfed4118725b4871cb99326c85a4b2d3 (diff)
sna: Relax unclean rules to check busyness on all foreign pixmaps
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/sna_accel.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index 55d613e6..6fa15b29 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -3283,17 +3283,18 @@ inline static void sna_pixmap_unclean(struct sna *sna, struct sna_pixmap *priv)
sna_damage_destroy(&priv->cpu_damage);
list_del(&priv->flush_list);
- if ((priv->gpu_bo->needs_flush & priv->flush) == 0 ||
- priv->gpu_bo->exec)
+ if (!priv->flush || priv->gpu_bo->exec)
return;
- DBG(("%s(pixmap=%ld): cleaning foreign bo handle=%u\n",
- __FUNCTION__, priv->pixmap->drawable.serialNumber, priv->gpu_bo->handle));
-
busy.handle = priv->gpu_bo->handle;
busy.busy = 0;
ioctl(sna->kgem.fd, DRM_IOCTL_I915_GEM_BUSY, &busy);
+ DBG(("%s(pixmap=%ld): cleaning foreign bo handle=%u, busy=%x [ring=%d]\n",
+ __FUNCTION__,
+ priv->pixmap->drawable.serialNumber,
+ busy.handle, busy.busy, !!(busy.busy & (0xfffe << 16))));
+
if (busy.busy) {
unsigned mode = KGEM_RENDER;
if (busy.busy & (0xfffe << 16))