diff options
author | Tvrtko Ursulin <tvrtko.ursulin@intel.com> | 2020-01-23 13:10:01 +0000 |
---|---|---|
committer | Tvrtko Ursulin <tvrtko.ursulin@intel.com> | 2020-01-27 09:16:01 +0000 |
commit | 88ba27126a3fa6f267fb722242ea313fad197436 (patch) | |
tree | e63487a920c6f9d55c6b0307697f4df3c7b6d3d5 /tests/i915/gem_exec_parallel.c | |
parent | eedff4ebbaac8de51728247311e534e67ce6b859 (diff) |
i915/gem_engine_topology: Introduce and use gem_context_clone_with_engines
In test cases which create new contexts and submit work against them using
the passed in engine index we are sometimes unsure whether this engine
index was potentially created based on a default context with engine map
configured (such as when under the __for_each_physical_engine iterator.
To simplify test code we add gem_context/queue_clone_with_engines which
is to be used in such scenario instead of the current pattern of
gem_context_create followed by gem_context_set_all_engines (which is also
removed by the patch).
v2:
* Fix swapped arguments to gem_context_clone. (Chris)
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Suggested-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tests/i915/gem_exec_parallel.c')
-rw-r--r-- | tests/i915/gem_exec_parallel.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/i915/gem_exec_parallel.c b/tests/i915/gem_exec_parallel.c index 56b26cf4..cfbe7807 100644 --- a/tests/i915/gem_exec_parallel.c +++ b/tests/i915/gem_exec_parallel.c @@ -127,8 +127,7 @@ static void *thread(void *data) if (t->gen < 6) execbuf.flags |= I915_EXEC_SECURE; if (t->flags & CONTEXTS) { - execbuf.rsvd1 = gem_context_create(fd); - gem_context_set_all_engines(fd, execbuf.rsvd1); + execbuf.rsvd1 = gem_context_clone_with_engines(fd, 0); } for (i = 0; i < 16; i++) { |