[PATCH i-g-t 2/3] NORELOC - gen_exec_gttfill - FIX
Andrzej Turko
andrzej.turko at linux.intel.com
Mon Apr 26 08:14:28 UTC 2021
From: Andrzej Turko <andrzej.turko at intel.com>
Signed-off-by: Andrzej Turko <andrzej.turko at intel.com>
---
tests/i915/gem_exec_gttfill.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/tests/i915/gem_exec_gttfill.c b/tests/i915/gem_exec_gttfill.c
index 73f89180e..3041a5059 100644
--- a/tests/i915/gem_exec_gttfill.c
+++ b/tests/i915/gem_exec_gttfill.c
@@ -102,14 +102,14 @@ static void submit(int fd, int gen,
obj.offset = __intel_allocator_alloc(ahnd, obj.handle,
BATCH_SIZE,
BATCH_ALIGNMENT,
- ALLOC_STRATEGY_NONE);
+ ALLOC_STRATEGY_HIGH_TO_LOW);
for (; obj.offset == -1; j = ((++j) == count ? 0 : j)) {
if (i != j)
intel_allocator_free(ahnd, batches[j].handle);
obj.offset = __intel_allocator_alloc(ahnd, obj.handle,
BATCH_SIZE,
BATCH_ALIGNMENT,
- ALLOC_STRATEGY_NONE);
+ ALLOC_STRATEGY_HIGH_TO_LOW);
}
reloc[0].presumed_offset = obj.offset;
@@ -174,6 +174,8 @@ static void fillgtt(int fd, unsigned ring, int timeout)
igt_assert(nengine * 64 <= BATCH_SIZE);
size = gem_aperture_size(fd);
+ if (!gem_uses_full_ppgtt(fd))
+ size /= 2;
if (size > 1ull<<32) /* Limit to 4GiB as we do not use allow-48b */
size = 1ull << 32;
igt_require(size < (1ull<<32) * BATCH_SIZE);
@@ -186,7 +188,7 @@ static void fillgtt(int fd, unsigned ring, int timeout)
/* Avoid allocating on the last page */
ahnd = intel_allocator_open_full(fd, 0, 0, size - 4096,
INTEL_ALLOCATOR_SIMPLE,
- ALLOC_STRATEGY_NONE);
+ ALLOC_STRATEGY_HIGH_TO_LOW);
intel_require_memory(count, BATCH_SIZE, CHECK_RAM);
intel_detect_and_clear_missed_interrupts(fd);
@@ -222,7 +224,7 @@ static void fillgtt(int fd, unsigned ring, int timeout)
/* We need to open the allocator again in the new process */
ahnd = intel_allocator_open_full(fd, 0, 0, size - 4096,
INTEL_ALLOCATOR_SIMPLE,
- ALLOC_STRATEGY_NONE);
+ ALLOC_STRATEGY_HIGH_TO_LOW);
igt_until_timeout(timeout) {
submit(fd, gen, &execbuf, reloc, batches, count, ahnd, do_relocs);
--
2.25.1
More information about the Intel-gfx-trybot
mailing list