[igt-dev] [PATCH i-g-t] tests/kms_concurrent: For i915 devices run allocator in multiprocess mode

Zbigniew Kempczyński zbigniew.kempczynski at intel.com
Thu May 19 14:17:45 UTC 2022


Test calls igt_fork() so for i915 requires offset allocation arbitration
(allocator in multiprocess mode) especially when same drm fd is used
in children. Dedicated thread (intel_allocator_multiprocess_start())
is required to be started on the very beginning to handle offset
allocations as well as stopping it (intel_allocator_multiprocess_stop())
before test exits.

Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>
Cc: Luciano Coelho <luciano.coelho at intel.com>
Cc: Swati Sharma <swati2.sharma at intel.com>
---
 tests/kms_concurrent.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tests/kms_concurrent.c b/tests/kms_concurrent.c
index 82b2021e72..c334194b9a 100644
--- a/tests/kms_concurrent.c
+++ b/tests/kms_concurrent.c
@@ -378,6 +378,8 @@ igt_main_args("", long_options, help_str, opt_handler, NULL)
 		kmstest_set_vt_graphics_mode();
 		igt_display_require(&data.display, data.drm_fd);
 		igt_require(data.display.is_atomic);
+		if (is_i915_device(data.drm_fd))
+			intel_allocator_multiprocess_start();
 	}
 
 	for_each_pipe_static(pipe) {
@@ -386,6 +388,8 @@ igt_main_args("", long_options, help_str, opt_handler, NULL)
 	}
 
 	igt_fixture {
+		if (is_i915_device(data.drm_fd))
+			intel_allocator_multiprocess_stop();
 		igt_display_fini(&data.display);
 		close(data.drm_fd);
 	}
-- 
2.32.0



More information about the igt-dev mailing list