sna: Reduce tiling if pitch is less than a tile_width/height only on pre-G33
(Note this only applies to 2D pixmaps.) The rationale, borne out by experimentation with cairo-perf-trace, is that on the pre-G33 devices we always need a fence region region for tiled surfaces, i.e. at least .5/1MiB in size, and that combined with the smaller GTT on those devices, we loose the benefit of tiling to the excessive GTT thrashing. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
b9de6a98d3
commit
f749ed618e
|
|
@ -1172,26 +1172,32 @@ int kgem_choose_tiling(struct kgem *kgem, int tiling, int width, int height, int
|
|||
return -tiling;
|
||||
}
|
||||
|
||||
if (tiling == I915_TILING_Y && height < 16) {
|
||||
DBG(("%s: too short [%d] for TILING_Y\n",
|
||||
__FUNCTION__,height));
|
||||
tiling = I915_TILING_X;
|
||||
}
|
||||
if (tiling == I915_TILING_X && height < 4) {
|
||||
DBG(("%s: too short [%d] for TILING_X\n",
|
||||
__FUNCTION__, height));
|
||||
tiling = I915_TILING_NONE;
|
||||
}
|
||||
/* 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_Y && height < 16) {
|
||||
DBG(("%s: too short [%d] for TILING_Y\n",
|
||||
__FUNCTION__,height));
|
||||
tiling = I915_TILING_X;
|
||||
}
|
||||
if (tiling == I915_TILING_X && height < 4) {
|
||||
DBG(("%s: too short [%d] for TILING_X\n",
|
||||
__FUNCTION__, height));
|
||||
tiling = I915_TILING_NONE;
|
||||
}
|
||||
|
||||
if (tiling == I915_TILING_X && width * bpp < 512/2) {
|
||||
DBG(("%s: too thin [%d] for TILING_X\n",
|
||||
__FUNCTION__, width));
|
||||
tiling = I915_TILING_NONE;
|
||||
}
|
||||
if (tiling == I915_TILING_Y && width * bpp < 32/2) {
|
||||
DBG(("%s: too thin [%d] for TILING_Y\n",
|
||||
__FUNCTION__, width));
|
||||
tiling = I915_TILING_NONE;
|
||||
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;
|
||||
}
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
DBG(("%s: %dx%d -> %d\n", __FUNCTION__, width, height, tiling));
|
||||
|
|
|
|||
Loading…
Reference in New Issue