diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-11-26 16:45:22 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-11-27 09:04:10 +0000 |
commit | df68b20a17e28c0898226f970315bc8e515e9f56 (patch) | |
tree | 0a1fb0484a50194fa5fcb1d2643abaf93e3ced54 | |
parent | d88ad2e60ac3d9f5608db1653a7af789f7f1b446 (diff) |
sna: Disabling tiling if the bo would be smaller than a page
Once again experiment with untiled smalled buffers.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/kgem.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/sna/kgem.c b/src/sna/kgem.c index fe8cf488..c85ea3b7 100644 --- a/src/sna/kgem.c +++ b/src/sna/kgem.c @@ -1434,6 +1434,16 @@ int kgem_choose_tiling(struct kgem *kgem, int tiling, int width, int height, int } } + if (tiling && + ALIGN(height, 2) * ALIGN(width*bpp, 8*64) < 4096 * 8) { + DBG(("%s: too small [%d] for TILING_%c\n", + __FUNCTION__, + ALIGN(height, 2) * ALIGN(width*bpp, 8*64) / 8, + tiling == I915_TILING_X ? 'X' : 'Y')); + tiling = I915_TILING_NONE; + goto done; + } + done: DBG(("%s: %dx%d -> %d\n", __FUNCTION__, width, height, tiling)); return tiling; |