igt/gem_exec_alignment: Reduce GTT usage if !full-ppgtt

If we have to share the GTT with others, we cannot rely on being able to
fill it and have to factor in some slack for others.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2016-01-26 09:03:46 +00:00
parent 49b1337881
commit e2c9a023f2

View File

@ -79,6 +79,8 @@ static void many(int fd)
uint64_t alignment, max_alignment, count, i;
gtt_size = gem_aperture_size(fd);
if (!gem_uses_full_ppgtt(fd))
gtt_size /= 2; /* We have to *share* our GTT! */
ram_size = intel_get_total_ram_mb();
ram_size *= 1024 * 1024;
count = ram_size / 4096;