Here is a patch for some graphics corruption issues I discovered since
this commit:

commit 1cc2c2c44ac72460cf1c4e6bdc13c612235809c9
Author: Chris Wilson <ch...@chris-wilson.co.uk>
Date:   Wed Apr 14 11:18:25 2010 +0100

    i830: Use pixman_blt directly for performing the in-memory copy
    
    In order to avoid an infinite recursion after enabling CopyArea to use
    the put_image acceleration to either stream a blit or to copy in-place,
    we cannot call CopyArea from put_image for the fallback path. Instead,
    we can simply call pixman_blt directly, which coincidentally is a tiny
    bit faster.
    
    Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk>


I've also attached a cosmetic clean-up in the same area.

-- 
Peter Clifton

Electrical Engineering Division,
Engineering Department,
University of Cambridge,
9, JJ Thomson Avenue,
Cambridge
CB3 0FA

Tel: +44 (0)7729 980173 - (No signal in the lab!)
Tel: +44 (0)1223 748328 - (Shared lab phone, ask for me)
>From 1185713519550a73414058caddf6e5ec50774955 Mon Sep 17 00:00:00 2001
From: Peter Clifton <pc...@cam.ac.uk>
Date: Thu, 22 Apr 2010 18:59:49 +0100
Subject: [PATCH 1/2] i830: pixman_blt may fail, ensure we pass this result down

Fixes visual corruption noticed in the background of
OpenOffice Impress slides and slide preview seen since
commit 1cc2c2c44ac72460cf1c4e6bdc13c612235809c9

Signed-off-by: Peter Clifton <pc...@cam.ac.uk>
---
 src/i830_uxa.c |   17 ++++++++---------
 1 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/src/i830_uxa.c b/src/i830_uxa.c
index 984069e..4f0c250 100644
--- a/src/i830_uxa.c
+++ b/src/i830_uxa.c
@@ -832,17 +832,16 @@ static Bool i830_uxa_put_image(PixmapPtr pixmap,
 			return FALSE;
 		}
 
-		pixman_blt((uint32_t *)src, priv->bo->virtual,
-			   src_pitch / sizeof(uint32_t),
-			   pixmap->devKind / sizeof(uint32_t),
-			   pixmap->drawable.bitsPerPixel,
-			   pixmap->drawable.bitsPerPixel,
-			   0, 0,
-			   x, y,
-			   w, h);
+		ret = pixman_blt((uint32_t *)src, priv->bo->virtual,
+				 src_pitch / sizeof(uint32_t),
+				 pixmap->devKind / sizeof(uint32_t),
+				 pixmap->drawable.bitsPerPixel,
+				 pixmap->drawable.bitsPerPixel,
+				 0, 0,
+				 x, y,
+				 w, h);
 
 		drm_intel_gem_bo_unmap_gtt(priv->bo);
-		ret = TRUE;
 	}
 
 	return ret;
-- 
1.7.0.4

>From aadc0723ac9d36317a3f62ec08ad2fce78970090 Mon Sep 17 00:00:00 2001
From: Peter Clifton <pc...@cam.ac.uk>
Date: Thu, 22 Apr 2010 19:01:13 +0100
Subject: [PATCH 2/2] i830: Use the i830_pixmap_pitch() helper function for clarity

Signed-off-by: Peter Clifton <pc...@cam.ac.uk>
---
 src/i830_uxa.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/src/i830_uxa.c b/src/i830_uxa.c
index 4f0c250..38c98fe 100644
--- a/src/i830_uxa.c
+++ b/src/i830_uxa.c
@@ -774,6 +774,7 @@ static Bool i830_uxa_put_image(PixmapPtr pixmap,
 	struct intel_pixmap *priv;
 	GCPtr gc;
 	Bool ret;
+	int dst_pitch;
 
 	if (x == 0 && y == 0 &&
 	    w == pixmap->drawable.width &&
@@ -832,9 +833,11 @@ static Bool i830_uxa_put_image(PixmapPtr pixmap,
 			return FALSE;
 		}
 
+		dst_pitch = i830_pixmap_pitch(pixmap);
+
 		ret = pixman_blt((uint32_t *)src, priv->bo->virtual,
 				 src_pitch / sizeof(uint32_t),
-				 pixmap->devKind / sizeof(uint32_t),
+				 dst_pitch / sizeof(uint32_t),
 				 pixmap->drawable.bitsPerPixel,
 				 pixmap->drawable.bitsPerPixel,
 				 0, 0,
-- 
1.7.0.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to