xf86-video-intel: src/sna/sna_accel.c
Chris Wilson
ickle at kemper.freedesktop.org
Mon Feb 20 06:01:25 PST 2012
src/sna/sna_accel.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
New commits:
commit b68b76cf54a322e80685f1ec93538cd6c5813ea4
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Mon Feb 20 13:38:11 2012 +0000
sna: Move sync'ing of CPU bo after allocation to first write
The idea was that we could afford to allocate an active CPU bo for
copying to from using the GPU and later sync just before we need to
write to the shadow pixels. Having the sync inside the allocation
function potentially causes an unwanted stall.
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 ab44cf3..aab85d8 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -321,10 +321,8 @@ sna_pixmap_alloc_cpu(struct sna *sna,
if (priv->ptr == NULL) {
kgem_bo_destroy(&sna->kgem, priv->cpu_bo);
priv->cpu_bo = NULL;
- } else {
- kgem_bo_sync__cpu(&sna->kgem, priv->cpu_bo);
+ } else
priv->stride = priv->cpu_bo->pitch;
- }
}
}
@@ -2599,6 +2597,11 @@ sna_put_zpixmap_blt(DrawablePtr drawable, GCPtr gc, RegionPtr region,
DBG(("%s: applying clear [%08x]\n",
__FUNCTION__, priv->clear_color));
+ if (priv->cpu_bo) {
+ DBG(("%s: syncing CPU bo\n", __FUNCTION__));
+ kgem_bo_sync__cpu(&sna->kgem, priv->cpu_bo);
+ }
+
pixman_fill(pixmap->devPrivate.ptr,
pixmap->devKind/sizeof(uint32_t),
pixmap->drawable.bitsPerPixel,
More information about the xorg-commit
mailing list