summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-01-31 10:29:02 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2012-01-31 10:29:02 +0000
commit9c1f8a768ca1f762c722f63bab2747e4ff1fd773 (patch)
treec5cd620e96b32aea261479d5529257969761e315
parente872c1011fc7b67683703fd891234f07dd7acd04 (diff)
sna: Avoid converting requested Y to X tiling for large pitches on gen4+
The only strong requirement is that to utilize large pitches, the object must be tiled. Having it as X tiling is a pure convenience to facilitate use of the blitter. A DRI client may want to keep using Y tiling instead. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/kgem.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index 0b2e1d66..311bac4e 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -2151,7 +2151,10 @@ int kgem_choose_tiling(struct kgem *kgem, int tiling, int width, int height, int
if (width*bpp > (MAXSHORT-512) * 8) {
DBG(("%s: large pitch [%d], forcing TILING_X\n",
__FUNCTION__, width*bpp/8));
- tiling = -I915_TILING_X;
+ if (tiling > 0)
+ tiling = -tiling;
+ else if (tiling == 0)
+ tiling = -I915_TILING_X;
} else if (tiling && (width|height) > 8192) {
DBG(("%s: large tiled buffer [%dx%d], forcing TILING_X\n",
__FUNCTION__, width, height));