summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2014-06-20 14:29:43 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2014-06-20 15:08:56 +0100
commitd2b90ac969656de35ec86973f66074654b0e9b4b (patch)
tree1cc5bc385d48bced06a03e4b3998575bb7f68185
parent8d7e7010e33d73a7d99948403b62d859d7a4dfaa (diff)
sna: Color patterns for BLT are required to be aligned to 256 byte boundaries
This so far appears to be the most restrictive alignment required, so simply increase the upload alignment to 256 bytes. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=80033 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/kgem.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index 28065534..03193c00 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -106,8 +106,12 @@ search_snoop_cache(struct kgem *kgem, unsigned int num_pages, unsigned flags);
* is being simultaneously being read by the GPU, or within the sampler
* prefetch. In general, the chipsets seem to have a requirement that sampler
* offsets be aligned to a cacheline (64 bytes).
+ *
+ * Actually, it turns out the BLT color pattern (BR15) has the most severe
+ * alignment restrictions, 64 bytes for 8-bpp, 128 bytes for 16-bpp and 256
+ * bytes for 32-bpp.
*/
-#define UPLOAD_ALIGNMENT 128
+#define UPLOAD_ALIGNMENT 256
#define PAGE_ALIGN(x) ALIGN(x, PAGE_SIZE)
#define NUM_PAGES(x) (((x) + PAGE_SIZE-1) / PAGE_SIZE)