All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Ekstrand <jason@jlekstrand.net>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t 05/77] tests/i915/gem_exec_nop: Convert to intel_ctx_t
Date: Mon, 14 Jun 2021 11:36:20 -0500	[thread overview]
Message-ID: <20210614163704.365989-6-jason@jlekstrand.net> (raw)
In-Reply-To: <20210614163704.365989-1-jason@jlekstrand.net>

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
---
 tests/i915/gem_exec_nop.c | 156 ++++++++++++++++++++++----------------
 1 file changed, 92 insertions(+), 64 deletions(-)

diff --git a/tests/i915/gem_exec_nop.c b/tests/i915/gem_exec_nop.c
index e75ccb566..09a0c29e7 100644
--- a/tests/i915/gem_exec_nop.c
+++ b/tests/i915/gem_exec_nop.c
@@ -46,6 +46,7 @@
 #include "igt_device.h"
 #include "igt_rand.h"
 #include "igt_sysfs.h"
+#include "intel_ctx.h"
 
 
 #define ENGINE_FLAGS  (I915_EXEC_RING_MASK | I915_EXEC_BSD_MASK)
@@ -63,7 +64,7 @@ static double elapsed(const struct timespec *start, const struct timespec *end)
 		(end->tv_nsec - start->tv_nsec)*1e-9);
 }
 
