summaryrefslogtreecommitdiff
path: root/tests/core_hotunplug.c
diff options
context:
space:
mode:
authorJason Ekstrand <jason@jlekstrand.net>2021-04-06 18:13:04 -0500
committerJason Ekstrand <jason@jlekstrand.net>2021-07-08 12:45:33 -0500
commit2d824b8c8c87290de62923d07ddee3d75b8f28b9 (patch)
tree41636600a7403830ebbb7c99fdb5720f9c8db0dd /tests/core_hotunplug.c
parent80f48722f4295095cfc5f6506ceb4d63a46e149a (diff)
tests/core_hotplug: 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/core_hotunplug.c')
-rw-r--r--tests/core_hotunplug.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/core_hotunplug.c b/tests/core_hotunplug.c
index 878efcc7..2d73e27f 100644
--- a/tests/core_hotunplug.c
+++ b/tests/core_hotunplug.c
@@ -292,6 +292,7 @@ static int local_i915_healthcheck(int i915, const char *prefix)
.buffer_count = 1,
};
const struct intel_execution_engine2 *engine;
+ const intel_ctx_t *ctx;
int fence = -1, err = 0, status = 1;
local_debug("%s%s\n", prefix, "running i915 GPU healthcheck");
@@ -303,7 +304,9 @@ static int local_i915_healthcheck(int i915, const char *prefix)
gem_write(i915, obj.handle, 0, &bbe, sizeof(bbe));
/* As soon as a fence is open, don't fail before closing it */
- __for_each_physical_engine(i915, engine) {
+ ctx = intel_ctx_create_all_physical(i915);
+ for_each_ctx_engine(i915, ctx, engine) {
+ execbuf.rsvd1 = ctx->id;
execbuf.flags = engine->flags | I915_EXEC_FENCE_OUT;
err = __gem_execbuf_wr(i915, &execbuf);
if (igt_warn_on_f(err < 0, "__gem_execbuf_wr() returned %d\n",
@@ -317,6 +320,7 @@ static int local_i915_healthcheck(int i915, const char *prefix)
break;
}
}
+ intel_ctx_destroy(i915, ctx);
if (fence >= 0) {
status = sync_fence_wait(fence, -1);
if (igt_warn_on_f(status < 0, "sync_fence_wait() returned %d\n",