From: Peter Clifton <pcjc2@cam.ac.uk>
To: Intel Graphics Mailing list <intel-gfx@lists.freedesktop.org>
Subject: PATCH: Fixup comment about alignment for BLT in Mesa
Date: Tue, 09 Nov 2010 22:00:36 +0000 [thread overview]
Message-ID: <1289340036.9101.0.camel@pcjc2lap> (raw)
[-- Attachment #1: Type: text/plain, Size: 250 bytes --]
--
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-drm-intel-Add-assert-check-for-blitting-alignment.patch --]
[-- Type: text/x-patch, Size: 1596 bytes --]
>From 18072c138b7cca626f8b45dfae2c6cb29a91aaf8 Mon Sep 17 00:00:00 2001
From: Peter Clifton <pcjc2@cam.ac.uk>
Date: Tue, 9 Nov 2010 21:45:23 +0000
Subject: [PATCH] drm/intel: Add assert check for blitting alignment.
Also fixup code comment to reflect that the GPU requires DWORD alignment,
but in this case does not actually pass the value "in DWORDs" as I
previously stated.
---
src/mesa/drivers/dri/intel/intel_blit.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/mesa/drivers/dri/intel/intel_blit.c b/src/mesa/drivers/dri/intel/intel_blit.c
index 7118898..c2917e9 100644
--- a/src/mesa/drivers/dri/intel/intel_blit.c
+++ b/src/mesa/drivers/dri/intel/intel_blit.c
@@ -483,8 +483,8 @@ intel_emit_linear_blit(struct intel_context *intel,
/* Blits are in a different ringbuffer so we don't use them. */
assert(intel->gen < 6);
- /* The pitch hits the GPU as a is a signed value, IN DWORDs.
- * But we want width to match pitch. Max width is (1 << 15 - 1),
+ /* The pitch given to the GPU must be DWORD aligned, and
+ * we want width to match pitch. Max width is (1 << 15 - 1),
* rounding that down to the nearest DWORD is 1 << 15 - 4
*/
pitch = MIN2(size, (1 << 15) - 4);
@@ -502,6 +502,7 @@ intel_emit_linear_blit(struct intel_context *intel,
dst_offset += pitch * height;
size -= pitch * height;
assert (size < (1 << 15));
+ assert ((size & 3) == 0); /* Pitch must be DWORD aligned */
if (size != 0) {
ok = intelEmitCopyBlit(intel, 1,
size, src_bo, src_offset, I915_TILING_NONE,
--
1.7.1
[-- Attachment #3: 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-11-09 22:00 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1289340036.9101.0.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox