xf86-video-intel: 2 commits - src/sna/sna_accel.c src/sna/sna_dri2.c
Chris Wilson
ickle at kemper.freedesktop.org
Wed Aug 17 10:47:24 UTC 2016
src/sna/sna_accel.c | 8 ++++++++
src/sna/sna_dri2.c | 5 +++++
2 files changed, 13 insertions(+)
New commits:
commit 12c14deb40fb4a9488d11ce53c5ce956c776a742
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Wed Aug 17 11:46:21 2016 +0100
sna/dri2: Ensure the DRI pixmap is flushed before replying
As we only ensure the flush before damage is sent, we also need to flush
any CPU shadows before the reply to GetBuffers.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/sna_dri2.c b/src/sna/sna_dri2.c
index 081da91..32832dd 100644
--- a/src/sna/sna_dri2.c
+++ b/src/sna/sna_dri2.c
@@ -647,7 +647,12 @@ sna_dri2_create_buffer(DrawablePtr draw,
assert(private->bo->pitch == buffer->pitch);
assert(private->bo->active_scanout);
+ sna_pixmap_move_to_gpu(pixmap,
+ MOVE_READ |
+ __MOVE_FORCE |
+ __MOVE_DRI);
kgem_bo_submit(&sna->kgem, private->bo);
+
private->refcnt++;
return buffer;
}
commit 0bbd55fd1d282d5ea9ddfebd28ae5072ac12b484
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Wed Aug 17 09:42:18 2016 +0100
sna: Add CPU damage to DRI flush
When we damage the CPU shadow of a DRI exported pixmap, we must remember
to add that pixmap of the list to be flushed.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index 05007bc..3025298 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -2470,6 +2470,10 @@ done:
DBG(("%s: discarding idle GPU bo\n", __FUNCTION__));
sna_pixmap_free_gpu(sna, priv);
}
+ if (priv->flush) {
+ assert(!priv->shm);
+ sna_add_flush_pixmap(sna, priv, priv->gpu_bo);
+ }
priv->source_count = SOURCE_BIAS;
}
@@ -2718,6 +2722,10 @@ sna_drawable_move_region_to_cpu(DrawablePtr drawable,
}
}
sna_damage_add_to_pixmap(&priv->cpu_damage, region, pixmap);
+ if (priv->flush) {
+ assert(!priv->shm);
+ sna_add_flush_pixmap(sna, priv, priv->gpu_bo);
+ }
if (dx | dy)
RegionTranslate(region, -dx, -dy);
More information about the xorg-commit
mailing list