[igt-dev] [PATCH i-g-t v22 33/36] tests/gem_ppgtt: Adopt test to use intel_bb with allocator
Zbigniew Kempczyński
zbigniew.kempczynski at intel.com
Wed Mar 10 09:44:59 UTC 2021
Initialize allocator within child processes to avoid creation allocator
thread and unnecessary communication to it.
Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>
Cc: Dominik Grzegorzek <dominik.grzegorzek at intel.com>
Cc: Chris Wilson <chris at chris-wilson.co.uk>
---
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
More information about the igt-dev
mailing list