[Intel-gfx] [PATCH i-g-t 3/4] tests/gem_lmem_swapping: limit lmem to 4G

Matthew Auld matthew.auld at intel.com
Thu Mar 24 14:26:20 UTC 2022


From: CQ Tang <cq.tang at intel.com>

On some systems lmem can be as large as 16G, which seems to trigger
various CI timeouts, and in the best case just takes a long time. For
the purposes of the test we should be able to limit to 4G, without any
big loss in coverage.

Signed-off-by: CQ Tang <cq.tang at intel.com>
Signed-off-by: Matthew Auld <matthew.auld at intel.com>
Cc: Thomas Hellström <thomas.hellstrom at linux.intel.com>
Cc: Nirmoy Das <nirmoy.das at linux.intel.com>
---
 tests/i915/gem_lmem_swapping.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/tests/i915/gem_lmem_swapping.c b/tests/i915/gem_lmem_swapping.c
index 995a663f..ad1c989c 100644
--- a/tests/i915/gem_lmem_swapping.c
+++ b/tests/i915/gem_lmem_swapping.c
@@ -526,7 +526,13 @@ igt_main_args("", long_options, help_str, opt_handler, NULL)
 	igt_fixture {
 		struct intel_execution_engine2 *e;
 
-		i915 = drm_open_driver(DRIVER_INTEL);
+		igt_i915_driver_unload();
+		if (igt_i915_driver_load("lmem_size=4096")) {
+			igt_debug("i915 missing lmem_size modparam support\n");
+			igt_assert_eq(igt_i915_driver_load(NULL), 0);
+		}
+
+		i915 = __drm_open_driver(DRIVER_INTEL);
 		igt_require_gem(i915);
 		igt_require(gem_has_lmem(i915));
 
@@ -554,6 +560,7 @@ igt_main_args("", long_options, help_str, opt_handler, NULL)
 	igt_fixture {
 		free(regions);
 		close(i915);
+		igt_i915_driver_unload();
 	}
 
 	igt_exit();
-- 
2.34.1



More information about the Intel-gfx mailing list