diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2017-09-12 16:10:56 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2018-01-16 15:12:54 +0000 |
commit | 5f5b4a65e672bd10a4422cc1cb3c466659c52db8 (patch) | |
tree | 04e86f8c752b4fdcc07ea4b57c21d1969e25cce7 /tests/gem_tiled_fence_blits.c | |
parent | 7b685d5790c1770eeac43c17d6b207a6df602985 (diff) |
igt/gem_linear_blits: Compute GTT size using 4G limit
Both gem_linear_blits and gem_tiled_blit do not request the full 48b
GTT layout for their objects, restricting themselves to 4G. The
underlying test that they trigger eviction is unaffected by this
restriction, so we can simply reduce their memory requirements to fill
the low 4G GTT space and so allow them to run on 48b machines.
v2: gem_tiled_fenced_blits as well
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Diffstat (limited to 'tests/gem_tiled_fence_blits.c')
-rw-r--r-- | tests/gem_tiled_fence_blits.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/gem_tiled_fence_blits.c b/tests/gem_tiled_fence_blits.c index eb6473bc..51f672fd 100644 --- a/tests/gem_tiled_fence_blits.c +++ b/tests/gem_tiled_fence_blits.c @@ -160,9 +160,11 @@ static void run_test (int fd, int count) drm_intel_bufmgr_destroy(bufmgr); } +#define MAX_32b ((1ull << 32) - 4096) + igt_main { - int fd, count; + int fd; igt_fixture { fd = drm_open_driver(DRIVER_INTEL); @@ -177,7 +179,12 @@ igt_main igt_skip_on_simulation(); igt_subtest("normal") { - count = 3 * gem_aperture_size(fd) / (bo_size) / 2; + uint64_t count; + + count = gem_aperture_size(fd); + if (count >> 32) + count = MAX_32b; + count = 3 * count / bo_size / 2; intel_require_memory(count, bo_size, CHECK_RAM); run_test(fd, count); } |