diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-10-11 08:42:21 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-10-11 09:24:56 +0100 |
commit | 94a98d1c472ce0fc7601421a2bcfbd0524d2bc93 (patch) | |
tree | b18b56be79958bee733f0f8bd543b2bf527af591 /src | |
parent | d3ae85dd01952ecff7b780e30a43571146aa61ea (diff) |
sna: Limit available space for gen2
Since pre-g33 chipsets impose massive alignment restrictions on objects
within the aperture we need to further restrict the amount of available
space to be sure we have sufficient room to accommodate the alignment.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src')
-rw-r--r-- | src/sna/kgem.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/sna/kgem.c b/src/sna/kgem.c index 8382a0b5..46c898f7 100644 --- a/src/sna/kgem.c +++ b/src/sna/kgem.c @@ -888,6 +888,11 @@ void kgem_init(struct kgem *kgem, int fd, struct pci_device *dev, int gen) kgem->aperture_total = aperture.aper_size; kgem->aperture_high = aperture.aper_size * 3/4; kgem->aperture_low = aperture.aper_size * 1/3; + if (gen < 33) { + /* Severe alignment penalties */ + kgem->aperture_high /= 2; + kgem->aperture_low /= 2; + } DBG(("%s: aperture low=%d [%d], high=%d [%d]\n", __FUNCTION__, kgem->aperture_low, kgem->aperture_low / (1024*1024), kgem->aperture_high, kgem->aperture_high / (1024*1024))); |