intel: limit aperture space to mappable area on gen3

Otherwise we blow up on heavy tiled blitter loads (with giant
pixmaps).

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Daniel Vetter 2011-12-04 12:51:45 +01:00
parent 37ccce5e39
commit 36cff1cbb8

View file

@ -2204,6 +2204,14 @@ drm_intel_bufmgr_gem_init(int fd, int batch_size)
else
bufmgr_gem->gen = 6;
if (IS_GEN3(bufmgr_gem) && bufmgr_gem->gtt_size > 256*1024*1024) {
/* The unmappable part of gtt on gen 3 (i.e. above 256MB) can't
* be used for tiled blits. To simplify the accounting, just
* substract the unmappable part (fixed to 256MB on all known
* gen3 devices) if the kernel advertises it. */
bufmgr_gem->gtt_size -= 256*1024*1024;
}
gp.value = &tmp;
gp.param = I915_PARAM_HAS_EXECBUF2;