[PATCH i-g-t 2/2] tests/i915/gem_softpin: Test eviction on a fixed address

Andrzej Turko andrzej.turko at linux.intel.com
Mon Jul 5 06:36:46 UTC 2021


Check if the error -28 still occurs on execbuf
when submitting batches with a fixed address.

Signed-off-by: Andrzej Turko <andrzej.turko at linux.intel.com>
---
 tests/i915/gem_softpin.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/tests/i915/gem_softpin.c b/tests/i915/gem_softpin.c
index 0af1c4476..1c2bdf26c 100644
--- a/tests/i915/gem_softpin.c
+++ b/tests/i915/gem_softpin.c
@@ -913,11 +913,8 @@ static void submit(int fd, int gen,
 	j = 0;
 	for (unsigned i = 0; i < count; i++) {
 		obj.handle = batches[i].handle;
-		obj.offset = __intel_allocator_alloc(ahnd, obj.handle,
-						     BATCH_SIZE,
-						     BATCH_ALIGNMENT,
-						     ALLOC_STRATEGY_HIGH_TO_LOW);
-		for (; obj.offset == -1; j = (j+1) % count) {
+		obj.offset = 0;
+		for (; obj.offset == ALLOC_INVALID_ADDRESS; j = (j+1) % count) {
 			if (i != j)
 				intel_allocator_free(ahnd, batches[j].handle);
 			obj.offset = __intel_allocator_alloc(ahnd, obj.handle,
-- 
2.25.1



More information about the Intel-gfx-trybot mailing list