diff options
| author | Chris Wilson <chris@chris-wilson.co.uk> | 2019-06-18 21:17:15 +0100 |
|---|---|---|
| committer | Chris Wilson <chris@chris-wilson.co.uk> | 2019-06-19 09:47:42 +0100 |
| commit | 26a69c93d712a0f1f6dce663b48e09d1c9815b6c (patch) | |
| tree | bcd09a9acb4e8ef7621b97a496ed36627d76de8b | |
| parent | c6a0e43633a399899278353e452a52bb41ac96e1 (diff) | |
i915/gem_ctx_engines: Prevent preemption
In order to pin the engine as busy, we have to prevent the kernel from
executing other independent work ahead of our plug, so tell the spinner
to not allow preemption.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
| -rw-r--r-- | tests/i915/gem_ctx_engines.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/i915/gem_ctx_engines.c b/tests/i915/gem_ctx_engines.c index 3ecade41..8c66fb26 100644 --- a/tests/i915/gem_ctx_engines.c +++ b/tests/i915/gem_ctx_engines.c @@ -283,7 +283,9 @@ static void execute_one(int i915) spin = igt_spin_new(i915, .ctx = param.ctx_id, - .engine = 0); + .engine = 0, + .flags = (IGT_SPIN_NO_PREEMPTION | + IGT_SPIN_POLL_RUN)); igt_debug("Testing with map of %d engines\n", i + 1); memset(&engines.engines, -1, sizeof(engines.engines)); @@ -294,6 +296,7 @@ static void execute_one(int i915) param.size = sizeof(uint64_t) + (i + 1) * sizeof(uint32_t); gem_context_set_param(i915, ¶m); + igt_spin_busywait_until_started(spin); for (int j = 0; j <= I915_EXEC_RING_MASK; j++) { int expected = j == i ? 0 : -EINVAL; |
