diff options
author | Arjun Melkaveri <arjun.melkaveri@intel.com> | 2022-02-05 01:33:33 +0530 |
---|---|---|
committer | Zbigniew Kempczyński <zbigniew.kempczynski@intel.com> | 2022-02-09 13:08:11 +0100 |
commit | 1bd167a3af9e8f6168ac89c64c64b929694d9be7 (patch) | |
tree | 7b0faa8cbc73c052bd26fc6a614864438d0d22d1 /tests/i915/gem_ctx_engines.c | |
parent | a96674e747ea2f2431bbf8813156adc44ec3162a (diff) |
tests/i915/gem_ctx_engines: Added out fence for execute-one subtest
Resolved __gem_execbuf error seen, by passing spin->execbuf.rsvd2 >> 32.
As we are creating ctx for each engine .
Error resolved:-
(gem_ctx_engines:4117) CRITICAL: Failed assertion: __gem_execbuf(i915, &execbuf) == expected
(gem_ctx_engines:4117) CRITICAL: Failed to report the valid engine for slot 0 (valid at 0)
Introducing IGT_SPIN_FENCE_OUT means we can stop using the
no-preemption in spinner. Added
I915_EXEC_FENCE_IN to the execbuf.flags so that it
is executed after the spinner.
This is enhancement to the code .
Cc: Chris Wilson <chris.p.wilson@intel.com>
Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Signed-off-by: Arjun Melkaveri <arjun.melkaveri@intel.com>
Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Diffstat (limited to 'tests/i915/gem_ctx_engines.c')
-rw-r--r-- | tests/i915/gem_ctx_engines.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/i915/gem_ctx_engines.c b/tests/i915/gem_ctx_engines.c index 003dd171..de4b822c 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_POLL_RUN)); do_ioctl(i915, DRM_IOCTL_I915_GEM_BUSY, &busy); @@ -314,13 +314,13 @@ static void execute_one(int i915) } cfg.num_engines = GEM_MAX_ENGINES; ctx = intel_ctx_create(i915, &cfg); + execbuf.rsvd2 = spin->execbuf.rsvd2 >> 32; - igt_spin_busywait_until_started(spin); for (int j = 0; j <= I915_EXEC_RING_MASK; j++) { int expected = j == i ? 0 : -EINVAL; execbuf.rsvd1 = ctx->id; - execbuf.flags = j; + execbuf.flags = j | I915_EXEC_FENCE_IN; igt_assert_f(__gem_execbuf(i915, &execbuf) == expected, "Failed to report the %s engine for slot %d (valid at %d)\n", j == i ? "valid" : "invalid", j, i); |