sna: Leave extra room in the mappable aperture for fence alignment

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2013-10-28 10:33:57 +00:00
parent 40d4199f15
commit d69a4f118a
1 changed files with 2 additions and 0 deletions

View File

@ -4641,6 +4641,8 @@ static bool aperture_check(struct kgem *kgem, unsigned num_pages)
/* Leave some space in case of alignment issues */
aperture.aper_available_size -= 4 * 1024 * 1024;
if (kgem->gen < 040)
aperture.aper_available_size -= kgem->aperture_fenced * PAGE_SIZE;
if (num_pages < aperture.aper_available_size / PAGE_SIZE)
return true;