-static double nop_on_ring(int fd, uint32_t handle,
+static double nop_on_ring(int fd, uint32_t handle, const intel_ctx_t *ctx,
 			  const struct intel_execution_engine2 *e,
 			  int timeout_ms,
 			  unsigned long *out)
@@ -82,6 +83,7 @@ static double nop_on_ring(int fd, uint32_t handle,
 	execbuf.flags = e->flags;
 	execbuf.flags |= I915_EXEC_HANDLE_LUT;
 	execbuf.flags |= I915_EXEC_NO_RELOC;
+	execbuf.rsvd1 = ctx->id;
 	if (__gem_execbuf(fd, &execbuf)) {
 		execbuf.flags = e->flags;
 		gem_execbuf(fd, &execbuf);
@@ -102,7 +104,8 @@ static double nop_on_ring(int fd, uint32_t handle,
 	return elapsed(&start, &now);
 }
 
-static void poll_ring(int fd, const struct intel_execution_engine2 *e,
+static void poll_ring(int fd, const intel_ctx_t *ctx,
+		      const struct intel_execution_engine2 *e,
 		      int timeout)
 {
 	const unsigned int gen = intel_gen(intel_get_drm_devid(fd));
@@ -186,6 +189,7 @@ static void poll_ring(int fd, const struct intel_execution_engine2 *e,
 	execbuf.buffers_ptr = to_user_pointer(&obj);
 	execbuf.buffer_count = 1;
 	execbuf.flags = e->flags | flags;
+	execbuf.rsvd1 = ctx->id;
 
 	cycles = 0;
 	do {
@@ -213,7 +217,8 @@ static void poll_ring(int fd, const struct intel_execution_engine2 *e,
 	gem_close(fd, obj.handle);
 }
 
-static void poll_sequential(int fd, const char *name, int timeout)
+static void poll_sequential(int fd, const intel_ctx_t *ctx,
+			    const char *name, int timeout)
 {
 	const unsigned int gen = intel_gen(intel_get_drm_devid(fd));
 	const struct intel_execution_engine2 *e;
@@ -233,7 +238,7 @@ static void poll_sequential(int fd, const char *name, int timeout)
 		flags |= I915_EXEC_SECURE;
 
 	nengine = 0;
-	__for_each_physical_engine(fd, e) {
+	for_each_ctx_engine(fd, ctx, e) {
 		if (!gem_class_can_store_dword(fd, e->class) ||
 		    !gem_class_has_mutable_submission(fd, e->class))
 			continue;
@@ -313,6 +318,7 @@ static void poll_sequential(int fd, const char *name, int timeout)
 	memset(&execbuf, 0, sizeof(execbuf));
 	execbuf.buffers_ptr = to_user_pointer(obj);
 	execbuf.buffer_count = ARRAY_SIZE(obj);
+	execbuf.rsvd1 = ctx->id;
 
 	cycles = 0;
 	do {
@@ -343,19 +349,19 @@ static void poll_sequential(int fd, const char *name, int timeout)
 	gem_close(fd, obj[0].handle);
 }
 
-static void single(int fd, uint32_t handle,
+static void single(int fd, uint32_t handle, const intel_ctx_t *ctx,
 		   const struct intel_execution_engine2 *e)
 {
 	double time;
 	unsigned long count;
 
-	time = nop_on_ring(fd, handle, e, 20000, &count);
+	time = nop_on_ring(fd, handle, ctx, e, 20000, &count);
 	igt_info("%s: %'lu cycles: %.3fus\n",
 		  e->name, count, time*1e6 / count);
 }
 
 static double
-stable_nop_on_ring(int fd, uint32_t handle,
+stable_nop_on_ring(int fd, uint32_t handle, const intel_ctx_t *ctx,
 		   const struct intel_execution_engine2 *e,
 		   int timeout_ms,
 		   int reps)
@@ -372,7 +378,7 @@ stable_nop_on_ring(int fd, uint32_t handle,
 		unsigned long count;
 		double time;
 
-		time = nop_on_ring(fd, handle, e, timeout_ms, &count);
+		time = nop_on_ring(fd, handle, ctx, e, timeout_ms, &count);
 		igt_stats_push_float(&s, time / count);
 	}
 
@@ -388,7 +394,7 @@ stable_nop_on_ring(int fd, uint32_t handle,
                      "'%s' != '%s' (%f not within %f%% tolerance of %f)\n",\
                      #x, #ref, x, tolerance * 100.0, ref)
 
-static void headless(int fd, uint32_t handle,
+static void headless(int fd, uint32_t handle, const intel_ctx_t *ctx,
 		     const struct intel_execution_engine2 *e)
 {
 	unsigned int nr_connected = 0;
@@ -412,11 +418,11 @@ static void headless(int fd, uint32_t handle,
 	/* set graphics mode to prevent blanking */
 	kmstest_set_vt_graphics_mode();
 
-	nop_on_ring(fd, handle, e, 10, &count);
+	nop_on_ring(fd, handle, ctx, e, 10, &count);
 	igt_require_f(count > 100, "submillisecond precision required\n");
 
 	/* benchmark nops */
-	n_display = stable_nop_on_ring(fd, handle, e, 500, 5);
+	n_display = stable_nop_on_ring(fd, handle, ctx, e, 500, 5);
 	igt_info("With one display connected: %.2fus\n",
 		 n_display * 1e6);
 
@@ -424,7 +430,7 @@ static void headless(int fd, uint32_t handle,
 	kmstest_unset_all_crtcs(fd, res);
 
 	/* benchmark nops again */
-	n_headless = stable_nop_on_ring(fd, handle, e, 500, 5);
+	n_headless = stable_nop_on_ring(fd, handle, ctx, e, 500, 5);
 	igt_info("Without a display connected (headless): %.2fus\n",
 		 n_headless * 1e6);
 
@@ -432,7 +438,8 @@ static void headless(int fd, uint32_t handle,
 	assert_within_epsilon(n_headless, n_display, 0.1f);
 }
 
-static void parallel(int fd, uint32_t handle, int timeout)
+static void parallel(int fd, uint32_t handle,
+		     const intel_ctx_t *ctx, int timeout)
 {
 	const struct intel_execution_engine2 *e;
 	struct drm_i915_gem_execbuffer2 execbuf;
@@ -446,11 +453,11 @@ static void parallel(int fd, uint32_t handle, int timeout)
 	sum = 0;
 	nengine = 0;
 
-	__for_each_physical_engine(fd, e) {
+	for_each_ctx_engine(fd, ctx, e) {
 		engines[nengine] = e->flags;
 		names[nengine++] = strdup(e->name);
 
-		time = nop_on_ring(fd, handle, e, 250, &count) / count;
+		time = nop_on_ring(fd, handle, ctx, e, 250, &count) / count;
 		sum += time;
 		igt_debug("%s: %.3fus\n", e->name, 1e6*time);
 	}
@@ -465,6 +472,7 @@ static void parallel(int fd, uint32_t handle, int timeout)
 	execbuf.buffer_count = 1;
 	execbuf.flags |= I915_EXEC_HANDLE_LUT;
 	execbuf.flags |= I915_EXEC_NO_RELOC;
+	execbuf.rsvd1 = ctx->id;
 	if (__gem_execbuf(fd, &execbuf)) {
 		execbuf.flags = 0;
 		gem_execbuf(fd, &execbuf);
@@ -495,7 +503,8 @@ static void parallel(int fd, uint32_t handle, int timeout)
 	igt_assert_eq(intel_detect_and_clear_missed_interrupts(fd), 0);
 }
 
-static void independent(int fd, uint32_t handle, int timeout)
+static void independent(int fd, uint32_t handle,
+			const intel_ctx_t *ctx, int timeout)
 {
 	const struct intel_execution_engine2 *e;
 	struct drm_i915_gem_execbuffer2 execbuf;
@@ -508,11 +517,11 @@ static void independent(int fd, uint32_t handle, int timeout)
 
 	sum = 0;
 	nengine = 0;
-	__for_each_physical_engine(fd, e) {
+	for_each_ctx_engine(fd, ctx, e) {
 		engines[nengine] = e->flags;
 		names[nengine++] = strdup(e->name);
 
-		time = nop_on_ring(fd, handle, e, 250, &count) / count;
+		time = nop_on_ring(fd, handle, ctx, e, 250, &count) / count;
 		sum += time;
 		igt_debug("%s: %.3fus\n", e->name, 1e6*time);
 	}
@@ -527,6 +536,7 @@ static void independent(int fd, uint32_t handle, int timeout)
 	execbuf.buffer_count = 1;
 	execbuf.flags |= I915_EXEC_HANDLE_LUT;
 	execbuf.flags |= I915_EXEC_NO_RELOC;
+	execbuf.rsvd1 = ctx->id;
 	if (__gem_execbuf(fd, &execbuf)) {
 		execbuf.flags = 0;
 		gem_execbuf(fd, &execbuf);
@@ -563,7 +573,7 @@ static void independent(int fd, uint32_t handle, int timeout)
 	igt_assert_eq(intel_detect_and_clear_missed_interrupts(fd), 0);
 }
 
-static void multiple(int fd,
+static void multiple(int fd, const intel_ctx_t *ctx,
 		     const struct intel_execution_engine2 *e,
 		     int timeout)
 {
@@ -582,6 +592,7 @@ static void multiple(int fd,
 	execbuf.flags = e->flags;
 	execbuf.flags |= I915_EXEC_HANDLE_LUT;
 	execbuf.flags |= I915_EXEC_NO_RELOC;
+	execbuf.rsvd1 = ctx->id;
 	if (__gem_execbuf(fd, &execbuf)) {
 		execbuf.flags = e->flags;
 		gem_execbuf(fd, &execbuf);
@@ -593,9 +604,11 @@ static void multiple(int fd,
 		unsigned long count;
 		double time;
 		int i915;
+		const intel_ctx_t *child_ctx;
 
 		i915 = gem_reopen_driver(fd);
-		gem_context_copy_engines(fd, 0, i915, 0);
+		child_ctx = intel_ctx_create(i915, &ctx->cfg);
+		execbuf.rsvd1 = child_ctx->id;
 
 		obj.handle = gem_create(i915, 4096);
 		gem_write(i915, obj.handle, 0, &bbe, sizeof(bbe));
@@ -610,6 +623,7 @@ static void multiple(int fd,
 		} while (elapsed(&start, &now) < timeout);
 		time = elapsed(&start, &now) / count;
 		igt_info("%d: %ld cycles, %.3fus\n", child, count, 1e6*time);
+		intel_ctx_destroy(i915, child_ctx);
 	}
 
 	igt_waitchildren();
@@ -618,7 +632,8 @@ static void multiple(int fd,
 	gem_close(fd, obj.handle);
 }
 
-static void series(int fd, uint32_t handle, int timeout)
+static void series(int fd, uint32_t handle,
+		   const intel_ctx_t *ctx, int timeout)
 {
 	const struct intel_execution_engine2 *e;
 	struct drm_i915_gem_execbuffer2 execbuf;
@@ -631,8 +646,8 @@ static void series(int fd, uint32_t handle, int timeout)
 	const char *name;
 
 	nengine = 0;
-	__for_each_physical_engine(fd, e) {
-		time = nop_on_ring(fd, handle, e, 250, &count) / count;
+	for_each_ctx_engine(fd, ctx, e) {
+		time = nop_on_ring(fd, handle, ctx, e, 250, &count) / count;
 		if (time > max) {
 			name = e->name;
 			max = time;
@@ -654,6 +669,7 @@ static void series(int fd, uint32_t handle, int timeout)
 	execbuf.buffer_count = 1;
 	execbuf.flags |= I915_EXEC_HANDLE_LUT;
 	execbuf.flags |= I915_EXEC_NO_RELOC;
+	execbuf.rsvd1 = ctx->id;
 	if (__gem_execbuf(fd, &execbuf)) {
 		execbuf.flags = 0;
 		gem_execbuf(fd, &execbuf);
@@ -689,9 +705,11 @@ static void xchg(void *array, unsigned i, unsigned j)
 	u[j] = tmp;
 }
 
-static void sequential(int fd, uint32_t handle, unsigned flags, int timeout)
+static void sequential(int fd, uint32_t handle,
+		       const intel_ctx_t *ctx, unsigned flags, int timeout)
 {
 	const int ncpus = flags & FORKED ? sysconf(_SC_NPROCESSORS_ONLN) : 1;
+	const intel_ctx_t *tmp_ctx = NULL, *child_ctx = NULL;
 	const struct intel_execution_engine2 *e;
 	struct drm_i915_gem_execbuffer2 execbuf;
 	struct drm_i915_gem_exec_object2 obj[2];
@@ -708,10 +726,10 @@ static void sequential(int fd, uint32_t handle, unsigned flags, int timeout)
 
 	nengine = 0;
 	sum = 0;
-	__for_each_physical_engine(fd, e) {
+	for_each_ctx_engine(fd, ctx, e) {
 		unsigned long count;
 
-		time = nop_on_ring(fd, handle, e, 250, &count) / count;
+		time = nop_on_ring(fd, handle, ctx, e, 250, &count) / count;
 		sum += time;
 		igt_debug("%s: %.3fus\n", e->name, 1e6*time);
 
@@ -735,7 +753,8 @@ static void sequential(int fd, uint32_t handle, unsigned flags, int timeout)
 
 	if (flags & CONTEXT) {
 		gem_require_contexts(fd);
-		execbuf.rsvd1 = gem_context_clone_with_engines(fd, 0);
+		tmp_ctx = intel_ctx_create(fd, &ctx->cfg);
+		execbuf.rsvd1 = tmp_ctx->id;
 	}
 
 	for (n = 0; n < nengine; n++) {
@@ -755,7 +774,8 @@ static void sequential(int fd, uint32_t handle, unsigned flags, int timeout)
 
 		if (flags & CONTEXT) {
 			gem_require_contexts(fd);
-			execbuf.rsvd1 = gem_context_clone_with_engines(fd, 0);
+			child_ctx = intel_ctx_create(fd, &ctx->cfg);
+			execbuf.rsvd1 = child_ctx->id;
 		}
 
 		hars_petruska_f54_1_random_perturb(child);
@@ -778,7 +798,7 @@ static void sequential(int fd, uint32_t handle, unsigned flags, int timeout)
 		results[child] = elapsed(&start, &now) / count;
 
 		if (flags & CONTEXT)
-			gem_context_destroy(fd, execbuf.rsvd1);
+			intel_ctx_destroy(fd, child_ctx);
 
 		gem_close(fd, obj[0].handle);
 	}
@@ -794,7 +814,7 @@ static void sequential(int fd, uint32_t handle, unsigned flags, int timeout)
 		 nengine, ncpus, 1e6*results[ncpus], 1e6*sum*ncpus);
 
 	if (flags & CONTEXT)
-		gem_context_destroy(fd, execbuf.rsvd1);
+		intel_ctx_destroy(fd, tmp_ctx);
 
 	gem_close(fd, obj[0].handle);
 	munmap(results, 4096);
@@ -811,6 +831,7 @@ static bool fence_wait(int fence)
 }
 
 static void fence_signal(int fd, uint32_t handle,
+			 const intel_ctx_t *ctx,
 			 const struct intel_execution_engine2 *ring_id,
 			 const char *ring_name, int timeout)
 {
@@ -828,7 +849,7 @@ static void fence_signal(int fd, uint32_t handle,
 
 	nengine = 0;
 	if (!ring_id) {
-		__for_each_physical_engine(fd, __e)
+		for_each_ctx_engine(fd, ctx, __e)
 			engines[nengine++] = __e->flags;
 	} else {
 		engines[nengine++] = ring_id->flags;
@@ -846,6 +867,7 @@ static void fence_signal(int fd, uint32_t handle,
 	execbuf.buffers_ptr = to_user_pointer(&obj);
 	execbuf.buffer_count = 1;
 	execbuf.flags = I915_EXEC_FENCE_OUT;
+	execbuf.rsvd1 = ctx->id;
 
 	n = 0;
 	count = 0;
@@ -886,20 +908,21 @@ static void fence_signal(int fd, uint32_t handle,
 }
 
 static void preempt(int fd, uint32_t handle,
+		    const intel_ctx_t *ctx,
 		    const struct intel_execution_engine2 *e)
 {
 	struct drm_i915_gem_execbuffer2 execbuf;
 	struct drm_i915_gem_exec_object2 obj;
 	struct timespec start, now;
 	unsigned long count;
-	uint32_t ctx[2];
+	const intel_ctx_t *tmp_ctx[2];
 	igt_spin_t *spin;
 
-	ctx[0] = gem_context_clone_with_engines(fd, 0);
-	gem_context_set_priority(fd, ctx[0], MIN_PRIO);
+	tmp_ctx[0] = intel_ctx_create(fd, &ctx->cfg);
+	gem_context_set_priority(fd, tmp_ctx[0]->id, MIN_PRIO);
 
-	ctx[1] = gem_context_clone_with_engines(fd, 0);
-	gem_context_set_priority(fd, ctx[1], MAX_PRIO);
+	tmp_ctx[1] = intel_ctx_create(fd, &ctx->cfg);
+	gem_context_set_priority(fd, tmp_ctx[1]->id, MAX_PRIO);
 
 	memset(&obj, 0, sizeof(obj));
 	obj.handle = handle;
@@ -910,15 +933,16 @@ static void preempt(int fd, uint32_t handle,
 	execbuf.flags = e->flags;
 	execbuf.flags |= I915_EXEC_HANDLE_LUT;
 	execbuf.flags |= I915_EXEC_NO_RELOC;
+	execbuf.rsvd1 = ctx->id;
 	if (__gem_execbuf(fd, &execbuf)) {
 		execbuf.flags = e->flags;
 		gem_execbuf(fd, &execbuf);
 	}
-	execbuf.rsvd1 = ctx[1];
+	execbuf.rsvd1 = tmp_ctx[1]->id;
 	intel_detect_and_clear_missed_interrupts(fd);
 
 	count = 0;
-	spin = __igt_spin_new(fd, .ctx_id = ctx[0], .engine = e->flags);
+	spin = __igt_spin_new(fd, .ctx = tmp_ctx[0], .engine = e->flags);
 	clock_gettime(CLOCK_MONOTONIC, &start);
 	do {
 		gem_execbuf(fd, &execbuf);
@@ -928,8 +952,8 @@ static void preempt(int fd, uint32_t handle,
 	igt_spin_free(fd, spin);
 	igt_assert_eq(intel_detect_and_clear_missed_interrupts(fd), 0);
 
-	gem_context_destroy(fd, ctx[1]);
-	gem_context_destroy(fd, ctx[0]);
+	intel_ctx_destroy(fd, tmp_ctx[1]);
+	intel_ctx_destroy(fd, tmp_ctx[0]);
 
 	igt_info("%s: %'lu cycles: %.3fus\n",
 		 e->name, count, elapsed(&start, &now)*1e6 / count);
@@ -938,6 +962,7 @@ static void preempt(int fd, uint32_t handle,
 igt_main
 {
 	const struct intel_execution_engine2 *e;
+	const intel_ctx_t *ctx;
 	uint32_t handle = 0;
 	int device = -1;
 
@@ -949,6 +974,8 @@ igt_main
 		gem_submission_print_method(device);
 		gem_scheduler_print_capability(device);
 
+		ctx = intel_ctx_create_all_physical(device);
+
 		handle = gem_create(device, 4096);
 		gem_write(device, handle, 0, &bbe, sizeof(bbe));
 
@@ -956,57 +983,57 @@ igt_main
 	}
 
 	igt_subtest("basic-series")
-		series(device, handle, 2);
+		series(device, handle, ctx, 2);
 
 	igt_subtest("basic-parallel")
-		parallel(device, handle, 2);
+		parallel(device, handle, ctx, 2);
 
 	igt_subtest("basic-sequential")
-		sequential(device, handle, 0, 2);
+		sequential(device, handle, ctx, 0, 2);
 
 	igt_subtest_with_dynamic("single") {
-		__for_each_physical_engine(device, e) {
+		for_each_ctx_engine(device, ctx, e) {
 			igt_dynamic_f("%s", e->name)
-				single(device, handle, e);
+				single(device, handle, ctx, e);
 		}
 	}
 
 	igt_subtest_with_dynamic("signal") {
-		__for_each_physical_engine(device, e) {
+		for_each_ctx_engine(device, ctx, e) {
 			igt_dynamic_f("%s", e->name)
-				fence_signal(device, handle, e,
-					     e->name, 2);
+				fence_signal(device, handle, ctx,
+					     e, e->name, 2);
 		}
 	}
 
 	igt_subtest("signal-all")
 		/* NULL value means all engines */
-		fence_signal(device, handle, NULL, "all", 20);
+		fence_signal(device, handle, ctx, NULL, "all", 20);
 
 	igt_subtest("series")
-		series(device, handle, 20);
+		series(device, handle, ctx, 20);
 
 	igt_subtest("parallel")
-		parallel(device, handle, 20);
+		parallel(device, handle, ctx, 20);
 
 	igt_subtest("independent")
-		independent(device, handle, 20);
+		independent(device, handle, ctx, 20);
 
 	igt_subtest_with_dynamic("multiple") {
-		__for_each_physical_engine(device, e) {
+		for_each_ctx_engine(device, ctx, e) {
 			igt_dynamic_f("%s", e->name)
-				multiple(device, e, 20);
+				multiple(device, ctx, e, 20);
 		}
 	}
 
 	igt_subtest("sequential")
-		sequential(device, handle, 0, 20);
+		sequential(device, handle, ctx, 0, 20);
 
 	igt_subtest("forked-sequential")
-		sequential(device, handle, FORKED, 20);
+		sequential(device, handle, ctx, FORKED, 20);
 
 	igt_subtest("context-sequential")
-		sequential(device, handle, FORKED | CONTEXT, 20);
+		sequential(device, handle, ctx, FORKED | CONTEXT, 20);
 
 	igt_subtest_group {
 		igt_fixture {
@@ -1015,9 +1042,9 @@ igt_main
 			igt_require(gem_scheduler_has_preemption(device));
 		}
 		igt_subtest_with_dynamic("preempt") {
-			__for_each_physical_engine(device, e) {
+			for_each_ctx_engine(device, ctx, e) {
 				igt_dynamic_f("%s", e->name)
-					preempt(device, handle, e);
+					preempt(device, handle, ctx, e);
 			}
 		}
 	}
@@ -1028,29 +1055,30 @@ igt_main
 		}
 
 		igt_subtest_with_dynamic("poll") {
-			__for_each_physical_engine(device, e) {
+			for_each_ctx_engine(device, ctx, e) {
 				/* Requires master for STORE_DWORD on gen4/5 */
 				igt_dynamic_f("%s", e->name)
-					poll_ring(device, e, 20);
+					poll_ring(device, ctx, e, 20);
 			}
 		}
 
 		igt_subtest_with_dynamic("headless") {
-			__for_each_physical_engine(device, e) {
+			for_each_ctx_engine(device, ctx, e) {
 				igt_dynamic_f("%s", e->name)
 				/* Requires master for changing display modes */
-					headless(device, handle, e);
+					headless(device, handle, ctx, e);
 			}
 		}
 
 		igt_subtest("poll-sequential")
-			poll_sequential(device, "Sequential", 20);
+			poll_sequential(device, ctx, "Sequential", 20);
 
 	}
 
 	igt_fixture {
 		igt_stop_hang_detector();
 		gem_close(device, handle);
+		intel_ctx_destroy(device, ctx);
 		close(device);
 	}
 }
-- 
2.31.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  parent reply	other threads:[~2021-06-14 16:37 UTC|newest]

Thread overview: 148+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-14 16:36 [igt-dev] [PATCH i-g-t 00/77] Stop depending on context mutation (v4) Jason Ekstrand
2021-06-14 16:36 ` [igt-dev] [PATCH i-g-t 01/77] tests/i915/gem_exec_fence: Move the engine data into inter_engine_context (v3) Jason Ekstrand
2021-06-14 16:36 ` [igt-dev] [PATCH i-g-t 02/77] tests/i915/gem_exec_fence: Convert to intel_ctx_t Jason Ekstrand
2021-06-15  1:57   ` Dixit, Ashutosh
2021-06-15  2:07     ` Dixit, Ashutosh
2021-06-15 18:10     ` Jason Ekstrand
2021-06-15 18:23       ` Dixit, Ashutosh
2021-06-14 16:36 ` [igt-dev] [PATCH i-g-t 03/77] tests/i915/gem_exec_schedule: " Jason Ekstrand
2021-06-15 23:03   ` Dixit, Ashutosh
2021-06-16 16:46     ` Jason Ekstrand
2021-06-16 21:08       ` Dixit, Ashutosh
2021-06-16 23:38     ` Dixit, Ashutosh
2021-06-16 16:57   ` [igt-dev] [PATCH i-g-t] tests/i915/gem_shrink: Convert to intel_ctx_t (v3) Jason Ekstrand
2021-06-16 23:22     ` Dixit, Ashutosh
2021-06-17 15:56       ` Jason Ekstrand
2021-06-14 16:36 ` [igt-dev] [PATCH i-g-t 04/77] tests/i915/perf_pmu: Convert to intel_ctx_t (v2) Jason Ekstrand
2021-06-14 16:36 ` Jason Ekstrand [this message]
2021-06-14 16:36 ` [igt-dev] [PATCH i-g-t 06/77] tests/i915/gem_exec_reloc: Convert to intel_ctx_t (v3) Jason Ekstrand
2021-06-14 16:36 ` [igt-dev] [PATCH i-g-t 07/77] tests/i915/gem_busy: Convert to intel_ctx_t (v2) Jason Ekstrand
2021-06-14 16:36 ` [igt-dev] [PATCH i-g-t 08/77] tests/i915/gem_ctx_isolation: " Jason Ekstrand
2021-06-14 16:36 ` [igt-dev] [PATCH i-g-t 09/77] tests/i915/gem_exec_async: " Jason Ekstrand
2021-06-14 16:36 ` [igt-dev] [PATCH i-g-t 10/77] tests/i915/sysfs_clients: Convert to intel_ctx_t Jason Ekstrand
2021-06-14 16:36 ` [igt-dev] [PATCH i-g-t 11/77] tests/i915/gem_exec_fair: " Jason Ekstrand
2021-06-14 16:36 ` [igt-dev] [PATCH i-g-t 12/77] tests/i915/gem_spin_batch: Convert to intel_ctx_t (v2) Jason Ekstrand
2021-06-14 16:36 ` [igt-dev] [PATCH i-g-t 13/77] tests/i915/gem_exec_store: " Jason Ekstrand
2021-06-14 16:36 ` [igt-dev] [PATCH i-g-t 14/77] tests/amdgpu/amd_prime: Convert to intel_ctx_t Jason Ekstrand
2021-06-14 16:36 ` [igt-dev] [PATCH i-g-t 15/77] tests/i915/i915_hangman: " Jason Ekstrand
2021-06-15 10:10   ` Zbigniew Kempczyński
2021-06-14 16:36 ` [igt-dev] [PATCH i-g-t 16/77] tests/i915/gem_ringfill: " Jason Ekstrand
2021-06-15 10:46   ` Zbigniew Kempczyński
2021-06-14 16:36 ` [igt-dev] [PATCH i-g-t 17/77] tests/prime_busy: " Jason Ekstrand
2021-06-14 16:36 ` [igt-dev] [PATCH i-g-t 18/77] tests/prime_vgem: Convert to intel_ctx_t (v2) Jason Ekstrand
2021-06-14 16:36 ` [igt-dev] [PATCH i-g-t 19/77] tests/gem_exec_whisper: Convert to intel_ctx_t Jason Ekstrand
2021-06-17  2:17   ` Dixit, Ashutosh
2021-06-17 18:31     ` Jason Ekstrand
2021-06-17 19:40       ` Dixit, Ashutosh
2021-06-14 16:36 ` [igt-dev] [PATCH i-g-t 20/77] tests/i915/gem_ctx_exec: Stop cloning contexts in close_race Jason Ekstrand
2021-06-14 16:36 ` [igt-dev] [PATCH i-g-t 21/77] tests/i915/gem_ctx_exec: Convert to intel_ctx_t Jason Ekstrand
2021-06-14 17:26   ` Zbigniew Kempczyński
2021-06-14 16:36 ` [igt-dev] [PATCH i-g-t 22/77] tests/i915/gem_exec_suspend: Convert to intel_ctx_t (v2) Jason Ekstrand
2021-06-14 16:36 ` [igt-dev] [PATCH i-g-t 23/77] tests/i915/gem_sync: Convert to intel_ctx_t Jason Ekstrand
2021-06-14 17:28   ` Zbigniew Kempczyński
2021-06-14 22:42     ` Jason Ekstrand
2021-06-14 16:36 ` [igt-dev] [PATCH i-g-t 24/77] tests/i915/gem_userptr_blits: " Jason Ekstrand
2021-06-14 17:31   ` Zbigniew Kempczyński
2021-06-14 16:36 ` [igt-dev] [PATCH i-g-t 25/77] tests/i915/gem_wait: " Jason Ekstrand
2021-06-14 17:32   ` Zbigniew Kempczyński
2021-06-14 16:36 ` [igt-dev] [PATCH i-g-t 26/77] tests/i915/gem_request_retire: " Jason Ekstrand
2021-06-14 17:36   ` Zbigniew Kempczyński
2021-06-14 16:36 ` [igt-dev] [PATCH i-g-t 27/77] tests/i915/gem_ctx_shared: " Jason Ekstrand
2021-06-17  5:22   ` Dixit, Ashutosh
2021-06-17 19:08     ` Jason Ekstrand
2021-06-14 16:36 ` [igt-dev] [PATCH i-g-t 28/77] tests/i915/gem_ctx_shared: Stop cloning contexts Jason Ekstrand
2021-06-17  6:28   ` Dixit, Ashutosh
2021-06-14 16:36 ` [igt-dev] [PATCH i-g-t 29/77] tests/i915/gem_create: Convert to intel_ctx_t Jason Ekstrand
2021-06-14 17:39   ` Zbigniew Kempczyński
2021-06-14 16:36 ` [igt-dev] [PATCH i-g-t 30/77] tests/i915/gem_ctx_switch: " Jason Ekstrand
2021-06-14 16:36 ` [igt-dev] [PATCH i-g-t 31/77] tests/i915/gem_exec_parallel: " Jason Ekstrand
2021-06-14 19:04   ` Zbigniew Kempczyński
2021-06-14 16:36 ` [igt-dev] [PATCH i-g-t 32/77] tests/i915/gem_exec_latency: " Jason Ekstrand
2021-06-14 19:10   ` Zbigniew Kempczyński
2021-06-14 16:36 ` [igt-dev] [PATCH i-g-t 33/77] tests/i915/gem_watchdog: Convert to intel_ctx_t (v2) Jason Ekstrand
2021-06-14 16:36 ` [igt-dev] [PATCH i-g-t 34/77] tests/i915/gem_shrink: Convert to intel_ctx_t Jason Ekstrand
2021-06-14 19:23   ` Zbigniew Kempczyński
2021-06-15 20:29     ` Jason Ekstrand
2021-06-15 20:30   ` [igt-dev] [PATCH i-g-t] tests/i915/gem_shrink: Convert to intel_ctx_t (v2) Jason Ekstrand
2021-06-14 16:36 ` [igt-dev] [PATCH i-g-t 35/77] tests/i915/gem_exec_params: Convert to intel_ctx_t Jason Ekstrand
2021-06-14 19:24   ` Zbigniew Kempczyński
2021-06-14 16:36 ` [igt-dev] [PATCH i-g-t 36/77] tests/i915/gem_exec_gttfill: " Jason Ekstrand
2021-06-14 19:25   ` Zbigniew Kempczyński
2021-06-14 16:36 ` [igt-dev] [PATCH i-g-t 37/77] tests/i915/gem_exec_capture: " Jason Ekstrand
2021-06-15  6:38   ` Zbigniew Kempczyński
2021-06-14 16:36 ` [igt-dev] [PATCH i-g-t 38/77] tests/i915/gem_exec_create: " Jason Ekstrand
2021-06-15  6:45   ` Zbigniew Kempczyński
2021-06-14 16:36 ` [igt-dev] [PATCH i-g-t 39/77] tests/i915/gem_exec_await: " Jason Ekstrand
2021-06-15  6:56   ` Zbigniew Kempczyński
2021-06-14 16:36 ` [igt-dev] [PATCH i-g-t 40/77] tests/i915/gem_ctx_persistence: Drop the clone subtest Jason Ekstrand
2021-06-15  6:57   ` Zbigniew Kempczyński
2021-06-14 16:36 ` [igt-dev] [PATCH i-g-t 41/77] tests/i915/gem_ctx_persistence: Drop the engine replace subtests Jason Ekstrand
2021-06-15  7:45   ` Zbigniew Kempczyński
2021-06-14 16:36 ` [igt-dev] [PATCH i-g-t 42/77] tests/i915/gem_ctx_persistence: Convert to intel_ctx_t Jason Ekstrand
2021-06-14 16:36 ` [igt-dev] [PATCH i-g-t 43/77] tests/i915/module_load: " Jason Ekstrand
2021-06-15  7:52   ` Zbigniew Kempczyński
2021-06-14 16:36 ` [igt-dev] [PATCH i-g-t 44/77] tests/i915/pm_rc6_residency: " Jason Ekstrand
2021-06-15  7:54   ` Zbigniew Kempczyński
2021-06-14 16:37 ` [igt-dev] [PATCH i-g-t 45/77] tests/i915/gem_cs_tlb: " Jason Ekstrand
2021-06-15  7:56   ` Zbigniew Kempczyński
2021-06-14 16:37 ` [igt-dev] [PATCH i-g-t 46/77] tests/core_hotplug: " Jason Ekstrand
2021-06-15  7:58   ` Zbigniew Kempczyński
2021-06-14 16:37 ` [igt-dev] [PATCH i-g-t 47/77] tests/i915/gem_exec_balancer: Stop cloning engines Jason Ekstrand
2021-06-14 16:37 ` [igt-dev] [PATCH i-g-t 48/77] tests/i915/gem_exec_balancer: Don't reset engines on a context Jason Ekstrand
2021-06-14 16:37 ` [igt-dev] [PATCH i-g-t 49/77] tests/i915/gem_exec_balancer: Stop munging ctx0 engines Jason Ekstrand
2021-06-14 16:38 ` [igt-dev] [PATCH i-g-t 50/77] tests/i915/gem_exec_balancer: Drop bonded tests Jason Ekstrand
2021-06-14 16:38 ` [igt-dev] [PATCH i-g-t 51/77] lib/intel_ctx: Add load balancing support (v2) Jason Ekstrand
2021-06-14 16:38 ` [igt-dev] [PATCH i-g-t 52/77] tests/i915/gem_exec_balancer: Convert to intel_ctx_t Jason Ekstrand
2021-06-14 16:38 ` [igt-dev] [PATCH i-g-t 53/77] tests/i915/gem_exec_endless: Stop munging ctx0 engines Jason Ekstrand
2021-06-15  8:40   ` Zbigniew Kempczyński
2021-06-14 16:38 ` [igt-dev] [PATCH i-g-t 54/77] lib/i915: Use for_each_physical_ring for submission tests Jason Ekstrand
2021-06-15  8:44   ` Zbigniew Kempczyński
2021-06-15 18:23     ` Jason Ekstrand
2021-06-15 19:11       ` Dixit, Ashutosh
2021-06-16  4:55       ` Zbigniew Kempczyński
2021-06-16 17:09         ` Jason Ekstrand
2021-06-16 17:08   ` [igt-dev] [PATCH i-g-t] lib/i915: Use intel_ctx_0() for submission tests (v2) Jason Ekstrand
2021-06-16 20:28     ` Dixit, Ashutosh
2021-06-17 16:16       ` Jason Ekstrand
2021-06-17 17:17         ` Jason Ekstrand
2021-06-14 16:38 ` [igt-dev] [PATCH i-g-t 55/77] tests/i915/gem_ctx_engines: Rework execute-one* Jason Ekstrand
2021-06-14 16:38 ` [igt-dev] [PATCH i-g-t 56/77] tests/i915/gem_ctx_engines: Use better engine iteration Jason Ekstrand
2021-06-14 16:38 ` [igt-dev] [PATCH i-g-t 57/77] tests/i915/gem_ctx_engines: Drop the idempotent subtest Jason Ekstrand
2021-06-14 16:38 ` [igt-dev] [PATCH i-g-t 58/77] tests/i915/gem_ctx_create: Convert benchmarks to intel_ctx_t Jason Ekstrand
2021-06-14 16:38 ` [igt-dev] [PATCH i-g-t 59/77] tests/i915/gem_vm_create: Delete destroy racing tests Jason Ekstrand
2021-06-14 16:38 ` [igt-dev] [PATCH i-g-t 60/77] tests/i915/gem_vm_create: Use intel_ctx_t in the execbuf test Jason Ekstrand
2021-06-14 16:38 ` [igt-dev] [PATCH i-g-t 61/77] tests/i915/sysfs: Convert to intel_ctx_t Jason Ekstrand
2021-06-15 23:37   ` Dixit, Ashutosh
2021-06-14 16:38 ` [igt-dev] [PATCH i-g-t 62/77] tests/i915/gem_workarounds: " Jason Ekstrand
2021-06-17  0:28   ` Dixit, Ashutosh
2021-06-17 15:59     ` Jason Ekstrand
2021-06-14 16:38 ` [igt-dev] [PATCH i-g-t 63/77] lib/i915/gem_context: Delete all the context clone/copy stuff Jason Ekstrand
2021-06-14 16:38 ` [igt-dev] [PATCH i-g-t 64/77] tests/i915/gem_ctx_engines: Delete the libapi subtest Jason Ekstrand
2021-06-14 16:38 ` [igt-dev] [PATCH i-g-t 65/77] lib/igt_dummyload: Stop supporting ALL_ENGINES without an intel_ctx_t Jason Ekstrand
2021-06-14 16:38 ` [igt-dev] [PATCH i-g-t 66/77] lib/i915/gem_engine_topology: Delete the old physical engine iterators Jason Ekstrand
2021-06-14 16:38 ` [igt-dev] [PATCH i-g-t 67/77] tests/i915/gem_mmap_gtt: Convert to intel_ctx_t Jason Ekstrand
2021-06-16  3:14   ` Dixit, Ashutosh
2021-06-23  5:29     ` Jason Ekstrand
2021-06-14 16:38 ` [igt-dev] [PATCH i-g-t 68/77] igt/dummyload: Require an intel_ctx_t for POLL_RUN and !ALL_ENGINES Jason Ekstrand
2021-06-16  2:25   ` Dixit, Ashutosh
2021-06-16  2:49     ` Dixit, Ashutosh
2021-06-16  2:56       ` Dixit, Ashutosh
2021-06-16 17:30         ` Jason Ekstrand
2021-06-17  3:57           ` Petri Latvala
2021-06-16 17:21       ` Jason Ekstrand
2021-06-16 17:25         ` Jason Ekstrand
2021-06-16 22:56           ` Dixit, Ashutosh
2021-06-14 16:38 ` [igt-dev] [PATCH i-g-t 69/77] lib/i915: Rework engine API availability checks (v2) Jason Ekstrand
2021-06-14 16:38 ` [igt-dev] [PATCH i-g-t 70/77] lib/intel_bb: Remove intel_bb_assign_vm and tests (v2) Jason Ekstrand
2021-06-14 16:38 ` [igt-dev] [PATCH i-g-t 71/77] tests/i915/gem_ctx_param: Stop setting VMs on old contexts Jason Ekstrand
2021-06-14 16:38 ` [igt-dev] [PATCH i-g-t 72/77] tests/i915/gen9_exec_parse: Convert to intel_ctx_t Jason Ekstrand
2021-06-14 16:38 ` [igt-dev] [PATCH i-g-t 73/77] tests/i915/gem_ctx_param: Add tests for recently removed params Jason Ekstrand
2021-06-14 16:38 ` [igt-dev] [PATCH i-g-t 74/77] tests/i915/gem_ctx_param: Add a couple invalid PARAM_VM cases Jason Ekstrand
2021-06-14 16:39 ` [igt-dev] [PATCH i-g-t 75/77] tests/i915/gem_ctx_engines: Fix the invalid subtest for the new rules Jason Ekstrand
2021-06-14 16:39 ` [igt-dev] [PATCH i-g-t 76/77] tests/i915/gem_exec_balancer: Fix invalid-balancer for the set-once rule Jason Ekstrand
2021-06-14 16:39 ` [igt-dev] [PATCH i-g-t 77/77] tests/i915/gem_exec_balancer: Add a test for combind balancing and bonding (v2) Jason Ekstrand
2021-06-14 17:45 ` [igt-dev] ✓ Fi.CI.BAT: success for Stop depending on context mutation (rev8) Patchwork
2021-06-14 22:48 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2021-06-15 21:05 ` [igt-dev] ✓ Fi.CI.BAT: success for Stop depending on context mutation (rev9) Patchwork
2021-06-16  3:16 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2021-06-16 18:08 ` [igt-dev] ✗ Fi.CI.BUILD: failure for Stop depending on context mutation (rev11) Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210614163704.365989-6-jason@jlekstrand.net \
    --to=jason@jlekstrand.net \
    --cc=igt-dev@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.