xf86-video-intel: 2 commits - src/sna/kgem.c src/sna/sna_trapezoids.c

Chris Wilson ickle at kemper.freedesktop.org
Mon May 14 02:47:32 PDT 2012


 src/sna/kgem.c           |   13 +++++++++++++
 src/sna/sna_trapezoids.c |    6 ++----
 2 files changed, 15 insertions(+), 4 deletions(-)

New commits:
commit 80567f61afe77a003e663b17c1fc6b6c3ed04042
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Mon May 14 10:40:38 2012 +0100

    sna/trapezoids: Do not reduce SRC to a clear pixmap to unbounded
    
    As we instruct the migration code to drop the clear when copying from
    the GPU to the CPU, we then need to emit the zeros during the span
    writing.
    
    Fixes some occassional corruption behind complex clip masks.
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/sna_trapezoids.c b/src/sna/sna_trapezoids.c
index c06c29d..3bc3284 100644
--- a/src/sna/sna_trapezoids.c
+++ b/src/sna/sna_trapezoids.c
@@ -4176,12 +4176,10 @@ trapezoid_span_inplace(CARD8 op, PicturePtr src, PicturePtr dst,
 			return true;
 		if (priv->clear && priv->clear_color == 0xff)
 			op = PictOpSrc;
-		if ((color >> 24) == 0)
-			return true;
 		unbounded = true;
 		break;
 	case PictOpSrc:
-		unbounded = !(priv->clear && priv->clear_color == 0);
+		unbounded = true;
 		break;
 	default:
 		DBG(("%s: fallback -- can not perform op [%d] in place\n",
@@ -4270,7 +4268,7 @@ trapezoid_span_inplace(CARD8 op, PicturePtr src, PicturePtr dst,
 	DBG(("%s: move-to-cpu\n", __FUNCTION__));
 	region.data = NULL;
 	if (!sna_drawable_move_region_to_cpu(dst->pDrawable, &region,
-					     op == PictOpSrc ? MOVE_WRITE : MOVE_WRITE | MOVE_READ))
+					     op == PictOpSrc ? MOVE_WRITE | MOVE_INPLACE_HINT : MOVE_WRITE | MOVE_READ))
 		return true;
 
 	get_drawable_deltas(dst->pDrawable, pixmap, &dst_x, &dst_y);
commit 067e9375809ea6cfa0c0b5e2159b359535c3b362
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Mon May 14 10:00:00 2012 +0100

    sna: Trim unused partial buffer uploads
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index 8eee2b8..759860c 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -1091,6 +1091,17 @@ static void kgem_bo_clear_scanout(struct kgem *kgem, struct kgem_bo *bo)
 	bo->reusable = true;
 }
 
+static void _kgem_bo_delete_partial(struct kgem *kgem, struct kgem_bo *bo)
+{
+	struct kgem_partial_bo *io = (struct kgem_partial_bo *)bo->proxy;
+
+	DBG(("%s: size=%d, offset=%d, parent used=%d\n",
+	     __FUNCTION__, bo->size.bytes, bo->delta, io->used));
+
+	if (ALIGN(bo->delta + bo->size.bytes, 64) == io->used)
+		io->used = bo->delta;
+}
+
 static void __kgem_bo_destroy(struct kgem *kgem, struct kgem_bo *bo)
 {
 	DBG(("%s: handle=%d\n", __FUNCTION__, bo->handle));
@@ -2882,6 +2893,8 @@ void _kgem_bo_destroy(struct kgem *kgem, struct kgem_bo *bo)
 	if (bo->proxy) {
 		_list_del(&bo->vma);
 		_list_del(&bo->request);
+		if (bo->io && bo->exec == NULL)
+			_kgem_bo_delete_partial(kgem, bo);
 		kgem_bo_unref(kgem, bo->proxy);
 		kgem_bo_binding_free(kgem, bo);
 		free(bo);


More information about the xorg-commit mailing list