igt: Report the global GTT size

For many tests, the relevant aperture is not the ppGTT but the internal
global GTT managed by the kernel. Use this limit appropriately.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson
2016-02-05 18:35:21 +00:00
parent e85c530eab
commit 391b32c382
9 changed files with 39 additions and 50 deletions
+1 -5
View File
@@ -48,11 +48,7 @@ static unsigned get_num_contexts(int fd)
unsigned count;
/* Compute the number of contexts we can allocate to fill the GGTT */
if (intel_gen(intel_get_drm_devid(fd)) >= 8)
ggtt_size = 1ull << 32;
else
ggtt_size = 1ull << 31;
ggtt_size = gem_global_aperture_size(fd);
size = 64 << 10; /* Most gen require at least 64k for ctx */
count = 3 * (ggtt_size / size) / 2;