Thread (38 messages) 38 messages, 2 authors, 2021-03-16

[igt-dev] [PATCH i-g-t v25 32/35] tests/gem_ppgtt: Adopt test to use intel_bb with allocator

From: Zbigniew Kempczyński <hidden>
Date: 2021-03-16 18:01:56
Subsystem: the rest · Maintainer: Linus Torvalds

Initialize allocator within child processes to avoid creation allocator
thread and unnecessary communication to it.

Signed-off-by: Zbigniew Kempczyński <redacted>
Cc: Dominik Grzegorzek <redacted>
Cc: Chris Wilson <redacted>
---
 tests/i915/gem_ppgtt.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/tests/i915/gem_ppgtt.c b/tests/i915/gem_ppgtt.c
index 5f8b34224..da83484a6 100644
--- a/tests/i915/gem_ppgtt.c
+++ b/tests/i915/gem_ppgtt.c
@@ -104,12 +104,14 @@ static void fork_rcs_copy(int timeout, uint32_t final,
 		struct intel_buf *src;
 		unsigned long i;
 
+		/* Standalone allocator */
+		intel_allocator_init();
+
 		if (flags & CREATE_CONTEXT)
 			ctx = gem_context_create(buf_ops_get_fd(dst[child]->bops));
 
 		ibb = intel_bb_create_with_context(buf_ops_get_fd(dst[child]->bops),
 						   ctx, 4096);
-
 		i = 0;
 		igt_until_timeout(timeout) {
 			src = create_bo(dst[child]->bops,
@@ -151,6 +153,9 @@ static void fork_bcs_copy(int timeout, uint32_t final,
 		struct intel_bb *ibb;
 		unsigned long i;
 
+		/* Standalone allocator */
+		intel_allocator_init();
+
 		ibb = intel_bb_create(buf_ops_get_fd(dst[child]->bops), 4096);
 
 		i = 0;
-- 
2.26.0

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help