[igt-dev] [PATCH i-g-t] tests/i915/gem_ctx_engines: Added out fence for execute-one subtest
Arjun Melkaveri
arjun.melkaveri at intel.com
Mon Dec 6 16:42:51 UTC 2021
To make spinner to be on same context for following execbuf,
spin out_fence is passed to execbuf.rsvd2.
Used IGT_SPIN_FENCE_OUT flag in spinner.
Cc: Chris Wilson <chris.p.wilson at intel.com>
Signed-off-by: Arjun Melkaveri <arjun.melkaveri at intel.com>
---
tests/i915/gem_ctx_engines.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tests/i915/gem_ctx_engines.c b/tests/i915/gem_ctx_engines.c
index 003dd171..c746f268 100644
--- a/tests/i915/gem_ctx_engines.c
+++ b/tests/i915/gem_ctx_engines.c
@@ -298,7 +298,7 @@ static void execute_one(int i915)
spin = igt_spin_new(i915,
.ahnd = ahnd,
.ctx = ctx,
- .flags = (IGT_SPIN_NO_PREEMPTION |
+ .flags = (IGT_SPIN_FENCE_OUT | IGT_SPIN_NO_PREEMPTION |
IGT_SPIN_POLL_RUN));
do_ioctl(i915, DRM_IOCTL_I915_GEM_BUSY, &busy);
@@ -320,6 +320,7 @@ static void execute_one(int i915)
int expected = j == i ? 0 : -EINVAL;
execbuf.rsvd1 = ctx->id;
+ execbuf.rsvd2 = spin->out_fence;
execbuf.flags = j;
igt_assert_f(__gem_execbuf(i915, &execbuf) == expected,
"Failed to report the %s engine for slot %d (valid at %d)\n",
--
2.25.1
More information about the igt-dev
mailing list