[igt-dev] [PATCH i-g-t] tests/gem_exec_reloc: Cap max amount of active relocations in basic-many-active.

Maarten Lankhorst maarten.lankhorst at linux.intel.com
Wed Sep 16 10:59:32 UTC 2020


Especially with -EDEADLK handling we can add relocations many times,
cap the amount of relocations tested, so that we still correctly
test that we can fill more than PAGE_SIZE / sizeof(relocation)
relocations.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
Bugzilla: https://gitlab.freedesktop.org/drm/intel/-/issues/2389
---
 tests/i915/gem_exec_reloc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/i915/gem_exec_reloc.c b/tests/i915/gem_exec_reloc.c
index 85df3da7e011..cca82ec74cce 100644
--- a/tests/i915/gem_exec_reloc.c
+++ b/tests/i915/gem_exec_reloc.c
@@ -405,7 +405,7 @@ static void __many_active(int i915, unsigned engine, unsigned long count)
 
 static void many_active(int i915, unsigned engine)
 {
-	const uint64_t max = gem_aperture_size(i915) / 2;
+	const uint64_t max = 8192;
 	unsigned long count = 256;
 
 	igt_until_timeout(2) {
@@ -419,7 +419,7 @@ static void many_active(int i915, unsigned engine)
 		__many_active(i915, engine, count);
 
 		count <<= 1;
-		if (count * 8 >= max)
+		if (count > max)
 			break;
 	}
 }

base-commit: 7be11303a08de934478b1d44963cef00c7adc786
-- 
2.28.0



More information about the igt-dev mailing list