diff options
author | Jason Ekstrand <jason@jlekstrand.net> | 2021-03-31 20:48:28 -0500 |
---|---|---|
committer | Jason Ekstrand <jason@jlekstrand.net> | 2021-07-08 12:45:33 -0500 |
commit | 0217b172a17d0d58745ef57b20a76eea035ace30 (patch) | |
tree | 2fbf21f783bfbf1bd4b80a4747781fffa25be732 /tests/i915/gem_request_retire.c | |
parent | 73aae64c813b3c6d901a94891cb691c50ad35e9e (diff) |
tests/i915/gem_request_retire: Convert to intel_ctx_t
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Zbigniew KempczyĆski <zbigniew.kempczynski@intel.com>
Acked-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Diffstat (limited to 'tests/i915/gem_request_retire.c')
-rw-r--r-- | tests/i915/gem_request_retire.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/tests/i915/gem_request_retire.c b/tests/i915/gem_request_retire.c index c23ddfb7..3df54f2a 100644 --- a/tests/i915/gem_request_retire.c +++ b/tests/i915/gem_request_retire.c @@ -62,24 +62,26 @@ static void test_retire_vma_not_inactive(int fd) { struct intel_execution_engine2 *e; - + const intel_ctx_t *ctx; igt_spin_t *bg = NULL; - __for_each_physical_engine(fd, e) { + ctx = intel_ctx_create_all_physical(fd); + + for_each_ctx_engine(fd, ctx, e) { igt_spin_t *spin; - uint32_t ctx; + const intel_ctx_t *spin_ctx; if (!bg) { - bg = igt_spin_new(fd, .engine = e->flags); + bg = igt_spin_new(fd, .ctx = ctx, .engine = e->flags); continue; } - ctx = gem_context_clone_with_engines(fd, 0); - spin = igt_spin_new(fd, ctx, + spin_ctx = intel_ctx_create(fd, &ctx->cfg); + spin = igt_spin_new(fd, .ctx = spin_ctx, .engine = e->flags, .dependency = bg->handle, .flags = IGT_SPIN_SOFTDEP); - gem_context_destroy(fd, ctx); + intel_ctx_destroy(fd, spin_ctx); igt_spin_end(spin); gem_sync(fd, spin->handle); @@ -88,6 +90,7 @@ test_retire_vma_not_inactive(int fd) igt_drop_caches_set(fd, DROP_RETIRE); igt_spin_free(fd, bg); + intel_ctx_destroy(fd, ctx); } int fd; |