summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/sna/kgem.c1
-rw-r--r--src/sna/kgem.h5
-rw-r--r--src/sna/sna_accel.c6
3 files changed, 6 insertions, 6 deletions
diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index 29a5dfc9..8d59a2ec 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -1909,6 +1909,7 @@ search_snoop_cache(struct kgem *kgem, unsigned int num_pages, unsigned flags)
assert(bo->refcnt == 0);
assert(bo->snoop);
assert(!bo->scanout);
+ assert(!bo->purged);
assert(bo->proxy == NULL);
assert(bo->tiling == I915_TILING_NONE);
assert(bo->rq == NULL);
diff --git a/src/sna/kgem.h b/src/sna/kgem.h
index 95f0f7b2..4ea8596f 100644
--- a/src/sna/kgem.h
+++ b/src/sna/kgem.h
@@ -647,8 +647,11 @@ static inline bool __kgem_bo_is_busy(struct kgem *kgem, struct kgem_bo *bo)
static inline void kgem_bo_mark_unreusable(struct kgem_bo *bo)
{
- while (bo->proxy)
+ while (bo->proxy) {
+ bo->flush = true;
bo = bo->proxy;
+ }
+ bo->flush = true;
bo->reusable = false;
}
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index 7fef4f27..040c0093 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -874,9 +874,8 @@ fallback:
sna_pixmap_destroy(pixmap);
goto fallback;
}
- priv->cpu_bo->flush = true;
priv->cpu_bo->pitch = pitch;
- priv->cpu_bo->reusable = false;
+ kgem_bo_mark_unreusable(priv->cpu_bo);
sna_accel_watch_flush(sna, 1);
#ifdef DEBUG_MEMORY
sna->debug_memory.cpu_bo_allocs++;
@@ -4036,7 +4035,6 @@ try_upload_blt(PixmapPtr pixmap, RegionRec *region,
if (src_bo == NULL)
return false;
- src_bo->flush = true;
src_bo->pitch = stride;
kgem_bo_mark_unreusable(src_bo);
@@ -5300,7 +5298,6 @@ sna_copy_boxes(DrawablePtr src, DrawablePtr dst, GCPtr gc,
src_pixmap->devKind * src_pixmap->drawable.height,
true);
if (src_bo) {
- src_bo->flush = true;
src_bo->pitch = src_pixmap->devKind;
kgem_bo_mark_unreusable(src_bo);
@@ -14512,7 +14509,6 @@ sna_get_image_blt(PixmapPtr pixmap,
pitch * (region->extents.y2 - region->extents.y1),
false);
if (dst_bo) {
- dst_bo->flush = true;
dst_bo->pitch = pitch;
kgem_bo_mark_unreusable(dst_bo);