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>
This commit is contained in:
Chris Wilson 2012-01-31 10:29:02 +00:00
parent e872c1011f
commit 9c1f8a768c
1 changed files with 4 additions and 1 deletions

View File

@ -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));