summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/sna/sna_accel.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index c9033858..613b9c73 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -2424,17 +2424,11 @@ sna_drawable_move_region_to_cpu(DrawablePtr drawable,
if (flags & MOVE_WRITE)
sna_pixmap_free_gpu(sna, priv);
- goto contains_damage;
- }
-
- if (priv->cpu &&
- priv->cpu_damage &&
- sna_damage_contains_box__no_reduce(priv->cpu_damage,
- &region->extents)) {
- DBG(("%s: pixmap=%ld CPU damage contains region\n",
- __FUNCTION__, pixmap->drawable.serialNumber));
+ if ((flags & MOVE_READ) == 0 &&
+ priv->cpu_bo && !priv->cpu_bo->flush &&
+ __kgem_bo_is_busy(&sna->kgem, priv->cpu_bo))
+ sna_pixmap_free_cpu(sna, priv, false);
-contains_damage:
sna_pixmap_unmap(pixmap, priv);
assert(priv->mapped == MAPPED_NONE);
if (pixmap->devPrivate.ptr == NULL &&