All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Clifton <pcjc2@cam.ac.uk>
To: "intel-gfx@lists.freedesktop.org" <intel-gfx@lists.freedesktop.org>
Subject: [PATCH] Graphics corruption issues
Date: Thu, 22 Apr 2010 19:19:01 +0100	[thread overview]
Message-ID: <1271960341.13316.2.camel@pcjc2lap> (raw)

[-- Attachment #1: Type: text/plain, Size: 984 bytes --]

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

commit 1cc2c2c44ac72460cf1c4e6bdc13c612235809c9
Author: Chris Wilson <chris@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 <chris@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)

[-- Attachment #2: 0001-i830-pixman_blt-may-fail-ensure-we-pass-this-result-.patch --]
[-- Type: text/x-patch, Size: 1324 bytes --]

>From 1185713519550a73414058caddf6e5ec50774955 Mon Sep 17 00:00:00 2001
From: Peter Clifton <pcjc2@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 <pcjc2@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


[-- Attachment #3: 0002-i830-Use-the-i830_pixmap_pitch-helper-function-for-c.patch --]
[-- Type: text/x-patch, Size: 1092 bytes --]

>From aadc0723ac9d36317a3f62ec08ad2fce78970090 Mon Sep 17 00:00:00 2001
From: Peter Clifton <pcjc2@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 <pcjc2@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


[-- Attachment #4: Type: text/plain, Size: 159 bytes --]

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

             reply	other threads:[~2010-04-22 18:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-22 18:19 Peter Clifton [this message]
     [not found] ` <o2ldfb03c971004251552k55defa42q5962b1f74f9f8630@mail.gmail.com>
     [not found]   ` <i2vdfb03c971004251554sa0c0f38fod279ef5970b1902a@mail.gmail.com>
2010-04-25 23:19     ` [PATCH] Graphics corruption issues Peter Clifton
2010-04-25 23:23   ` Peter Clifton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1271960341.13316.2.camel@pcjc2lap \
    --to=pcjc2@cam.ac.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.