diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-11-28 22:01:00 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-11-28 22:01:00 +0000 |
commit | 5b1e9e15738b9001346ab6e0166f861ce308008e (patch) | |
tree | 8659464eeda37ff194da5807842b6aefda0ad9bd | |
parent | dacb301c05dd1686e788d6ed8101887c27968389 (diff) |
sna: Always reduce tiling for thin pixmaps
Benchmarking on the current code base, says this is now a win. A
reversal of older benchmarks, so expect further tuning.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/kgem.c | 28 |
1 files changed, 11 insertions, 17 deletions
diff --git a/src/sna/kgem.c b/src/sna/kgem.c index 73d4a614..fd189cf4 100644 --- a/src/sna/kgem.c +++ b/src/sna/kgem.c @@ -1398,23 +1398,17 @@ int kgem_choose_tiling(struct kgem *kgem, int tiling, int width, int height, int goto done; } - /* Before the G33, we only have a small GTT to play with and tiled - * surfaces always require full fence regions and so cause excessive - * aperture thrashing. - */ - if (kgem->gen < 33) { - if (tiling == I915_TILING_X && width * bpp < 8*512/2) { - DBG(("%s: too thin [%d] for TILING_X\n", - __FUNCTION__, width)); - tiling = I915_TILING_NONE; - goto done; - } - if (tiling == I915_TILING_Y && width * bpp < 8*32/2) { - DBG(("%s: too thin [%d] for TILING_Y\n", - __FUNCTION__, width)); - tiling = I915_TILING_NONE; - goto done; - } + if (tiling == I915_TILING_X && width * bpp < 8*512/2) { + DBG(("%s: too thin [%d] for TILING_X\n", + __FUNCTION__, width)); + tiling = I915_TILING_NONE; + goto done; + } + if (tiling == I915_TILING_Y && width * bpp < 8*32/2) { + DBG(("%s: too thin [%d] for TILING_Y\n", + __FUNCTION__, width)); + tiling = I915_TILING_NONE; + goto done; } if (tiling && ALIGN(height, 2) * ALIGN(width*bpp, 8*64) <= 4096 * 8) { |