From 9c1f8a768ca1f762c722f63bab2747e4ff1fd773 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Tue, 31 Jan 2012 10:29:02 +0000 Subject: [PATCH] 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 --- src/sna/kgem.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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));