All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t 0/8] Adjust IGT for upstream API clean-ups
@ 2021-03-19 22:32 Jason Ekstrand
  2021-03-19 22:32 ` [igt-dev] [PATCH i-g-t 1/8] tests/i915: Drop gem_ctx_ringsize Jason Ekstrand
                   ` (12 more replies)
  0 siblings, 13 replies; 44+ messages in thread
From: Jason Ekstrand @ 2021-03-19 22:32 UTC (permalink / raw)
  To: igt-dev

I'm trying to remove some unused APIs from upstream i915.  This i-g-t
series updates tests in accordance with those removals.  For a few things,
it simply deletes tests which test explicitly for that feature.  For
cloning, we do actually use that for a bunch of stuff today so I just
implement the two clones we care about (engines and VMs) directly with
getparam and a create setparam.

Jason Ekstrand (8):
  tests/i915: Drop gem_ctx_ringsize
  tests/i915/gem_exec_balancer: Drop the ringsize subtest
  tests/i915/gem_exec_endless: Stop setting the ring size
  tests/i915/gem_ctx_param: Drop the zeromap subtests
  tests/i915: Drop gem_ctx_clone
  tests/i915/gem_ctx_create: Stop cloning engines
  tests/i915/gem_ctx_persistence: Drop the clone test
  lib/i915/gem_context: Implement VM and engine cloning manually

 lib/i915/gem_context.c           |  90 +++++--
 lib/i915/gem_context.h           |   7 +-
 tests/Makefile.sources           |   6 -
 tests/i915/gem_ctx_clone.c       | 450 -------------------------------
 tests/i915/gem_ctx_create.c      |   4 +-
 tests/i915/gem_ctx_param.c       |  33 ---
 tests/i915/gem_ctx_persistence.c |  30 ---
 tests/i915/gem_ctx_ringsize.c    | 345 ------------------------
 tests/i915/gem_ctx_shared.c      |  10 +-
 tests/i915/gem_exec_balancer.c   |  60 +----
 tests/i915/gem_exec_endless.c    |  12 +-
 tests/i915/gem_exec_schedule.c   |   8 +-
 tests/meson.build                |   2 -
 13 files changed, 88 insertions(+), 969 deletions(-)
 delete mode 100644 tests/i915/gem_ctx_clone.c
 delete mode 100644 tests/i915/gem_ctx_ringsize.c

-- 
2.29.2

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

^ permalink raw reply	[flat|nested] 44+ messages in thread

* [igt-dev] [PATCH i-g-t 1/8] tests/i915: Drop gem_ctx_ringsize
  2021-03-19 22:32 [igt-dev] [PATCH i-g-t 0/8] Adjust IGT for upstream API clean-ups Jason Ekstrand
@ 2021-03-19 22:32 ` Jason Ekstrand
  2021-03-22 19:11   ` Daniel Vetter
  2021-03-19 22:32 ` [igt-dev] [PATCH i-g-t 2/8] tests/i915/gem_exec_balancer: Drop the ringsize subtest Jason Ekstrand
                   ` (11 subsequent siblings)
  12 siblings, 1 reply; 44+ messages in thread
From: Jason Ekstrand @ 2021-03-19 22:32 UTC (permalink / raw)
  To: igt-dev

I915_CONTEXT_PARAM_RINGSIZE is being removed from upstream i915 because
it's never been used by any userspace other than IGT.
---
 tests/Makefile.sources        |   3 -
 tests/i915/gem_ctx_ringsize.c | 345 ----------------------------------
 tests/meson.build             |   1 -
 3 files changed, 349 deletions(-)
 delete mode 100644 tests/i915/gem_ctx_ringsize.c

diff --git a/tests/Makefile.sources b/tests/Makefile.sources
index ec52ee3b..cfef5d34 100644
--- a/tests/Makefile.sources
+++ b/tests/Makefile.sources
@@ -194,9 +194,6 @@ gem_ctx_param_SOURCES = i915/gem_ctx_param.c
 TESTS_progs += gem_ctx_persistence
 gem_ctx_persistence_SOURCES = i915/gem_ctx_persistence.c
 
-TESTS_progs += gem_ctx_ringsize
-gem_ctx_ringsize_SOURCES = i915/gem_ctx_ringsize.c
-
 TESTS_progs += gem_ctx_shared
 gem_ctx_shared_SOURCES = i915/gem_ctx_shared.c
 
diff --git a/tests/i915/gem_ctx_ringsize.c b/tests/i915/gem_ctx_ringsize.c
deleted file mode 100644
index 60187b7c..00000000
--- a/tests/i915/gem_ctx_ringsize.c
+++ /dev/null
@@ -1,345 +0,0 @@
-/*
- * Copyright © 2019 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include <errno.h>
-#include <fcntl.h>
-#include <inttypes.h>
-#include <math.h>
-#include <signal.h>
-#include <sys/ioctl.h>
-#include <sys/types.h>
-#include <unistd.h>
-
-#include "drmtest.h"
-#include "i915/gem.h"
-#include "i915/gem_context.h"
-#include "i915/gem_engine_topology.h"
-#include "ioctl_wrappers.h" /* gem_wait()! */
-#include "sw_sync.h"
-
-static bool has_ringsize(int i915)
-{
-	struct drm_i915_gem_context_param p = {
-		.param = I915_CONTEXT_PARAM_RINGSIZE,
-	};
-
-	return __gem_context_get_param(i915, &p) == 0;
-}
-
-static void test_idempotent(int i915)
-{
-	struct drm_i915_gem_context_param p = {
-		.param = I915_CONTEXT_PARAM_RINGSIZE,
-	};
-	uint32_t saved;
-
-	/*
-	 * Simple test to verify that we are able to read back the same
-	 * value as we set.
-	 */
-
-	gem_context_get_param(i915, &p);
-	saved = p.value;
-
-	for (uint32_t x = 1 << 12; x <= 128 << 12; x <<= 1) {
-		p.value = x;
-		gem_context_set_param(i915, &p);
-		gem_context_get_param(i915, &p);
-		igt_assert_eq_u32(p.value, x);
-	}
-
-	p.value = saved;
-	gem_context_set_param(i915, &p);
-}
-
-static void test_invalid(int i915)
-{
-	struct drm_i915_gem_context_param p = {
-		.param = I915_CONTEXT_PARAM_RINGSIZE,
-	};
-	uint64_t invalid[] = {
-		0, 1, 4095, 4097, 8191, 8193,
-		/* upper limit may be HW dependent, atm it is 512KiB */
-		(512 << 10) - 1, (512 << 10) + 1,
-		-1, -1u
-	};
-	uint32_t saved;
-
-	/*
-	 * The HW only accepts certain aligned values and so we reject
-	 * any invalid sizes specified by the user.
-	 *
-	 * Currently, the HW only accepts 4KiB - 512KiB in 4K increments,
-	 * and is unlikely to ever accept smaller.
-	 */
-
-	gem_context_get_param(i915, &p);
-	saved = p.value;
-
-	for (int i = 0; i < ARRAY_SIZE(invalid); i++) {
-		p.value = invalid[i];
-		igt_assert_eq(__gem_context_set_param(i915, &p), -EINVAL);
-		gem_context_get_param(i915, &p);
-		igt_assert_eq_u64(p.value, saved);
-	}
-}
-
-static int create_ext_ioctl(int i915,
-			    struct drm_i915_gem_context_create_ext *arg)
-{
-	int err;
-
-	err = 0;
-	if (igt_ioctl(i915, DRM_IOCTL_I915_GEM_CONTEXT_CREATE_EXT, arg)) {
-		err = -errno;
-		igt_assume(err);
-	}
-
-	errno = 0;
-	return err;
-}
-
-static void test_create(int i915)
-{
-	struct drm_i915_gem_context_create_ext_setparam p = {
-		.base = {
-			.name = I915_CONTEXT_CREATE_EXT_SETPARAM,
-			.next_extension = 0, /* end of chain */
-		},
-		.param = {
-			.param = I915_CONTEXT_PARAM_RINGSIZE,
-			.value = 512 << 10,
-		}
-	};
-	struct drm_i915_gem_context_create_ext create = {
-		.flags = I915_CONTEXT_CREATE_FLAGS_USE_EXTENSIONS,
-		.extensions = to_user_pointer(&p),
-	};
-
-	/*
-	 * Check that the ringsize parameter is used during context constuction.
-	 */
-
-	igt_assert_eq(create_ext_ioctl(i915, &create),  0);
-
-	p.param.ctx_id = create.ctx_id;
-	p.param.value = 0;
-	gem_context_get_param(i915, &p.param);
-	igt_assert_eq(p.param.value, 512 << 10);
-
-	gem_context_destroy(i915, create.ctx_id);
-}
-
-static void test_clone(int i915)
-{
-	struct drm_i915_gem_context_create_ext_setparam p = {
-		.base = {
-			.name = I915_CONTEXT_CREATE_EXT_SETPARAM,
-			.next_extension = 0, /* end of chain */
-		},
-		.param = {
-			.param = I915_CONTEXT_PARAM_RINGSIZE,
-			.value = 512 << 10,
-		}
-	};
-	struct drm_i915_gem_context_create_ext create = {
-		.flags = I915_CONTEXT_CREATE_FLAGS_USE_EXTENSIONS,
-		.extensions = to_user_pointer(&p),
-	};
-
-	/*
-	 * Check that the ringsize is copied across during context cloning.
-	 */
-
-	igt_assert_eq(create_ext_ioctl(i915, &create),  0);
-
-	p.param.ctx_id = gem_context_clone(i915, create.ctx_id,
-					   I915_CONTEXT_CLONE_ENGINES, 0);
-	igt_assert_neq(p.param.ctx_id, create.ctx_id);
-	gem_context_destroy(i915, create.ctx_id);
-
-	p.param.value = 0;
-	gem_context_get_param(i915, &p.param);
-	igt_assert_eq(p.param.value, 512 << 10);
-
-	gem_context_destroy(i915, p.param.ctx_id);
-}
-
-static int __execbuf(int i915, struct drm_i915_gem_execbuffer2 *execbuf)
-{
-	int err;
-
-	err = 0;
-	if (ioctl(i915, DRM_IOCTL_I915_GEM_EXECBUFFER2, execbuf)) {
-		err = -errno;
-		igt_assume(err);
-	}
-
-	errno = 0;
-	return err;
-}
-
-#define IDLE (1 << 0)
-#define PLUG (1 << 1)
-
-static void sighandler(int sig)
-{
-}
-
-static unsigned int
-measure_inflight(int i915, unsigned int engine, int timeout, unsigned int flags)
-{
-	IGT_CORK_FENCE(cork);
-	unsigned int count;
-	igt_spin_t *spin;
-	int fence;
-	int err;
-
-	fcntl(i915, F_SETFL, fcntl(i915, F_GETFL) | O_NONBLOCK);
-	signal(SIGALRM, sighandler);
-	alarm(timeout);
-
-	fence = igt_cork_plug(&cork, i915);
-	spin = igt_spin_new(i915,
-			    .engine = engine,
-			    .fence = fence,
-			    .flags = (flags & PLUG) ? IGT_SPIN_FENCE_IN : 0);
-	for (count = 1; (err = __execbuf(i915, &spin->execbuf)) == 0; count++)
-		;
-	igt_debugfs_dump(i915, "i915_engine_info");
-	igt_assert_eq(err, -EWOULDBLOCK);
-	close(fence);
-
-	alarm(0);
-	signal(SIGALRM, SIG_DFL);
-	fcntl(i915, F_SETFL, fcntl(i915, F_GETFL) & ~O_NONBLOCK);
-
-	igt_spin_free(i915, spin);
-	igt_cork_unplug(&cork);
-
-	return count;
-}
-
-static void test_resize(int i915,
-			const struct intel_execution_engine2 *e,
-			void *data)
-#define as_pointer(x) (void *)(uintptr_t)(x)
-{
-	struct drm_i915_gem_context_param p = {
-		.param = I915_CONTEXT_PARAM_RINGSIZE,
-	};
-	unsigned long flags = (uintptr_t)data;
-	unsigned int prev[2] = {};
-	uint64_t elapsed;
-	uint32_t saved;
-
-	/*
-	 * The ringsize directly affects the number of batches we can have
-	 * inflight -- when we run out of room in the ring, the client is
-	 * blocked (or if O_NONBLOCK is specified, -EWOULDBLOCK is reported).
-	 * The kernel throttles the client when they enter the last 4KiB page,
-	 * so as we double the size of the ring, we nearly double the number
-	 * of requests we can fit as 2^n-1: i.e 0, 1, 3, 7, 15, 31 pages.
-	 */
-
-	gem_context_get_param(i915, &p);
-	saved = p.value;
-
-	/* XXX disable hangchecking? */
-	elapsed = 0;
-	gem_quiescent_gpu(i915);
-	for (p.value = 1 << 12; p.value <= 128 << 12; p.value <<= 1) {
-		struct timespec tv = {};
-		unsigned int count;
-
-		gem_context_set_param(i915, &p);
-
-		igt_nsec_elapsed(&tv);
-		count = measure_inflight(i915,
-					 e->flags,
-					 1 + 4 * ceil(elapsed*1e-9),
-					 flags);
-		elapsed = igt_nsec_elapsed(&tv);
-
-		igt_info("%s: %6llx -> %'6d\n", e->name, p.value, count);
-		igt_assert(count > 3 * (prev[1] - prev[0]) / 4 + prev[1]);
-		if (flags & IDLE)
-			gem_quiescent_gpu(i915);
-
-		prev[0] = prev[1];
-		prev[1] = count;
-	}
-	gem_quiescent_gpu(i915);
-
-	p.value = saved;
-	gem_context_set_param(i915, &p);
-}
-
-static void gem_test_each_engine(int i915, const char *name,
-				 void (*fn)(int i915,
-					    const struct intel_execution_engine2 *e,
-					    void *data),
-				 void *data)
-{
-	const struct intel_execution_engine2 *e;
-
-	igt_subtest_with_dynamic(name) {
-		__for_each_physical_engine(i915, e) {
-			igt_dynamic_f("%s", e->name)
-				fn(i915, e, data);
-		}
-	}
-}
-
-igt_main
-{
-	int i915;
-
-	igt_fixture {
-		i915 = drm_open_driver(DRIVER_INTEL);
-		igt_require_gem(i915);
-
-		igt_require(has_ringsize(i915));
-	}
-
-	igt_subtest("idempotent")
-		test_idempotent(i915);
-
-	igt_subtest("invalid")
-		test_invalid(i915);
-
-	igt_subtest("create")
-		test_create(i915);
-	igt_subtest("clone")
-		test_clone(i915);
-
-	gem_test_each_engine(i915, "idle", test_resize, as_pointer(IDLE));
-	gem_test_each_engine(i915, "active", test_resize, 0);
-	gem_test_each_engine(i915, "plugged", test_resize, as_pointer(PLUG));
-
-	/* XXX ctx->engines[]? Clone (above) should be enough */
-
-	igt_fixture {
-		close(i915);
-	}
-}
diff --git a/tests/meson.build b/tests/meson.build
index 0abda2c3..846a9ccf 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -135,7 +135,6 @@ i915_progs = [
 	'gem_ctx_isolation',
 	'gem_ctx_param',
 	'gem_ctx_persistence',
-	'gem_ctx_ringsize',
 	'gem_ctx_shared',
 	'gem_ctx_switch',
 	'gem_evict_alignment',
-- 
2.29.2

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

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [igt-dev] [PATCH i-g-t 2/8] tests/i915/gem_exec_balancer: Drop the ringsize subtest
  2021-03-19 22:32 [igt-dev] [PATCH i-g-t 0/8] Adjust IGT for upstream API clean-ups Jason Ekstrand
  2021-03-19 22:32 ` [igt-dev] [PATCH i-g-t 1/8] tests/i915: Drop gem_ctx_ringsize Jason Ekstrand
@ 2021-03-19 22:32 ` Jason Ekstrand
  2021-03-19 22:32 ` [igt-dev] [PATCH i-g-t 3/8] tests/i915/gem_exec_endless: Stop setting the ring size Jason Ekstrand
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 44+ messages in thread
From: Jason Ekstrand @ 2021-03-19 22:32 UTC (permalink / raw)
  To: igt-dev

I915_CONTEXT_PARAM_RINGSIZE is being removed from upstream i915 because
it's never been used by any userspace other than IGT.
---
 tests/i915/gem_exec_balancer.c | 54 ----------------------------------
 1 file changed, 54 deletions(-)

diff --git a/tests/i915/gem_exec_balancer.c b/tests/i915/gem_exec_balancer.c
index 01db0e11..9feb20fb 100644
--- a/tests/i915/gem_exec_balancer.c
+++ b/tests/i915/gem_exec_balancer.c
@@ -2578,57 +2578,6 @@ static unsigned int measure_inflight(int i915, uint32_t ctx, int timeout)
 	return count;
 }
 
-static void __resize(int i915, uint32_t ctx)
-{
-	struct drm_i915_gem_context_param p = {
-		.ctx_id = ctx,
-		.param = I915_CONTEXT_PARAM_RINGSIZE,
-	};
-	unsigned int prev[2] = {};
-	uint64_t elapsed;
-
-	elapsed = 0;
-	gem_quiescent_gpu(i915);
-	for (p.value = 1 << 12; p.value <= 128 << 12; p.value <<= 1) {
-		struct timespec tv = {};
-		unsigned int count;
-
-		gem_context_set_param(i915, &p);
-
-		igt_nsec_elapsed(&tv);
-		count = measure_inflight(i915, ctx, 1 + 4 * ceil(elapsed*1e-9));
-		elapsed = igt_nsec_elapsed(&tv);
-
-		igt_info("%6llx -> %'6d\n", p.value, count);
-		igt_assert(count > 3 * (prev[1] - prev[0]) / 4 + prev[1]);
-
-		prev[0] = prev[1];
-		prev[1] = count;
-	}
-	gem_quiescent_gpu(i915);
-}
-
-static void ringsz(int i915)
-{
-	for (int class = 0; class < 32; class++) {
-		struct i915_engine_class_instance *ci;
-		unsigned int count;
-		uint32_t ctx;
-
-		ci = list_engines(i915, 1u << class, &count);
-		if (!ci || count < 2)
-			goto next;
-
-		ctx = load_balancer_create(i915, ci, count);
-		__resize(i915, ctx);
-		gem_context_destroy(i915, ctx);
-next:
-		free(ci);
-	}
-
-	gem_quiescent_gpu(i915);
-}
-
 static void ping(int i915, uint32_t ctx, unsigned int engine)
 {
 	struct drm_i915_gem_exec_object2 obj = {
@@ -3304,9 +3253,6 @@ igt_main
 	igt_subtest("fairslice")
 		fairslice(i915);
 
-	igt_subtest("ringsize")
-		ringsz(i915);
-
 	igt_subtest("nop")
 		nop(i915);
 
-- 
2.29.2

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

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [igt-dev] [PATCH i-g-t 3/8] tests/i915/gem_exec_endless: Stop setting the ring size
  2021-03-19 22:32 [igt-dev] [PATCH i-g-t 0/8] Adjust IGT for upstream API clean-ups Jason Ekstrand
  2021-03-19 22:32 ` [igt-dev] [PATCH i-g-t 1/8] tests/i915: Drop gem_ctx_ringsize Jason Ekstrand
  2021-03-19 22:32 ` [igt-dev] [PATCH i-g-t 2/8] tests/i915/gem_exec_balancer: Drop the ringsize subtest Jason Ekstrand
@ 2021-03-19 22:32 ` Jason Ekstrand
  2021-03-22 19:14   ` Daniel Vetter
  2021-03-19 22:32 ` [igt-dev] [PATCH i-g-t 4/8] tests/i915/gem_ctx_param: Drop the zeromap subtests Jason Ekstrand
                   ` (9 subsequent siblings)
  12 siblings, 1 reply; 44+ messages in thread
From: Jason Ekstrand @ 2021-03-19 22:32 UTC (permalink / raw)
  To: igt-dev

I915_CONTEXT_PARAM_RINGSIZE is being removed from upstream i915 because
it's never been used by any userspace other than IGT.
---
 tests/i915/gem_exec_endless.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/tests/i915/gem_exec_endless.c b/tests/i915/gem_exec_endless.c
index 1b320d4c..a3e2fa49 100644
--- a/tests/i915/gem_exec_endless.c
+++ b/tests/i915/gem_exec_endless.c
@@ -67,16 +67,6 @@ static unsigned int offset_in_page(void *addr)
 static uint32_t __supervisor_create_context(int i915,
 					    const struct intel_execution_engine2 *e)
 {
-	struct drm_i915_gem_context_create_ext_setparam p_ring = {
-		{
-			.name = I915_CONTEXT_CREATE_EXT_SETPARAM,
-			.next_extension = 0
-		},
-		{
-			.param = I915_CONTEXT_PARAM_RINGSIZE,
-			.value = 4096,
-		},
-	};
 	I915_DEFINE_CONTEXT_PARAM_ENGINES(engines, 2) = {
 		.engines = {
 			{ e->class, e->instance },
@@ -86,7 +76,7 @@ static uint32_t __supervisor_create_context(int i915,
 	struct drm_i915_gem_context_create_ext_setparam p_engines = {
 		{
 			.name = I915_CONTEXT_CREATE_EXT_SETPARAM,
-			.next_extension = to_user_pointer(&p_ring)
+			.next_extension = 0,
 		},
 		{
 			.param = I915_CONTEXT_PARAM_ENGINES,
-- 
2.29.2

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

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [igt-dev] [PATCH i-g-t 4/8] tests/i915/gem_ctx_param: Drop the zeromap subtests
  2021-03-19 22:32 [igt-dev] [PATCH i-g-t 0/8] Adjust IGT for upstream API clean-ups Jason Ekstrand
                   ` (2 preceding siblings ...)
  2021-03-19 22:32 ` [igt-dev] [PATCH i-g-t 3/8] tests/i915/gem_exec_endless: Stop setting the ring size Jason Ekstrand
@ 2021-03-19 22:32 ` Jason Ekstrand
  2021-03-22 19:16   ` Daniel Vetter
  2021-03-19 22:32 ` [igt-dev] [PATCH i-g-t 5/8] tests/i915: Drop gem_ctx_clone Jason Ekstrand
                   ` (8 subsequent siblings)
  12 siblings, 1 reply; 44+ messages in thread
From: Jason Ekstrand @ 2021-03-19 22:32 UTC (permalink / raw)
  To: igt-dev

We're going to be deleting this param from i915 since it's never been
used by any actual userspace beyond this test.
---
 tests/i915/gem_ctx_param.c | 33 ---------------------------------
 1 file changed, 33 deletions(-)

diff --git a/tests/i915/gem_ctx_param.c b/tests/i915/gem_ctx_param.c
index ab0e3007..47fea06d 100644
--- a/tests/i915/gem_ctx_param.c
+++ b/tests/i915/gem_ctx_param.c
@@ -335,39 +335,6 @@ igt_main
 		gem_context_set_param(fd, &arg);
 	}
 
-	arg.param = I915_CONTEXT_PARAM_NO_ZEROMAP;
-
-	igt_describe("Validates context set param ioctl in non root mode with param "
-	       "set to no zeromap");
-	igt_subtest("non-root-set-no-zeromap") {
-		igt_fork(child, 1) {
-			igt_drop_root();
-
-			arg.ctx_id = ctx;
-			gem_context_get_param(fd, &arg);
-			arg.value--;
-			gem_context_set_param(fd, &arg);
-		}
-
-		igt_waitchildren();
-	}
-
-	igt_describe("Tests the context set param ioctl with no zeromap enabled in root mode");
-	igt_subtest("root-set-no-zeromap-enabled") {
-		arg.ctx_id = ctx;
-		gem_context_get_param(fd, &arg);
-		arg.value = 1;
-		gem_context_set_param(fd, &arg);
-	}
-
-	igt_describe("Tests the context set param ioctl with no zeromap disabled in root mode");
-	igt_subtest("root-set-no-zeromap-disabled") {
-		arg.ctx_id = ctx;
-		gem_context_get_param(fd, &arg);
-		arg.value = 0;
-		gem_context_set_param(fd, &arg);
-	}
-
 	igt_describe("Tests that multiple contexts can share the same VMA");
 	igt_subtest("vm")
 		test_vm(fd);
-- 
2.29.2

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

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [igt-dev] [PATCH i-g-t 5/8] tests/i915: Drop gem_ctx_clone
  2021-03-19 22:32 [igt-dev] [PATCH i-g-t 0/8] Adjust IGT for upstream API clean-ups Jason Ekstrand
                   ` (3 preceding siblings ...)
  2021-03-19 22:32 ` [igt-dev] [PATCH i-g-t 4/8] tests/i915/gem_ctx_param: Drop the zeromap subtests Jason Ekstrand
@ 2021-03-19 22:32 ` Jason Ekstrand
  2021-03-19 22:32 ` [igt-dev] [PATCH i-g-t 6/8] tests/i915/gem_ctx_create: Stop cloning engines Jason Ekstrand
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 44+ messages in thread
From: Jason Ekstrand @ 2021-03-19 22:32 UTC (permalink / raw)
  To: igt-dev

We're going to be deleting the CONTEXT_CLONE API since IGT is the only
userspace to ever use it.
---
 tests/Makefile.sources     |   3 -
 tests/i915/gem_ctx_clone.c | 450 -------------------------------------
 tests/meson.build          |   1 -
 3 files changed, 454 deletions(-)
 delete mode 100644 tests/i915/gem_ctx_clone.c

diff --git a/tests/Makefile.sources b/tests/Makefile.sources
index cfef5d34..282d54af 100644
--- a/tests/Makefile.sources
+++ b/tests/Makefile.sources
@@ -170,9 +170,6 @@ gem_cs_tlb_SOURCES = i915/gem_cs_tlb.c
 TESTS_progs += gem_ctx_bad_destroy
 gem_ctx_bad_destroy_SOURCES = i915/gem_ctx_bad_destroy.c
 
-TESTS_progs += gem_ctx_clone
-gem_ctx_clone_SOURCES = i915/gem_ctx_clone.c
-
 TESTS_progs += gem_ctx_create
 gem_ctx_create_SOURCES = i915/gem_ctx_create.c
 
diff --git a/tests/i915/gem_ctx_clone.c b/tests/i915/gem_ctx_clone.c
deleted file mode 100644
index b72269bc..00000000
--- a/tests/i915/gem_ctx_clone.c
+++ /dev/null
@@ -1,450 +0,0 @@
-/*
- * Copyright © 2019 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "i915/gem.h"
-#include "i915/gem_vm.h"
-#include "i915_drm.h"
-#include "igt.h"
-#include "igt_gt.h"
-
-static int ctx_create_ioctl(int i915, struct drm_i915_gem_context_create_ext *arg)
-{
-	int err;
-
-	err = 0;
-	if (igt_ioctl(i915, DRM_IOCTL_I915_GEM_CONTEXT_CREATE_EXT, arg)) {
-		err = -errno;
-		igt_assume(err);
-	}
-
-	errno = 0;
-	return err;
-}
-
-static void invalid_clone(int i915)
-{
-	struct drm_i915_gem_context_create_ext_clone ext = {
-		{ .name = I915_CONTEXT_CREATE_EXT_CLONE },
-	};
-	struct drm_i915_gem_context_create_ext create = {
-		.flags = I915_CONTEXT_CREATE_FLAGS_USE_EXTENSIONS,
-		.extensions = to_user_pointer(&ext),
-	};
-
-	igt_assert_eq(ctx_create_ioctl(i915, &create), 0);
-	gem_context_destroy(i915, create.ctx_id);
-
-	ext.flags = -1; /* Hopefully we won't run out of flags */
-	igt_assert_eq(ctx_create_ioctl(i915, &create), -EINVAL);
-	ext.flags = 0;
-
-	ext.base.next_extension = -1;
-	igt_assert_eq(ctx_create_ioctl(i915, &create), -EFAULT);
-	ext.base.next_extension = to_user_pointer(&ext);
-	igt_assert_eq(ctx_create_ioctl(i915, &create), -E2BIG);
-	ext.base.next_extension = 0;
-
-	ext.clone_id = -1;
-	igt_assert_eq(ctx_create_ioctl(i915, &create), -ENOENT);
-	ext.clone_id = 0;
-}
-
-static void clone_flags(int i915)
-{
-	struct drm_i915_gem_context_create_ext_setparam set = {
-		{ .name = I915_CONTEXT_CREATE_EXT_SETPARAM },
-		{ .param = I915_CONTEXT_PARAM_RECOVERABLE },
-	};
-	struct drm_i915_gem_context_create_ext_clone ext = {
-		{ .name = I915_CONTEXT_CREATE_EXT_CLONE },
-		.flags = I915_CONTEXT_CLONE_FLAGS,
-	};
-	struct drm_i915_gem_context_create_ext create = {
-		.flags = I915_CONTEXT_CREATE_FLAGS_USE_EXTENSIONS,
-		.extensions = to_user_pointer(&ext),
-	};
-	int expected;
-
-	set.param.value = 1; /* default is recoverable */
-	igt_require(__gem_context_set_param(i915, &set.param) == 0);
-
-	for (int pass = 0; pass < 2; pass++) { /* cloning default, then child */
-		igt_debug("Cloning %d\n", ext.clone_id);
-		igt_assert_eq(ctx_create_ioctl(i915, &create), 0);
-
-		set.param.ctx_id = ext.clone_id;
-		gem_context_get_param(i915, &set.param);
-		expected = set.param.value;
-
-		set.param.ctx_id = create.ctx_id;
-		gem_context_get_param(i915, &set.param);
-
-		igt_assert_eq_u64(set.param.param,
-				  I915_CONTEXT_PARAM_RECOVERABLE);
-		igt_assert_eq((int)set.param.value, expected);
-
-		gem_context_destroy(i915, create.ctx_id);
-
-		expected = set.param.value = 0;
-		set.param.ctx_id = ext.clone_id;
-		gem_context_set_param(i915, &set.param);
-
-		igt_assert_eq(ctx_create_ioctl(i915, &create), 0);
-
-		set.param.ctx_id = create.ctx_id;
-		gem_context_get_param(i915, &set.param);
-
-		igt_assert_eq_u64(set.param.param,
-				  I915_CONTEXT_PARAM_RECOVERABLE);
-		igt_assert_eq((int)set.param.value, expected);
-
-		gem_context_destroy(i915, create.ctx_id);
-
-		/* clone but then reset priority to default... */
-		set.param.ctx_id = 0;
-		set.param.value = 1;
-		ext.base.next_extension = to_user_pointer(&set);
-		igt_assert_eq(ctx_create_ioctl(i915, &create), 0);
-		ext.base.next_extension = 0;
-
-		/* then new context should have updated priority... */
-		set.param.ctx_id = create.ctx_id;
-		gem_context_get_param(i915, &set.param);
-		igt_assert_eq_u64(set.param.value, 1);
-
-		/* but original context should have default priority */
-		set.param.ctx_id = ext.clone_id;
-		gem_context_get_param(i915, &set.param);
-		igt_assert_eq_u64(set.param.value, 0);
-
-		gem_context_destroy(i915, create.ctx_id);
-		ext.clone_id = gem_context_create(i915);
-	}
-
-	gem_context_destroy(i915, ext.clone_id);
-}
-
-static void clone_engines(int i915)
-{
-	struct drm_i915_gem_context_create_ext_setparam set = {
-		{ .name = I915_CONTEXT_CREATE_EXT_SETPARAM },
-		{ .param = I915_CONTEXT_PARAM_ENGINES },
-	};
-	struct drm_i915_gem_context_create_ext_clone ext = {
-		{ .name = I915_CONTEXT_CREATE_EXT_CLONE },
-		.flags = I915_CONTEXT_CLONE_ENGINES,
-	};
-	struct drm_i915_gem_context_create_ext create = {
-		.flags = I915_CONTEXT_CREATE_FLAGS_USE_EXTENSIONS,
-		.extensions = to_user_pointer(&ext),
-	};
-	I915_DEFINE_CONTEXT_PARAM_ENGINES(expected, 64);
-	I915_DEFINE_CONTEXT_PARAM_ENGINES(engines, 64);
-	uint64_t ex_size;
-
-	memset(&expected, 0, sizeof(expected));
-	memset(&engines, 0, sizeof(engines));
-
-	igt_require(__gem_context_set_param(i915, &set.param) == 0);
-
-	for (int pass = 0; pass < 2; pass++) { /* cloning default, then child */
-		igt_debug("Cloning %d\n", ext.clone_id);
-		igt_assert_eq(ctx_create_ioctl(i915, &create), 0);
-
-		/* Check that we cloned the engine map */
-		set.param.ctx_id = ext.clone_id;
-		set.param.size = sizeof(expected);
-		set.param.value = to_user_pointer(&expected);
-		gem_context_get_param(i915, &set.param);
-		ex_size = set.param.size;
-
-		set.param.ctx_id = create.ctx_id;
-		set.param.size = sizeof(engines);
-		set.param.value = to_user_pointer(&engines);
-		gem_context_get_param(i915, &set.param);
-
-		igt_assert_eq_u64(set.param.param, I915_CONTEXT_PARAM_ENGINES);
-		igt_assert_eq_u64(set.param.size, ex_size);
-		igt_assert(!memcmp(&engines, &expected, ex_size));
-
-		gem_context_destroy(i915, create.ctx_id);
-
-		/* Check that the clone will replace an earlier set */
-		expected.engines[0].engine_class =
-			I915_ENGINE_CLASS_INVALID;
-		expected.engines[0].engine_instance =
-			I915_ENGINE_CLASS_INVALID_NONE;
-		ex_size = (sizeof(struct i915_context_param_engines) +
-			   sizeof(expected.engines[0]));
-
-		set.param.ctx_id = ext.clone_id;
-		set.param.size = ex_size;
-		set.param.value = to_user_pointer(&expected);
-		gem_context_set_param(i915, &set.param);
-
-		igt_assert_eq(ctx_create_ioctl(i915, &create), 0);
-
-		set.param.ctx_id = create.ctx_id;
-		set.param.size = sizeof(engines);
-		set.param.value = to_user_pointer(&engines);
-		gem_context_get_param(i915, &set.param);
-
-		igt_assert_eq_u64(set.param.size, ex_size);
-		igt_assert(!memcmp(&engines, &expected, ex_size));
-
-		gem_context_destroy(i915, create.ctx_id);
-
-		/* clone but then reset engines to default */
-		set.param.ctx_id = 0;
-		set.param.size = 0;
-		set.param.value = 0;
-		ext.base.next_extension = to_user_pointer(&set);
-
-		igt_assert_eq(ctx_create_ioctl(i915, &create), 0);
-		ext.base.next_extension = 0;
-
-		set.param.ctx_id = create.ctx_id;
-		set.param.size = sizeof(engines);
-		set.param.value = to_user_pointer(&engines);
-		gem_context_get_param(i915, &set.param);
-		igt_assert_eq_u64(set.param.size, 0);
-
-		gem_context_destroy(i915, create.ctx_id);
-
-		/* And check we ignore the flag */
-		ext.flags = 0;
-		igt_assert_eq(ctx_create_ioctl(i915, &create), 0);
-		ext.flags = I915_CONTEXT_CLONE_ENGINES;
-
-		set.param.ctx_id = create.ctx_id;
-		set.param.size = sizeof(engines);
-		set.param.value = to_user_pointer(&engines);
-		gem_context_get_param(i915, &set.param);
-		igt_assert_eq_u64(set.param.size, 0);
-
-		ext.clone_id = gem_context_create(i915);
-	}
-
-	gem_context_destroy(i915, ext.clone_id);
-}
-
-static void clone_scheduler(int i915)
-{
-	struct drm_i915_gem_context_create_ext_setparam set = {
-		{ .name = I915_CONTEXT_CREATE_EXT_SETPARAM },
-		{ .param = I915_CONTEXT_PARAM_PRIORITY },
-	};
-	struct drm_i915_gem_context_create_ext_clone ext = {
-		{ .name = I915_CONTEXT_CREATE_EXT_CLONE },
-		.flags = I915_CONTEXT_CLONE_SCHEDATTR,
-	};
-	struct drm_i915_gem_context_create_ext create = {
-		.flags = I915_CONTEXT_CREATE_FLAGS_USE_EXTENSIONS,
-		.extensions = to_user_pointer(&ext),
-	};
-	int expected;
-
-	igt_require(__gem_context_set_param(i915, &set.param) == 0);
-
-	for (int pass = 0; pass < 2; pass++) { /* cloning default, then child */
-		igt_debug("Cloning %d\n", ext.clone_id);
-		igt_assert_eq(ctx_create_ioctl(i915, &create), 0);
-
-		set.param.ctx_id = ext.clone_id;
-		gem_context_get_param(i915, &set.param);
-		expected = set.param.value;
-
-		set.param.ctx_id = create.ctx_id;
-		gem_context_get_param(i915, &set.param);
-
-		igt_assert_eq_u64(set.param.param, I915_CONTEXT_PARAM_PRIORITY);
-		igt_assert_eq((int)set.param.value, expected);
-
-		gem_context_destroy(i915, create.ctx_id);
-
-		expected = set.param.value = 1;
-		set.param.ctx_id = ext.clone_id;
-		gem_context_set_param(i915, &set.param);
-
-		igt_assert_eq(ctx_create_ioctl(i915, &create), 0);
-
-		set.param.ctx_id = create.ctx_id;
-		gem_context_get_param(i915, &set.param);
-
-		igt_assert_eq_u64(set.param.param, I915_CONTEXT_PARAM_PRIORITY);
-		igt_assert_eq((int)set.param.value, expected);
-
-		gem_context_destroy(i915, create.ctx_id);
-
-		/* clone but then reset priority to default */
-		set.param.ctx_id = 0;
-		set.param.value = 0;
-		ext.base.next_extension = to_user_pointer(&set);
-		igt_assert_eq(ctx_create_ioctl(i915, &create), 0);
-		ext.base.next_extension = 0;
-
-		set.param.ctx_id = create.ctx_id;
-		gem_context_get_param(i915, &set.param);
-		igt_assert_eq_u64(set.param.value, 0);
-
-		set.param.ctx_id = ext.clone_id;
-		gem_context_get_param(i915, &set.param);
-		igt_assert_eq_u64(set.param.value, 1);
-
-		gem_context_destroy(i915, create.ctx_id);
-		ext.clone_id = gem_context_create(i915);
-	}
-
-	gem_context_destroy(i915, ext.clone_id);
-}
-
-static uint32_t __batch_create(int i915, uint32_t offset)
-{
-	const uint32_t bbe = MI_BATCH_BUFFER_END;
-	uint32_t handle;
-
-	handle = gem_create(i915, ALIGN(offset + 4, 4096));
-	gem_write(i915, handle, offset, &bbe, sizeof(bbe));
-
-	return handle;
-}
-
-static uint32_t batch_create(int i915)
-{
-	return __batch_create(i915, 0);
-}
-
-static void check_same_vm(int i915, uint32_t ctx_a, uint32_t ctx_b)
-{
-	struct drm_i915_gem_exec_object2 batch = {
-		.handle = batch_create(i915),
-	};
-	struct drm_i915_gem_execbuffer2 eb = {
-		.buffers_ptr = to_user_pointer(&batch),
-		.buffer_count = 1,
-	};
-
-	/* First verify that we try to use "softpinning" by default */
-	batch.offset = 48 << 20;
-	eb.rsvd1 = ctx_a;
-	gem_execbuf(i915, &eb);
-	igt_assert_eq_u64(batch.offset, 48 << 20);
-
-	/* An already active VMA will try to keep its offset */
-	batch.offset = 0;
-	eb.rsvd1 = ctx_b;
-	gem_execbuf(i915, &eb);
-	igt_assert_eq_u64(batch.offset, 48 << 20);
-
-	gem_sync(i915, batch.handle);
-	gem_close(i915, batch.handle);
-
-	gem_quiescent_gpu(i915); /* evict the vma */
-}
-
-static void clone_vm(int i915)
-{
-	struct drm_i915_gem_context_param set = {
-		.param = I915_CONTEXT_PARAM_VM,
-	};
-	struct drm_i915_gem_context_create_ext_clone ext = {
-		{ .name = I915_CONTEXT_CREATE_EXT_CLONE },
-		.flags = I915_CONTEXT_CLONE_VM,
-	};
-	struct drm_i915_gem_context_create_ext create = {
-		.flags = I915_CONTEXT_CREATE_FLAGS_USE_EXTENSIONS,
-		.extensions = to_user_pointer(&ext),
-	};
-	uint32_t vm_id[2];
-
-	igt_require(__gem_context_set_param(i915, &set) == -ENOENT);
-
-	/* Scrub the VM for our tests */
-	i915 = gem_reopen_driver(i915);
-
-	set.ctx_id = gem_context_create(i915);
-	gem_context_get_param(i915, &set);
-	vm_id[0] = set.value;
-	gem_context_destroy(i915, set.ctx_id);
-
-	vm_id[1] = gem_vm_create(i915);
-
-	for (int pass = 0; pass < 2; pass++) { /* cloning default, then child */
-		igt_debug("Cloning %d\n", ext.clone_id);
-
-		igt_assert_eq(ctx_create_ioctl(i915, &create), 0);
-		check_same_vm(i915, ext.clone_id, create.ctx_id);
-		gem_context_destroy(i915, create.ctx_id);
-
-		set.value = vm_id[pass];
-		set.ctx_id = ext.clone_id;
-		gem_context_set_param(i915, &set);
-
-		igt_assert_eq(ctx_create_ioctl(i915, &create), 0);
-		check_same_vm(i915, ext.clone_id, create.ctx_id);
-		gem_context_destroy(i915, create.ctx_id);
-
-		ext.clone_id = gem_context_create(i915);
-	}
-
-	gem_context_destroy(i915, ext.clone_id);
-
-	for (int i = 0; i < ARRAY_SIZE(vm_id); i++)
-		gem_vm_destroy(i915, vm_id[i]);
-
-	close(i915);
-}
-
-igt_main
-{
-	int i915 = -1;
-
-	igt_fixture {
-		i915 = drm_open_driver(DRIVER_INTEL);
-		igt_require_gem(i915);
-		gem_require_contexts(i915);
-
-		igt_require(gem_has_context_clone(i915));
-		igt_fork_hang_detector(i915);
-	}
-
-	igt_subtest("invalid")
-		invalid_clone(i915);
-
-	igt_subtest("engines")
-		clone_engines(i915);
-
-	igt_subtest("flags")
-		clone_flags(i915);
-
-	igt_subtest("scheduler")
-		clone_scheduler(i915);
-
-	igt_subtest("vm")
-		clone_vm(i915);
-
-	igt_fixture {
-		igt_stop_hang_detector();
-		close(i915);
-	}
-}
diff --git a/tests/meson.build b/tests/meson.build
index 846a9ccf..cbbb5105 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -128,7 +128,6 @@ i915_progs = [
 	'gem_concurrent_blit',
 	'gem_cs_tlb',
 	'gem_ctx_bad_destroy',
-	'gem_ctx_clone',
 	'gem_ctx_create',
 	'gem_ctx_engines',
 	'gem_ctx_exec',
-- 
2.29.2

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

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [igt-dev] [PATCH i-g-t 6/8] tests/i915/gem_ctx_create: Stop cloning engines
  2021-03-19 22:32 [igt-dev] [PATCH i-g-t 0/8] Adjust IGT for upstream API clean-ups Jason Ekstrand
                   ` (4 preceding siblings ...)
  2021-03-19 22:32 ` [igt-dev] [PATCH i-g-t 5/8] tests/i915: Drop gem_ctx_clone Jason Ekstrand
@ 2021-03-19 22:32 ` Jason Ekstrand
  2021-03-19 22:32 ` [igt-dev] [PATCH i-g-t 7/8] tests/i915/gem_ctx_persistence: Drop the clone test Jason Ekstrand
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 44+ messages in thread
From: Jason Ekstrand @ 2021-03-19 22:32 UTC (permalink / raw)
  To: igt-dev

There's no reason to clone engines here, especially when context 0 is
just a default context so creating a new context will have the same
engines as context 0.
---
 tests/i915/gem_ctx_create.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/tests/i915/gem_ctx_create.c b/tests/i915/gem_ctx_create.c
index 9a512a03..7d2ee8fb 100644
--- a/tests/i915/gem_ctx_create.c
+++ b/tests/i915/gem_ctx_create.c
@@ -299,9 +299,7 @@ static void maximum(int fd, int ncpus, unsigned mode)
 
 		err = -ENOMEM;
 		if (avail_mem > (count + 1) * ctx_size)
-			err =  __gem_context_clone(fd, 0,
-						   I915_CONTEXT_CLONE_ENGINES,
-						   0, &ctx_id);
+			err =  __gem_context_create(fd, &ctx_id);
 		if (err) {
 			igt_info("Created %lu contexts, before failing with '%s' [%d]\n",
 				 count, strerror(-err), -err);
-- 
2.29.2

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

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [igt-dev] [PATCH i-g-t 7/8] tests/i915/gem_ctx_persistence: Drop the clone test
  2021-03-19 22:32 [igt-dev] [PATCH i-g-t 0/8] Adjust IGT for upstream API clean-ups Jason Ekstrand
                   ` (5 preceding siblings ...)
  2021-03-19 22:32 ` [igt-dev] [PATCH i-g-t 6/8] tests/i915/gem_ctx_create: Stop cloning engines Jason Ekstrand
@ 2021-03-19 22:32 ` Jason Ekstrand
  2021-03-22 19:17   ` Daniel Vetter
  2021-03-19 22:32 ` [igt-dev] [PATCH i-g-t 8/8] lib/i915/gem_context: Implement VM and engine cloning manually Jason Ekstrand
                   ` (5 subsequent siblings)
  12 siblings, 1 reply; 44+ messages in thread
From: Jason Ekstrand @ 2021-03-19 22:32 UTC (permalink / raw)
  To: igt-dev

We're going to be deleting the CONTEXT_CLONE API since IGT is the only
userspace to ever use it.  Drop the tests for it.
---
 tests/i915/gem_ctx_persistence.c | 30 ------------------------------
 1 file changed, 30 deletions(-)

diff --git a/tests/i915/gem_ctx_persistence.c b/tests/i915/gem_ctx_persistence.c
index 10d057f1..91c30176 100644
--- a/tests/i915/gem_ctx_persistence.c
+++ b/tests/i915/gem_ctx_persistence.c
@@ -147,33 +147,6 @@ static void test_idempotent(int i915)
 	igt_assert_eq(p.value, expected);
 }
 
-static void test_clone(int i915)
-{
-	struct drm_i915_gem_context_param p = {
-		.param = I915_CONTEXT_PARAM_PERSISTENCE,
-	};
-	uint32_t ctx, clone;
-
-	/*
-	 * Check that persistence is inherited across a clone.
-	 */
-	igt_require( __gem_context_create(i915, &ctx) == 0);
-
-	p.ctx_id = ctx;
-	p.value = 0;
-	gem_context_set_param(i915, &p);
-
-	clone = gem_context_clone(i915, ctx, I915_CONTEXT_CLONE_FLAGS, 0);
-	gem_context_destroy(i915, ctx);
-
-	p.ctx_id = clone;
-	p.value = -1;
-	gem_context_get_param(i915, &p);
-	igt_assert_eq(p.value, 0);
-
-	gem_context_destroy(i915, clone);
-}
-
 static void test_persistence(int i915, unsigned int engine)
 {
 	igt_spin_t *spin;
@@ -1366,9 +1339,6 @@ igt_main
 	igt_subtest("idempotent")
 		test_idempotent(i915);
 
-	igt_subtest("clone")
-		test_clone(i915);
-
 	igt_subtest("file")
 		test_nonpersistent_file(i915);
 
-- 
2.29.2

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

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [igt-dev] [PATCH i-g-t 8/8] lib/i915/gem_context: Implement VM and engine cloning manually
  2021-03-19 22:32 [igt-dev] [PATCH i-g-t 0/8] Adjust IGT for upstream API clean-ups Jason Ekstrand
                   ` (6 preceding siblings ...)
  2021-03-19 22:32 ` [igt-dev] [PATCH i-g-t 7/8] tests/i915/gem_ctx_persistence: Drop the clone test Jason Ekstrand
@ 2021-03-19 22:32 ` Jason Ekstrand
  2021-03-22 19:25   ` Daniel Vetter
  2021-03-19 23:17 ` [igt-dev] ✓ Fi.CI.BAT: success for Adjust IGT for upstream API clean-ups Patchwork
                   ` (4 subsequent siblings)
  12 siblings, 1 reply; 44+ messages in thread
From: Jason Ekstrand @ 2021-03-19 22:32 UTC (permalink / raw)
  To: igt-dev

We're going to be deleting the CONTEXT_CLONE API since IGT is the only
userspace to ever use it.  There are only two bits of this API that IGT
uses in interesting ways so implement them as create params instead of
cloning.
---
 lib/i915/gem_context.c         | 90 ++++++++++++++++++++++++++--------
 lib/i915/gem_context.h         |  7 ++-
 tests/i915/gem_ctx_shared.c    | 10 ++--
 tests/i915/gem_exec_balancer.c |  6 +--
 tests/i915/gem_exec_schedule.c |  8 +--
 5 files changed, 86 insertions(+), 35 deletions(-)

diff --git a/lib/i915/gem_context.c b/lib/i915/gem_context.c
index 79411e10..ed56d974 100644
--- a/lib/i915/gem_context.c
+++ b/lib/i915/gem_context.c
@@ -334,28 +334,77 @@ bool gem_context_has_persistence(int i915)
 	return __gem_context_get_param(i915, &param) == 0;
 }
 
+static void
+add_ctx_create_ext(struct drm_i915_gem_context_create_ext *ctx,
+		   struct i915_user_extension *ext)
+{
+	ext->next_extension = ctx->extensions;
+	ctx->extensions = to_user_pointer(ext);
+}
+
 int
 __gem_context_clone(int i915,
-		    uint32_t src, unsigned int share,
+		    uint32_t src, unsigned int clone,
 		    unsigned int flags,
 		    uint32_t *out)
 {
-	struct drm_i915_gem_context_create_ext_clone clone = {
-		{ .name = I915_CONTEXT_CREATE_EXT_CLONE },
-		.clone_id = src,
-		.flags = share,
-	};
-	struct drm_i915_gem_context_create_ext arg = {
+	I915_DEFINE_CONTEXT_PARAM_ENGINES(engines, I915_EXEC_RING_MASK + 1);
+	uint32_t vm;
+	struct drm_i915_gem_context_create_ext_setparam engines_param, vm_param;
+	int err;
+
+	struct drm_i915_gem_context_create_ext ctx_create = {
 		.flags = flags | I915_CONTEXT_CREATE_FLAGS_USE_EXTENSIONS,
-		.extensions = to_user_pointer(&clone),
+		.extensions = 0,
 	};
-	int err;
 
-	err = create_ext_ioctl(i915, &arg);
+	if (clone & GEM_CONTEXT_CLONE_ENGINES) {
+		engines_param = (struct drm_i915_gem_context_create_ext_setparam) {
+			.base = {
+				.name = I915_CONTEXT_CREATE_EXT_SETPARAM,
+			},
+			.param = {
+				.param = I915_CONTEXT_PARAM_ENGINES,
+				.size = sizeof(engines),
+				.value = to_user_pointer(&engines),
+			},
+		};
+
+		engines_param.param.ctx_id = src;
+		err = __gem_context_get_param(i915, &engines_param.param);
+		if (err)
+			return err;
+
+		engines_param.param.ctx_id = 0;
+		add_ctx_create_ext(&ctx_create, &engines_param.base);
+	}
+
+	if (clone & GEM_CONTEXT_CLONE_VM) {
+		vm_param = (struct drm_i915_gem_context_create_ext_setparam) {
+			.base = {
+				.name = I915_CONTEXT_CREATE_EXT_SETPARAM,
+			},
+			.param = {
+				.param = I915_CONTEXT_PARAM_VM,
+				.size = sizeof(vm),
+				.value = to_user_pointer(&vm),
+			},
+		};
+
+		vm_param.param.ctx_id = src;
+		err = __gem_context_get_param(i915, &vm_param.param);
+		if (err)
+			return err;
+
+		vm_param.param.ctx_id = 0;
+		add_ctx_create_ext(&ctx_create, &vm_param.base);
+	}
+
+	err = create_ext_ioctl(i915, &ctx_create);
 	if (err)
 		return err;
 
-	*out = arg.ctx_id;
+	*out = ctx_create.ctx_id;
 	return 0;
 }
 
@@ -373,23 +422,22 @@ static bool __gem_context_has(int i915, uint32_t share, unsigned int flags)
 
 bool gem_contexts_has_shared_gtt(int i915)
 {
-	return __gem_context_has(i915, I915_CONTEXT_CLONE_VM, 0);
+	return __gem_context_has(i915, GEM_CONTEXT_CLONE_VM, 0);
 }
 
 bool gem_has_queues(int i915)
 {
-	return __gem_context_has(i915,
-				 I915_CONTEXT_CLONE_VM,
+	return __gem_context_has(i915, GEM_CONTEXT_CLONE_VM,
 				 I915_CONTEXT_CREATE_FLAGS_SINGLE_TIMELINE);
 }
 
 uint32_t gem_context_clone(int i915,
-			   uint32_t src, unsigned int share,
+			   uint32_t src, unsigned int clone,
 			   unsigned int flags)
 {
 	uint32_t ctx;
 
-	igt_assert_eq(__gem_context_clone(i915, src, share, flags, &ctx), 0);
+	igt_assert_eq(__gem_context_clone(i915, src, clone, flags, &ctx), 0);
 
 	return ctx;
 }
@@ -426,15 +474,15 @@ uint32_t gem_context_clone_with_engines(int i915, uint32_t src)
 	if (!gem_has_context_clone(i915))
 		return gem_context_create(i915);
 	else
-		return gem_context_clone(i915, src, I915_CONTEXT_CLONE_ENGINES,
+		return gem_context_clone(i915, src, GEM_CONTEXT_CLONE_ENGINES,
 					 0);
 }
 
 uint32_t gem_queue_create(int i915)
 {
 	return gem_context_clone(i915, 0,
-				 I915_CONTEXT_CLONE_VM |
-				 I915_CONTEXT_CLONE_ENGINES,
+				 GEM_CONTEXT_CLONE_VM |
+				 GEM_CONTEXT_CLONE_ENGINES,
 				 I915_CONTEXT_CREATE_FLAGS_SINGLE_TIMELINE);
 }
 
@@ -448,8 +496,8 @@ uint32_t gem_queue_create(int i915)
 uint32_t gem_queue_clone_with_engines(int i915, uint32_t src)
 {
 	return gem_context_clone(i915, src,
-				 I915_CONTEXT_CLONE_ENGINES |
-				 I915_CONTEXT_CLONE_VM,
+				 GEM_CONTEXT_CLONE_ENGINES |
+				 GEM_CONTEXT_CLONE_VM,
 				 I915_CONTEXT_CREATE_FLAGS_SINGLE_TIMELINE);
 }
 
diff --git a/lib/i915/gem_context.h b/lib/i915/gem_context.h
index c2c2b827..e583ce09 100644
--- a/lib/i915/gem_context.h
+++ b/lib/i915/gem_context.h
@@ -37,12 +37,15 @@ int __gem_context_destroy(int fd, uint32_t ctx_id);
 uint32_t gem_context_create_for_engine(int fd, unsigned int class, unsigned int inst);
 uint32_t gem_context_create_for_class(int i915, unsigned int class, unsigned int *count);
 
+#define GEM_CONTEXT_CLONE_ENGINES (1 << 4)
+#define GEM_CONTEXT_CLONE_VM (1 << 5)
+
 int __gem_context_clone(int i915,
-			uint32_t src, unsigned int share,
+			uint32_t src, unsigned int clone,
 			unsigned int flags,
 			uint32_t *out);
 uint32_t gem_context_clone(int i915,
-			   uint32_t src, unsigned int share,
+			   uint32_t src, unsigned int clone,
 			   unsigned int flags);
 uint32_t gem_context_clone_with_engines(int i915, uint32_t src);
 void gem_context_copy_engines(int src_fd, uint32_t src,
diff --git a/tests/i915/gem_ctx_shared.c b/tests/i915/gem_ctx_shared.c
index 6b21994d..21b07083 100644
--- a/tests/i915/gem_ctx_shared.c
+++ b/tests/i915/gem_ctx_shared.c
@@ -82,7 +82,7 @@ static void create_shared_gtt(int i915, unsigned int flags)
 	igt_until_timeout(2) {
 		parent = flags & DETACHED ? child : 0;
 		child = gem_context_clone(i915,
-					  parent, I915_CONTEXT_CLONE_VM,
+					  parent, GEM_CONTEXT_CLONE_VM,
 					  0);
 		execbuf.rsvd1 = child;
 		gem_execbuf(i915, &execbuf);
@@ -98,7 +98,7 @@ static void create_shared_gtt(int i915, unsigned int flags)
 		execbuf.rsvd1 = parent;
 		igt_assert_eq(__gem_execbuf(i915, &execbuf), -ENOENT);
 		igt_assert_eq(__gem_context_clone(i915,
-						  parent, I915_CONTEXT_CLONE_VM,
+						  parent, GEM_CONTEXT_CLONE_VM,
 						  0, &parent), -ENOENT);
 	}
 	if (flags & DETACHED)
@@ -121,7 +121,7 @@ static void disjoint_timelines(int i915)
 	 * distinct timelines. A request queued to one context should be
 	 * independent of any shared contexts.
 	 */
-	child = gem_context_clone(i915, 0, I915_CONTEXT_CLONE_VM, 0);
+	child = gem_context_clone(i915, 0, GEM_CONTEXT_CLONE_VM, 0);
 	plug = igt_cork_plug(&cork, i915);
 
 	spin[0] = __igt_spin_new(i915, .ctx = 0, .dependency = plug);
@@ -161,7 +161,7 @@ static void exhaust_shared_gtt(int i915, unsigned int flags)
 		for (;;) {
 			parent = child;
 			err = __gem_context_clone(i915,
-						  parent, I915_CONTEXT_CLONE_VM,
+						  parent, GEM_CONTEXT_CLONE_VM,
 						  0, &child);
 			if (err)
 				break;
@@ -201,7 +201,7 @@ static void exec_shared_gtt(int i915, unsigned int ring)
 	int timeline;
 	int i;
 
-	clone = gem_context_clone(i915, 0, I915_CONTEXT_CLONE_VM, 0);
+	clone = gem_context_clone(i915, 0, GEM_CONTEXT_CLONE_VM, 0);
 
 	/* Find a hole big enough for both objects later */
 	scratch = gem_create(i915, 16384);
diff --git a/tests/i915/gem_exec_balancer.c b/tests/i915/gem_exec_balancer.c
index 9feb20fb..64ad259c 100644
--- a/tests/i915/gem_exec_balancer.c
+++ b/tests/i915/gem_exec_balancer.c
@@ -627,7 +627,7 @@ static void bonded(int i915, unsigned int flags)
 		}
 
 		ctx = gem_context_clone(i915,
-					master, I915_CONTEXT_CLONE_VM,
+					master, GEM_CONTEXT_CLONE_VM,
 					I915_CONTEXT_CREATE_FLAGS_SINGLE_TIMELINE);
 		set_load_balancer(i915, ctx, siblings, count, &bonds[limit - 1]);
 
@@ -827,7 +827,7 @@ static void bonded_slice(int i915)
 			igt_list_del(&spin->link);
 
 			ctx = gem_context_clone(i915, ctx,
-						I915_CONTEXT_CLONE_ENGINES, 0);
+						GEM_CONTEXT_CLONE_ENGINES, 0);
 
 			while (!READ_ONCE(*stop)) {
 				spin = igt_spin_new(i915,
@@ -2443,7 +2443,7 @@ static void nop(int i915)
 				.buffer_count = 1,
 				.flags = child + 1,
 				.rsvd1 = gem_context_clone(i915, ctx,
-							   I915_CONTEXT_CLONE_ENGINES, 0),
+							   GEM_CONTEXT_CLONE_ENGINES, 0),
 			};
 			struct timespec tv = {};
 			unsigned long nops;
diff --git a/tests/i915/gem_exec_schedule.c b/tests/i915/gem_exec_schedule.c
index 9585059d..aedcdf33 100644
--- a/tests/i915/gem_exec_schedule.c
+++ b/tests/i915/gem_exec_schedule.c
@@ -1183,8 +1183,8 @@ noreorder(int i915, unsigned int engine, int prio, unsigned int flags)
 		fence = igt_cork_plug(&cork, i915);
 
 	ctx = gem_context_clone(i915, execbuf.rsvd1,
-			      I915_CONTEXT_CLONE_ENGINES |
-			      I915_CONTEXT_CLONE_VM,
+			      GEM_CONTEXT_CLONE_ENGINES |
+			      GEM_CONTEXT_CLONE_VM,
 			      0);
 	spin = igt_spin_new(i915, ctx,
 			    .engine = engine,
@@ -2428,9 +2428,9 @@ static void *iova_thread(struct ufd_thread *t, int prio)
 	unsigned int clone;
 	uint32_t ctx;
 
-	clone = I915_CONTEXT_CLONE_ENGINES;
+	clone = GEM_CONTEXT_CLONE_ENGINES;
 	if (t->flags & SHARED)
-		clone |= I915_CONTEXT_CLONE_VM;
+		clone |= GEM_CONTEXT_CLONE_VM;
 
 	ctx = gem_context_clone(t->i915, 0, clone, 0);
 	gem_context_set_priority(t->i915, ctx, prio);
-- 
2.29.2

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

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [igt-dev] ✓ Fi.CI.BAT: success for Adjust IGT for upstream API clean-ups
  2021-03-19 22:32 [igt-dev] [PATCH i-g-t 0/8] Adjust IGT for upstream API clean-ups Jason Ekstrand
                   ` (7 preceding siblings ...)
  2021-03-19 22:32 ` [igt-dev] [PATCH i-g-t 8/8] lib/i915/gem_context: Implement VM and engine cloning manually Jason Ekstrand
@ 2021-03-19 23:17 ` Patchwork
  2021-03-20  0:22 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 44+ messages in thread
From: Patchwork @ 2021-03-19 23:17 UTC (permalink / raw)
  To: Jason Ekstrand; +Cc: igt-dev


[-- Attachment #1.1: Type: text/plain, Size: 4668 bytes --]

== Series Details ==

Series: Adjust IGT for upstream API clean-ups
URL   : https://patchwork.freedesktop.org/series/88194/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_9878 -> IGTPW_5630
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/index.html

Known issues
------------

  Here are the changes found in IGTPW_5630 that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@amdgpu/amd_basic@semaphore:
    - fi-bdw-5557u:       NOTRUN -> [SKIP][1] ([fdo#109271]) +26 similar issues
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/fi-bdw-5557u/igt@amdgpu/amd_basic@semaphore.html

  * igt@core_hotunplug@unbind-rebind:
    - fi-bdw-5557u:       NOTRUN -> [WARN][2] ([i915#2283])
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/fi-bdw-5557u/igt@core_hotunplug@unbind-rebind.html

  * igt@gem_exec_gttfill@basic:
    - fi-bsw-n3050:       NOTRUN -> [SKIP][3] ([fdo#109271])
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/fi-bsw-n3050/igt@gem_exec_gttfill@basic.html

  * igt@gem_exec_suspend@basic-s3:
    - fi-bsw-n3050:       NOTRUN -> [INCOMPLETE][4] ([i915#3159])
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/fi-bsw-n3050/igt@gem_exec_suspend@basic-s3.html

  * igt@gem_linear_blits@basic:
    - fi-kbl-8809g:       [PASS][5] -> [TIMEOUT][6] ([i915#2502] / [i915#3145])
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9878/fi-kbl-8809g/igt@gem_linear_blits@basic.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/fi-kbl-8809g/igt@gem_linear_blits@basic.html

  * igt@gem_tiled_fence_blits@basic:
    - fi-kbl-8809g:       [PASS][7] -> [TIMEOUT][8] ([i915#3145])
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9878/fi-kbl-8809g/igt@gem_tiled_fence_blits@basic.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/fi-kbl-8809g/igt@gem_tiled_fence_blits@basic.html

  * igt@kms_chamelium@dp-crc-fast:
    - fi-bdw-5557u:       NOTRUN -> [SKIP][9] ([fdo#109271] / [fdo#111827]) +8 similar issues
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/fi-bdw-5557u/igt@kms_chamelium@dp-crc-fast.html

  
#### Possible fixes ####

  * igt@gem_tiled_blits@basic:
    - fi-kbl-8809g:       [TIMEOUT][10] ([i915#2502] / [i915#3145]) -> [PASS][11]
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9878/fi-kbl-8809g/igt@gem_tiled_blits@basic.html
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/fi-kbl-8809g/igt@gem_tiled_blits@basic.html

  * igt@kms_chamelium@dp-crc-fast:
    - fi-kbl-7500u:       [FAIL][12] ([i915#1372]) -> [PASS][13]
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9878/fi-kbl-7500u/igt@kms_chamelium@dp-crc-fast.html
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/fi-kbl-7500u/igt@kms_chamelium@dp-crc-fast.html

  
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
  [i915#1372]: https://gitlab.freedesktop.org/drm/intel/issues/1372
  [i915#2283]: https://gitlab.freedesktop.org/drm/intel/issues/2283
  [i915#2502]: https://gitlab.freedesktop.org/drm/intel/issues/2502
  [i915#3145]: https://gitlab.freedesktop.org/drm/intel/issues/3145
  [i915#3159]: https://gitlab.freedesktop.org/drm/intel/issues/3159


Participating hosts (43 -> 39)
------------------------------

  Additional (1): fi-bsw-n3050 
  Missing    (5): fi-ilk-m540 fi-hsw-4200u fi-bsw-cyan fi-dg1-1 fi-bdw-samus 


Build changes
-------------

  * CI: CI-20190529 -> None
  * IGT: IGT_6039 -> IGTPW_5630

  CI-20190529: 20190529
  CI_DRM_9878: f5d18496a7876fd70b9d96d6a87b3c910f5e2ef0 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_5630: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/index.html
  IGT_6039: 8c4a2cda2a92bdd87797969ef299ad7f6e8e993b @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools



== Testlist changes ==

-igt@gem_ctx_clone@engines
-igt@gem_ctx_clone@flags
-igt@gem_ctx_clone@invalid
-igt@gem_ctx_clone@scheduler
-igt@gem_ctx_clone@vm
-igt@gem_ctx_param@non-root-set-no-zeromap
-igt@gem_ctx_param@root-set-no-zeromap-disabled
-igt@gem_ctx_param@root-set-no-zeromap-enabled
-igt@gem_ctx_persistence@clone
-igt@gem_ctx_ringsize@active
-igt@gem_ctx_ringsize@clone
-igt@gem_ctx_ringsize@create
-igt@gem_ctx_ringsize@idempotent
-igt@gem_ctx_ringsize@idle
-igt@gem_ctx_ringsize@invalid
-igt@gem_ctx_ringsize@plugged
-igt@gem_exec_balancer@ringsize

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/index.html

[-- Attachment #1.2: Type: text/html, Size: 5925 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

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

^ permalink raw reply	[flat|nested] 44+ messages in thread

* [igt-dev] ✗ Fi.CI.IGT: failure for Adjust IGT for upstream API clean-ups
  2021-03-19 22:32 [igt-dev] [PATCH i-g-t 0/8] Adjust IGT for upstream API clean-ups Jason Ekstrand
                   ` (8 preceding siblings ...)
  2021-03-19 23:17 ` [igt-dev] ✓ Fi.CI.BAT: success for Adjust IGT for upstream API clean-ups Patchwork
@ 2021-03-20  0:22 ` Patchwork
  2021-03-22 18:20 ` [igt-dev] [PATCH i-g-t 0/8] " Daniel Vetter
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 44+ messages in thread
From: Patchwork @ 2021-03-20  0:22 UTC (permalink / raw)
  To: Jason Ekstrand; +Cc: igt-dev


[-- Attachment #1.1: Type: text/plain, Size: 30255 bytes --]

== Series Details ==

Series: Adjust IGT for upstream API clean-ups
URL   : https://patchwork.freedesktop.org/series/88194/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_9878_full -> IGTPW_5630_full
====================================================

Summary
-------

  **FAILURE**

  Serious unknown changes coming with IGTPW_5630_full absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in IGTPW_5630_full, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/index.html

Possible new issues
-------------------

  Here are the unknown changes that may have been introduced in IGTPW_5630_full:

### IGT changes ###

#### Possible regressions ####

  * igt@gem_exec_balancer@bonded-slice:
    - shard-kbl:          [PASS][1] -> [FAIL][2] +3 similar issues
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9878/shard-kbl4/igt@gem_exec_balancer@bonded-slice.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-kbl1/igt@gem_exec_balancer@bonded-slice.html
    - shard-iclb:         [PASS][3] -> [FAIL][4]
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9878/shard-iclb1/igt@gem_exec_balancer@bonded-slice.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-iclb2/igt@gem_exec_balancer@bonded-slice.html

  * igt@gem_exec_balancer@nop:
    - shard-tglb:         [PASS][5] -> [FAIL][6] +2 similar issues
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9878/shard-tglb1/igt@gem_exec_balancer@nop.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-tglb8/igt@gem_exec_balancer@nop.html

  
#### Warnings ####

  * igt@kms_content_protection@uevent:
    - shard-kbl:          [FAIL][7] ([i915#2105]) -> [FAIL][8]
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9878/shard-kbl7/igt@kms_content_protection@uevent.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-kbl7/igt@kms_content_protection@uevent.html

  
Known issues
------------

  Here are the changes found in IGTPW_5630_full that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@feature_discovery@chamelium:
    - shard-tglb:         NOTRUN -> [SKIP][9] ([fdo#111827])
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-tglb3/igt@feature_discovery@chamelium.html

  * igt@gem_create@create-massive:
    - shard-kbl:          NOTRUN -> [DMESG-WARN][10] ([i915#3002])
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-kbl6/igt@gem_create@create-massive.html

  * igt@gem_ctx_isolation@preservation-s3@rcs0:
    - shard-apl:          NOTRUN -> [DMESG-WARN][11] ([i915#180])
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-apl2/igt@gem_ctx_isolation@preservation-s3@rcs0.html

  * igt@gem_ctx_persistence@process:
    - shard-snb:          NOTRUN -> [SKIP][12] ([fdo#109271] / [i915#1099]) +3 similar issues
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-snb2/igt@gem_ctx_persistence@process.html

  * igt@gem_ctx_shared@create-shared-gtt:
    - shard-snb:          [PASS][13] -> [SKIP][14] ([fdo#109271]) +1 similar issue
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9878/shard-snb5/igt@gem_ctx_shared@create-shared-gtt.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-snb5/igt@gem_ctx_shared@create-shared-gtt.html

  * igt@gem_eio@in-flight-suspend:
    - shard-kbl:          [PASS][15] -> [INCOMPLETE][16] ([i915#155])
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9878/shard-kbl6/igt@gem_eio@in-flight-suspend.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-kbl4/igt@gem_eio@in-flight-suspend.html

  * igt@gem_eio@unwedge-stress:
    - shard-tglb:         [PASS][17] -> [TIMEOUT][18] ([i915#2369] / [i915#3063])
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9878/shard-tglb8/igt@gem_eio@unwedge-stress.html
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-tglb8/igt@gem_eio@unwedge-stress.html

  * igt@gem_exec_fair@basic-none-share@rcs0:
    - shard-tglb:         [PASS][19] -> [FAIL][20] ([i915#2842]) +1 similar issue
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9878/shard-tglb7/igt@gem_exec_fair@basic-none-share@rcs0.html
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-tglb8/igt@gem_exec_fair@basic-none-share@rcs0.html

  * igt@gem_exec_fair@basic-pace@vecs0:
    - shard-glk:          [PASS][21] -> [FAIL][22] ([i915#2842]) +2 similar issues
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9878/shard-glk1/igt@gem_exec_fair@basic-pace@vecs0.html
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-glk7/igt@gem_exec_fair@basic-pace@vecs0.html

  * igt@gem_exec_fair@basic-throttle@rcs0:
    - shard-glk:          NOTRUN -> [FAIL][23] ([i915#2842])
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-glk6/igt@gem_exec_fair@basic-throttle@rcs0.html

  * igt@gem_exec_params@no-vebox:
    - shard-tglb:         NOTRUN -> [SKIP][24] ([fdo#109283])
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-tglb5/igt@gem_exec_params@no-vebox.html

  * igt@gem_exec_params@secure-non-root:
    - shard-tglb:         NOTRUN -> [SKIP][25] ([fdo#112283])
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-tglb7/igt@gem_exec_params@secure-non-root.html

  * igt@gem_exec_reloc@basic-many-active@rcs0:
    - shard-tglb:         NOTRUN -> [FAIL][26] ([i915#2389]) +4 similar issues
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-tglb3/igt@gem_exec_reloc@basic-many-active@rcs0.html
    - shard-iclb:         NOTRUN -> [FAIL][27] ([i915#2389]) +3 similar issues
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-iclb8/igt@gem_exec_reloc@basic-many-active@rcs0.html

  * igt@gem_exec_reloc@basic-parallel:
    - shard-apl:          NOTRUN -> [TIMEOUT][28] ([i915#3183])
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-apl7/igt@gem_exec_reloc@basic-parallel.html

  * igt@gem_exec_reloc@basic-wide-active@bcs0:
    - shard-apl:          NOTRUN -> [FAIL][29] ([i915#2389]) +3 similar issues
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-apl6/igt@gem_exec_reloc@basic-wide-active@bcs0.html

  * igt@gem_exec_reloc@basic-wide-active@rcs0:
    - shard-snb:          NOTRUN -> [FAIL][30] ([i915#2389]) +2 similar issues
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-snb7/igt@gem_exec_reloc@basic-wide-active@rcs0.html

  * igt@gem_exec_schedule@u-fairslice@bcs0:
    - shard-tglb:         [PASS][31] -> [DMESG-WARN][32] ([i915#2803])
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9878/shard-tglb7/igt@gem_exec_schedule@u-fairslice@bcs0.html
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-tglb2/igt@gem_exec_schedule@u-fairslice@bcs0.html

  * igt@gem_pwrite@basic-exhaustion:
    - shard-snb:          NOTRUN -> [WARN][33] ([i915#2658]) +1 similar issue
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-snb6/igt@gem_pwrite@basic-exhaustion.html
    - shard-glk:          NOTRUN -> [WARN][34] ([i915#2658])
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-glk7/igt@gem_pwrite@basic-exhaustion.html

  * igt@gem_userptr_blits@mmap-offset-invalidate-active@gtt:
    - shard-iclb:         NOTRUN -> [SKIP][35] ([i915#1317]) +3 similar issues
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-iclb1/igt@gem_userptr_blits@mmap-offset-invalidate-active@gtt.html

  * igt@gem_userptr_blits@mmap-offset-invalidate-active@wb:
    - shard-kbl:          NOTRUN -> [SKIP][36] ([fdo#109271]) +123 similar issues
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-kbl2/igt@gem_userptr_blits@mmap-offset-invalidate-active@wb.html

  * igt@gem_userptr_blits@mmap-offset-invalidate-active@wc:
    - shard-tglb:         NOTRUN -> [SKIP][37] ([i915#1317]) +3 similar issues
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-tglb1/igt@gem_userptr_blits@mmap-offset-invalidate-active@wc.html

  * igt@gem_userptr_blits@process-exit-mmap@gtt:
    - shard-kbl:          NOTRUN -> [SKIP][38] ([fdo#109271] / [i915#1699]) +3 similar issues
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-kbl2/igt@gem_userptr_blits@process-exit-mmap@gtt.html

  * igt@gen9_exec_parse@allowed-all:
    - shard-kbl:          [PASS][39] -> [DMESG-WARN][40] ([i915#1436] / [i915#716])
   [39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9878/shard-kbl1/igt@gen9_exec_parse@allowed-all.html
   [40]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-kbl2/igt@gen9_exec_parse@allowed-all.html

  * igt@gen9_exec_parse@batch-zero-length:
    - shard-iclb:         NOTRUN -> [SKIP][41] ([fdo#112306])
   [41]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-iclb6/igt@gen9_exec_parse@batch-zero-length.html
    - shard-tglb:         NOTRUN -> [SKIP][42] ([fdo#112306])
   [42]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-tglb8/igt@gen9_exec_parse@batch-zero-length.html

  * igt@i915_pm_lpsp@kms-lpsp@kms-lpsp-dp:
    - shard-kbl:          NOTRUN -> [SKIP][43] ([fdo#109271] / [i915#1937])
   [43]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-kbl3/igt@i915_pm_lpsp@kms-lpsp@kms-lpsp-dp.html

  * igt@i915_selftest@live@hangcheck:
    - shard-snb:          [PASS][44] -> [INCOMPLETE][45] ([i915#2782])
   [44]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9878/shard-snb6/igt@i915_selftest@live@hangcheck.html
   [45]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-snb2/igt@i915_selftest@live@hangcheck.html

  * igt@kms_big_fb@linear-16bpp-rotate-270:
    - shard-tglb:         NOTRUN -> [SKIP][46] ([fdo#111614])
   [46]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-tglb5/igt@kms_big_fb@linear-16bpp-rotate-270.html
    - shard-iclb:         NOTRUN -> [SKIP][47] ([fdo#110725] / [fdo#111614])
   [47]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-iclb4/igt@kms_big_fb@linear-16bpp-rotate-270.html

  * igt@kms_big_fb@linear-16bpp-rotate-90:
    - shard-apl:          NOTRUN -> [SKIP][48] ([fdo#109271]) +189 similar issues
   [48]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-apl1/igt@kms_big_fb@linear-16bpp-rotate-90.html

  * igt@kms_big_fb@yf-tiled-64bpp-rotate-270:
    - shard-tglb:         NOTRUN -> [SKIP][49] ([fdo#111615])
   [49]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-tglb5/igt@kms_big_fb@yf-tiled-64bpp-rotate-270.html
    - shard-iclb:         NOTRUN -> [SKIP][50] ([fdo#110723])
   [50]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-iclb4/igt@kms_big_fb@yf-tiled-64bpp-rotate-270.html

  * igt@kms_big_joiner@invalid-modeset:
    - shard-apl:          NOTRUN -> [SKIP][51] ([fdo#109271] / [i915#2705])
   [51]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-apl7/igt@kms_big_joiner@invalid-modeset.html

  * igt@kms_chamelium@dp-hpd-storm-disable:
    - shard-glk:          NOTRUN -> [SKIP][52] ([fdo#109271] / [fdo#111827]) +4 similar issues
   [52]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-glk6/igt@kms_chamelium@dp-hpd-storm-disable.html
    - shard-tglb:         NOTRUN -> [SKIP][53] ([fdo#109284] / [fdo#111827]) +3 similar issues
   [53]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-tglb3/igt@kms_chamelium@dp-hpd-storm-disable.html

  * igt@kms_chamelium@hdmi-edid-change-during-suspend:
    - shard-apl:          NOTRUN -> [SKIP][54] ([fdo#109271] / [fdo#111827]) +11 similar issues
   [54]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-apl2/igt@kms_chamelium@hdmi-edid-change-during-suspend.html

  * igt@kms_chamelium@vga-hpd-without-ddc:
    - shard-snb:          NOTRUN -> [SKIP][55] ([fdo#109271] / [fdo#111827]) +21 similar issues
   [55]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-snb6/igt@kms_chamelium@vga-hpd-without-ddc.html

  * igt@kms_color_chamelium@pipe-a-ctm-blue-to-red:
    - shard-kbl:          NOTRUN -> [SKIP][56] ([fdo#109271] / [fdo#111827]) +9 similar issues
   [56]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-kbl7/igt@kms_color_chamelium@pipe-a-ctm-blue-to-red.html
    - shard-iclb:         NOTRUN -> [SKIP][57] ([fdo#109284] / [fdo#111827]) +1 similar issue
   [57]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-iclb1/igt@kms_color_chamelium@pipe-a-ctm-blue-to-red.html

  * igt@kms_content_protection@atomic-dpms:
    - shard-apl:          NOTRUN -> [TIMEOUT][58] ([i915#1319]) +1 similar issue
   [58]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-apl8/igt@kms_content_protection@atomic-dpms.html

  * igt@kms_cursor_crc@pipe-b-cursor-512x170-sliding:
    - shard-iclb:         NOTRUN -> [SKIP][59] ([fdo#109278] / [fdo#109279])
   [59]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-iclb7/igt@kms_cursor_crc@pipe-b-cursor-512x170-sliding.html

  * igt@kms_cursor_crc@pipe-b-cursor-suspend:
    - shard-apl:          [PASS][60] -> [DMESG-WARN][61] ([i915#180]) +1 similar issue
   [60]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9878/shard-apl3/igt@kms_cursor_crc@pipe-b-cursor-suspend.html
   [61]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-apl3/igt@kms_cursor_crc@pipe-b-cursor-suspend.html

  * igt@kms_cursor_crc@pipe-d-cursor-256x256-random:
    - shard-glk:          NOTRUN -> [SKIP][62] ([fdo#109271]) +54 similar issues
   [62]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-glk6/igt@kms_cursor_crc@pipe-d-cursor-256x256-random.html
    - shard-iclb:         NOTRUN -> [SKIP][63] ([fdo#109278]) +3 similar issues
   [63]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-iclb6/igt@kms_cursor_crc@pipe-d-cursor-256x256-random.html

  * igt@kms_cursor_crc@pipe-d-cursor-512x512-rapid-movement:
    - shard-tglb:         NOTRUN -> [SKIP][64] ([fdo#109279]) +2 similar issues
   [64]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-tglb7/igt@kms_cursor_crc@pipe-d-cursor-512x512-rapid-movement.html

  * igt@kms_cursor_edge_walk@pipe-d-128x128-right-edge:
    - shard-snb:          NOTRUN -> [SKIP][65] ([fdo#109271]) +377 similar issues
   [65]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-snb6/igt@kms_cursor_edge_walk@pipe-d-128x128-right-edge.html

  * igt@kms_cursor_legacy@2x-long-flip-vs-cursor-legacy:
    - shard-iclb:         NOTRUN -> [SKIP][66] ([fdo#109274] / [fdo#109278]) +1 similar issue
   [66]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-iclb6/igt@kms_cursor_legacy@2x-long-flip-vs-cursor-legacy.html

  * igt@kms_cursor_legacy@flip-vs-cursor-busy-crc-legacy:
    - shard-apl:          NOTRUN -> [DMESG-FAIL][67] ([IGT#6])
   [67]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-apl8/igt@kms_cursor_legacy@flip-vs-cursor-busy-crc-legacy.html

  * igt@kms_flip@2x-single-buffer-flip-vs-dpms-off-vs-modeset-interruptible:
    - shard-iclb:         NOTRUN -> [SKIP][68] ([fdo#109274])
   [68]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-iclb7/igt@kms_flip@2x-single-buffer-flip-vs-dpms-off-vs-modeset-interruptible.html

  * igt@kms_flip@flip-vs-expired-vblank@a-edp1:
    - shard-tglb:         NOTRUN -> [FAIL][69] ([i915#2598])
   [69]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-tglb3/igt@kms_flip@flip-vs-expired-vblank@a-edp1.html

  * igt@kms_flip@flip-vs-suspend-interruptible@a-dp1:
    - shard-kbl:          NOTRUN -> [DMESG-WARN][70] ([i915#180]) +3 similar issues
   [70]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-kbl2/igt@kms_flip@flip-vs-suspend-interruptible@a-dp1.html

  * igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-32bpp-ytileccs:
    - shard-glk:          NOTRUN -> [FAIL][71] ([i915#2628])
   [71]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-glk1/igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-32bpp-ytileccs.html

  * igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-32bpp-ytilegen12rcccs:
    - shard-kbl:          NOTRUN -> [SKIP][72] ([fdo#109271] / [i915#2672])
   [72]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-kbl6/igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-32bpp-ytilegen12rcccs.html
    - shard-glk:          NOTRUN -> [SKIP][73] ([fdo#109271] / [i915#2672])
   [73]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-glk2/igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-32bpp-ytilegen12rcccs.html
    - shard-iclb:         NOTRUN -> [SKIP][74] ([i915#2587])
   [74]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-iclb3/igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-32bpp-ytilegen12rcccs.html

  * igt@kms_frontbuffer_tracking@fbc-suspend:
    - shard-kbl:          [PASS][75] -> [DMESG-WARN][76] ([i915#180]) +3 similar issues
   [75]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9878/shard-kbl6/igt@kms_frontbuffer_tracking@fbc-suspend.html
   [76]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-kbl1/igt@kms_frontbuffer_tracking@fbc-suspend.html

  * igt@kms_frontbuffer_tracking@fbcpsr-2p-scndscrn-indfb-plflip-blt:
    - shard-tglb:         NOTRUN -> [SKIP][77] ([fdo#111825]) +13 similar issues
   [77]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-tglb3/igt@kms_frontbuffer_tracking@fbcpsr-2p-scndscrn-indfb-plflip-blt.html

  * igt@kms_frontbuffer_tracking@psr-2p-scndscrn-cur-indfb-draw-mmap-wc:
    - shard-iclb:         NOTRUN -> [SKIP][78] ([fdo#109280]) +5 similar issues
   [78]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-iclb1/igt@kms_frontbuffer_tracking@psr-2p-scndscrn-cur-indfb-draw-mmap-wc.html

  * igt@kms_invalid_dotclock:
    - shard-tglb:         NOTRUN -> [SKIP][79] ([fdo#110577])
   [79]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-tglb1/igt@kms_invalid_dotclock.html

  * igt@kms_pipe_crc_basic@nonblocking-crc-pipe-d-frame-sequence:
    - shard-apl:          NOTRUN -> [SKIP][80] ([fdo#109271] / [i915#533])
   [80]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-apl1/igt@kms_pipe_crc_basic@nonblocking-crc-pipe-d-frame-sequence.html

  * igt@kms_pipe_crc_basic@read-crc-pipe-d:
    - shard-kbl:          NOTRUN -> [SKIP][81] ([fdo#109271] / [i915#533]) +2 similar issues
   [81]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-kbl4/igt@kms_pipe_crc_basic@read-crc-pipe-d.html

  * igt@kms_plane@plane-position-hole-pipe-a-planes:
    - shard-glk:          [PASS][82] -> [FAIL][83] ([i915#2472])
   [82]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9878/shard-glk4/igt@kms_plane@plane-position-hole-pipe-a-planes.html
   [83]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-glk7/igt@kms_plane@plane-position-hole-pipe-a-planes.html
    - shard-apl:          [PASS][84] -> [FAIL][85] ([i915#2472])
   [84]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9878/shard-apl8/igt@kms_plane@plane-position-hole-pipe-a-planes.html
   [85]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-apl3/igt@kms_plane@plane-position-hole-pipe-a-planes.html
    - shard-kbl:          [PASS][86] -> [FAIL][87] ([i915#2472])
   [86]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9878/shard-kbl4/igt@kms_plane@plane-position-hole-pipe-a-planes.html
   [87]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-kbl7/igt@kms_plane@plane-position-hole-pipe-a-planes.html

  * igt@kms_plane_alpha_blend@pipe-a-alpha-opaque-fb:
    - shard-apl:          NOTRUN -> [FAIL][88] ([fdo#108145] / [i915#265]) +3 similar issues
   [88]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-apl7/igt@kms_plane_alpha_blend@pipe-a-alpha-opaque-fb.html
    - shard-glk:          NOTRUN -> [FAIL][89] ([fdo#108145] / [i915#265])
   [89]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-glk9/igt@kms_plane_alpha_blend@pipe-a-alpha-opaque-fb.html
    - shard-kbl:          NOTRUN -> [FAIL][90] ([fdo#108145] / [i915#265])
   [90]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-kbl1/igt@kms_plane_alpha_blend@pipe-a-alpha-opaque-fb.html

  * igt@kms_plane_alpha_blend@pipe-a-alpha-transparent-fb:
    - shard-apl:          NOTRUN -> [FAIL][91] ([i915#265])
   [91]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-apl6/igt@kms_plane_alpha_blend@pipe-a-alpha-transparent-fb.html

  * igt@kms_plane_lowres@pipe-d-tiling-yf:
    - shard-tglb:         NOTRUN -> [SKIP][92] ([fdo#112054])
   [92]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-tglb7/igt@kms_plane_lowres@pipe-d-tiling-yf.html

  * igt@kms_psr2_sf@overlay-plane-update-sf-dmg-area-3:
    - shard-glk:          NOTRUN -> [SKIP][93] ([fdo#109271] / [i915#658])
   [93]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-glk3/igt@kms_psr2_sf@overlay-plane-update-sf-dmg-area-3.html

  * igt@kms_psr2_sf@overlay-plane-update-sf-dmg-area-4:
    - shard-kbl:          NOTRUN -> [SKIP][94] ([fdo#109271] / [i915#658])
   [94]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-kbl7/igt@kms_psr2_sf@overlay-plane-update-sf-dmg-area-4.html

  * igt@kms_psr2_sf@overlay-primary-update-sf-dmg-area-4:
    - shard-apl:          NOTRUN -> [SKIP][95] ([fdo#109271] / [i915#658]) +2 similar issues
   [95]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-apl3/igt@kms_psr2_sf@overlay-primary-update-sf-dmg-area-4.html

  * igt@kms_psr@psr2_cursor_mmap_cpu:
    - shard-iclb:         NOTRUN -> [SKIP][96] ([fdo#109441])
   [96]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-iclb3/igt@kms_psr@psr2_cursor_mmap_cpu.html

  * igt@kms_psr@psr2_primary_mmap_gtt:
    - shard-iclb:         [PASS][97] -> [SKIP][98] ([fdo#109441])
   [97]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9878/shard-iclb2/igt@kms_psr@psr2_primary_mmap_gtt.html
   [98]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-iclb5/igt@kms_psr@psr2_primary_mmap_gtt.html

  * igt@kms_writeback@writeback-check-output:
    - shard-kbl:          NOTRUN -> [SKIP][99] ([fdo#109271] / [i915#2437])
   [99]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-kbl3/igt@kms_writeback@writeback-check-output.html

  * igt@kms_writeback@writeback-fb-id:
    - shard-apl:          NOTRUN -> [SKIP][100] ([fdo#109271] / [i915#2437])
   [100]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-apl6/igt@kms_writeback@writeback-fb-id.html

  * igt@kms_writeback@writeback-pixel-formats:
    - shard-glk:          NOTRUN -> [SKIP][101] ([fdo#109271] / [i915#2437])
   [101]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-glk2/igt@kms_writeback@writeback-pixel-formats.html

  * igt@nouveau_crc@pipe-c-ctx-flip-detection:
    - shard-tglb:         NOTRUN -> [SKIP][102] ([i915#2530]) +1 similar issue
   [102]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-tglb7/igt@nouveau_crc@pipe-c-ctx-flip-detection.html

  * igt@nouveau_crc@pipe-c-source-rg:
    - shard-iclb:         NOTRUN -> [SKIP][103] ([i915#2530])
   [103]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-iclb4/igt@nouveau_crc@pipe-c-source-rg.html

  * igt@prime_nv_test@i915_import_pread_pwrite:
    - shard-tglb:         NOTRUN -> [SKIP][104] ([fdo#109291])
   [104]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-tglb8/igt@prime_nv_test@i915_import_pread_pwrite.html

  * igt@sysfs_clients@sema-10@vcs0:
    - shard-apl:          NOTRUN -> [SKIP][105] ([fdo#109271] / [i915#3026]) +2 similar issues
   [105]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-apl1/igt@sysfs_clients@sema-10@vcs0.html

  
#### Possible fixes ####

  * igt@gem_eio@unwedge-stress:
    - shard-iclb:         [TIMEOUT][106] ([i915#2369] / [i915#2481] / [i915#3070]) -> [PASS][107]
   [106]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9878/shard-iclb6/igt@gem_eio@unwedge-stress.html
   [107]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-iclb5/igt@gem_eio@unwedge-stress.html

  * igt@gem_exec_capture@capture@vcs1:
    - shard-kbl:          [FAIL][108] ([i915#3062]) -> [PASS][109]
   [108]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9878/shard-kbl2/igt@gem_exec_capture@capture@vcs1.html
   [109]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-kbl6/igt@gem_exec_capture@capture@vcs1.html

  * igt@gem_exec_fair@basic-none@vecs0:
    - shard-glk:          [FAIL][110] ([i915#2842]) -> [PASS][111]
   [110]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9878/shard-glk1/igt@gem_exec_fair@basic-none@vecs0.html
   [111]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-glk7/igt@gem_exec_fair@basic-none@vecs0.html

  * igt@gem_exec_whisper@basic-queues-priority:
    - shard-glk:          [DMESG-WARN][112] ([i915#118] / [i915#95]) -> [PASS][113]
   [112]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9878/shard-glk8/igt@gem_exec_whisper@basic-queues-priority.html
   [113]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-glk2/igt@gem_exec_whisper@basic-queues-priority.html

  * igt@kms_cursor_crc@pipe-a-cursor-64x21-random:
    - shard-kbl:          [FAIL][114] ([i915#54]) -> [PASS][115]
   [114]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9878/shard-kbl6/igt@kms_cursor_crc@pipe-a-cursor-64x21-random.html
   [115]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-kbl6/igt@kms_cursor_crc@pipe-a-cursor-64x21-random.html
    - shard-apl:          [FAIL][116] ([i915#54]) -> [PASS][117]
   [116]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9878/shard-apl2/igt@kms_cursor_crc@pipe-a-cursor-64x21-random.html
   [117]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-apl3/igt@kms_cursor_crc@pipe-a-cursor-64x21-random.html
    - shard-glk:          [FAIL][118] ([i915#54]) -> [PASS][119]
   [118]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9878/shard-glk7/igt@kms_cursor_crc@pipe-a-cursor-64x21-random.html
   [119]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-glk6/igt@kms_cursor_crc@pipe-a-cursor-64x21-random.html

  * igt@kms_flip@2x-flip-vs-expired-vblank@ab-hdmi-a1-hdmi-a2:
    - shard-glk:          [FAIL][120] ([i915#79]) -> [PASS][121]
   [120]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9878/shard-glk6/igt@kms_flip@2x-flip-vs-expired-vblank@ab-hdmi-a1-hdmi-a2.html
   [121]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-glk3/igt@kms_flip@2x-flip-vs-expired-vblank@ab-hdmi-a1-hdmi-a2.html

  * igt@kms_flip@flip-vs-suspend-interruptible@a-dp1:
    - shard-apl:          [DMESG-WARN][122] ([i915#180] / [i915#1982]) -> [PASS][123]
   [122]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9878/shard-apl2/igt@kms_flip@flip-vs-suspend-interruptible@a-dp1.html
   [123]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-apl8/igt@kms_flip@flip-vs-suspend-interruptible@a-dp1.html

  * igt@kms_flip@flip-vs-suspend-interruptible@a-edp1:
    - shard-tglb:         [DMESG-WARN][124] ([i915#1436] / [i915#1602] / [i915#1887] / [i915#2411]) -> [PASS][125]
   [124]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9878/shard-tglb3/igt@kms_flip@flip-vs-suspend-interruptible@a-edp1.html
   [125]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-tglb3/igt@kms_flip@flip-vs-suspend-interruptible@a-edp1.html

  * igt@kms_flip@flip-vs-suspend-interruptible@b-dp1:
    - shard-apl:          [DMESG-WARN][126] ([i915#180]) -> [PASS][127]
   [126]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9878/shard-apl2/igt@kms_flip@flip-vs-suspend-interruptible@b-dp1.html
   [127]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-apl8/igt@kms_flip@flip-vs-suspend-interruptible@b-dp1.html

  * igt@kms_flip@flip-vs-suspend@a-dp1:
    - shard-kbl:          [DMESG-WARN][128] ([i915#180]) -> [PASS][129] +4 similar issues
   [128]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9878/shard-kbl3/igt@kms_flip@flip-vs-suspend@a-dp1.html
   [129]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-kbl7/igt@kms_flip@flip-vs-suspend@a-dp1.html

  * igt@kms_psr@psr2_cursor_blt:
    - shard-iclb:         [SKIP][130] ([fdo#109441]) -> [PASS][131] +3 similar issues
   [130]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9878/shard-iclb8/igt@kms_psr@psr2_cursor_blt.html
   [131]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-iclb2/igt@kms_psr@psr2_cursor_blt.html

  
#### Warnings ####

  * igt@i915_pm_rc6_residency@rc6-fence:
    - shard-iclb:         [WARN][132] ([i915#2684]) -> [WARN][133] ([i915#1804] / [i915#2684])
   [132]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9878/shard-iclb5/igt@i915_pm_rc6_residency@rc6-fence.html
   [133]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-iclb4/igt@i915_pm_rc6_residency@rc6-fence.html

  * igt@kms_content_protection@dp-mst-type-1:
    - shard-iclb:         [FAIL][134] ([i915#3144]) -> [SKIP][135] ([i915#3116])
   [134]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9878/shard-iclb1/igt@kms_content_protection@dp-mst-type-1.html
   [135]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-iclb6/igt@kms_content_protection@dp-mst-type-1.html

  * igt@kms_psr2_sf@overlay-plane-update-sf-dmg-area-1:
    - shard-iclb:         [SKIP][136] ([i915#658]) -> [SKIP][137] ([i915#2920]) +2 similar issues
   [136]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9878/shard-iclb5/igt@kms_psr2_sf@overlay-plane-update-sf-dmg-area-1.html
   [137]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/shard-iclb2/igt@kms_psr2_sf@overlay-plane-update-sf-dmg-area-1.html

  * igt@runner@aborted:
    - shard-kbl:          ([FAIL][138], [FAIL][139], [FAIL][140], [FAIL][141], [FAIL][142], [FAIL][143], [FAIL][144], [FAIL][145], [FAIL][146], [FAIL][147], [FAIL][148]) ([i915#1436] / [i915#180] / [i915#1814] / [i915#2724] / [i915#3002] / [i915#602]) -> ([FAIL][149], [FAIL][150], [FAIL][151], [FAIL][152], [FAIL][153], [FAIL][154], [FAIL][155], [FAIL][156], [FAIL][157], [FAIL][158]) ([fdo#109271] / [i915#1436] / [i915#180] / [i915#1814] / [i915#2292] / [i915#2505] / [i915#3002] / [i915#716])
   [138]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9878/shard-kbl4/igt@runner@aborted.

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5630/index.html

[-- Attachment #1.2: Type: text/html, Size: 33610 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

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

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: [igt-dev] [PATCH i-g-t 0/8] Adjust IGT for upstream API clean-ups
  2021-03-19 22:32 [igt-dev] [PATCH i-g-t 0/8] Adjust IGT for upstream API clean-ups Jason Ekstrand
                   ` (9 preceding siblings ...)
  2021-03-20  0:22 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
@ 2021-03-22 18:20 ` Daniel Vetter
  2021-03-22 20:41 ` [igt-dev] [PATCH i-g-t 0/9] Adjust IGT for upstream API clean-ups (v2) Jason Ekstrand
  2021-03-22 22:05 ` [igt-dev] ✗ Fi.CI.BUILD: failure for Adjust IGT for upstream API clean-ups (rev2) Patchwork
  12 siblings, 0 replies; 44+ messages in thread
From: Daniel Vetter @ 2021-03-22 18:20 UTC (permalink / raw)
  To: Jason Ekstrand; +Cc: igt-dev

On Fri, Mar 19, 2021 at 05:32:25PM -0500, Jason Ekstrand wrote:
> I'm trying to remove some unused APIs from upstream i915.  This i-g-t
> series updates tests in accordance with those removals.  For a few things,
> it simply deletes tests which test explicitly for that feature.  For
> cloning, we do actually use that for a bunch of stuff today so I just
> implement the two clones we care about (engines and VMs) directly with
> getparam and a create setparam.
> 
> Jason Ekstrand (8):
>   tests/i915: Drop gem_ctx_ringsize
>   tests/i915/gem_exec_balancer: Drop the ringsize subtest
>   tests/i915/gem_exec_endless: Stop setting the ring size
>   tests/i915/gem_ctx_param: Drop the zeromap subtests
>   tests/i915: Drop gem_ctx_clone
>   tests/i915/gem_ctx_create: Stop cloning engines
>   tests/i915/gem_ctx_persistence: Drop the clone test
>   lib/i915/gem_context: Implement VM and engine cloning manually

igt also uses sob/developer certificate, so need to add those. I wanted to
otherwise review this today but just didn't get around to it :-/

Hopefully tomorrow.
-Daniel

> 
>  lib/i915/gem_context.c           |  90 +++++--
>  lib/i915/gem_context.h           |   7 +-
>  tests/Makefile.sources           |   6 -
>  tests/i915/gem_ctx_clone.c       | 450 -------------------------------
>  tests/i915/gem_ctx_create.c      |   4 +-
>  tests/i915/gem_ctx_param.c       |  33 ---
>  tests/i915/gem_ctx_persistence.c |  30 ---
>  tests/i915/gem_ctx_ringsize.c    | 345 ------------------------
>  tests/i915/gem_ctx_shared.c      |  10 +-
>  tests/i915/gem_exec_balancer.c   |  60 +----
>  tests/i915/gem_exec_endless.c    |  12 +-
>  tests/i915/gem_exec_schedule.c   |   8 +-
>  tests/meson.build                |   2 -
>  13 files changed, 88 insertions(+), 969 deletions(-)
>  delete mode 100644 tests/i915/gem_ctx_clone.c
>  delete mode 100644 tests/i915/gem_ctx_ringsize.c
> 
> -- 
> 2.29.2
> 
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: [igt-dev] [PATCH i-g-t 1/8] tests/i915: Drop gem_ctx_ringsize
  2021-03-19 22:32 ` [igt-dev] [PATCH i-g-t 1/8] tests/i915: Drop gem_ctx_ringsize Jason Ekstrand
@ 2021-03-22 19:11   ` Daniel Vetter
  2021-03-22 19:15     ` Daniel Vetter
  0 siblings, 1 reply; 44+ messages in thread
From: Daniel Vetter @ 2021-03-22 19:11 UTC (permalink / raw)
  To: Jason Ekstrand; +Cc: igt-dev

On Fri, Mar 19, 2021 at 05:32:26PM -0500, Jason Ekstrand wrote:
> I915_CONTEXT_PARAM_RINGSIZE is being removed from upstream i915 because
> it's never been used by any userspace other than IGT.
> ---
>  tests/Makefile.sources        |   3 -
>  tests/i915/gem_ctx_ringsize.c | 345 ----------------------------------
>  tests/meson.build             |   1 -

Your forgot Makefile.sources. Yes we still have some autotools left for
test building. With that fixed and the sob line fixed.

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>

>  3 files changed, 349 deletions(-)
>  delete mode 100644 tests/i915/gem_ctx_ringsize.c
> 
> diff --git a/tests/Makefile.sources b/tests/Makefile.sources
> index ec52ee3b..cfef5d34 100644
> --- a/tests/Makefile.sources
> +++ b/tests/Makefile.sources
> @@ -194,9 +194,6 @@ gem_ctx_param_SOURCES = i915/gem_ctx_param.c
>  TESTS_progs += gem_ctx_persistence
>  gem_ctx_persistence_SOURCES = i915/gem_ctx_persistence.c
>  
> -TESTS_progs += gem_ctx_ringsize
> -gem_ctx_ringsize_SOURCES = i915/gem_ctx_ringsize.c
> -
>  TESTS_progs += gem_ctx_shared
>  gem_ctx_shared_SOURCES = i915/gem_ctx_shared.c
>  
> diff --git a/tests/i915/gem_ctx_ringsize.c b/tests/i915/gem_ctx_ringsize.c
> deleted file mode 100644
> index 60187b7c..00000000
> --- a/tests/i915/gem_ctx_ringsize.c
> +++ /dev/null
> @@ -1,345 +0,0 @@
> -/*
> - * Copyright © 2019 Intel Corporation
> - *
> - * Permission is hereby granted, free of charge, to any person obtaining a
> - * copy of this software and associated documentation files (the "Software"),
> - * to deal in the Software without restriction, including without limitation
> - * the rights to use, copy, modify, merge, publish, distribute, sublicense,
> - * and/or sell copies of the Software, and to permit persons to whom the
> - * Software is furnished to do so, subject to the following conditions:
> - *
> - * The above copyright notice and this permission notice (including the next
> - * paragraph) shall be included in all copies or substantial portions of the
> - * Software.
> - *
> - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
> - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
> - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
> - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
> - * IN THE SOFTWARE.
> - */
> -
> -#include <errno.h>
> -#include <fcntl.h>
> -#include <inttypes.h>
> -#include <math.h>
> -#include <signal.h>
> -#include <sys/ioctl.h>
> -#include <sys/types.h>
> -#include <unistd.h>
> -
> -#include "drmtest.h"
> -#include "i915/gem.h"
> -#include "i915/gem_context.h"
> -#include "i915/gem_engine_topology.h"
> -#include "ioctl_wrappers.h" /* gem_wait()! */
> -#include "sw_sync.h"
> -
> -static bool has_ringsize(int i915)
> -{
> -	struct drm_i915_gem_context_param p = {
> -		.param = I915_CONTEXT_PARAM_RINGSIZE,
> -	};
> -
> -	return __gem_context_get_param(i915, &p) == 0;
> -}
> -
> -static void test_idempotent(int i915)
> -{
> -	struct drm_i915_gem_context_param p = {
> -		.param = I915_CONTEXT_PARAM_RINGSIZE,
> -	};
> -	uint32_t saved;
> -
> -	/*
> -	 * Simple test to verify that we are able to read back the same
> -	 * value as we set.
> -	 */
> -
> -	gem_context_get_param(i915, &p);
> -	saved = p.value;
> -
> -	for (uint32_t x = 1 << 12; x <= 128 << 12; x <<= 1) {
> -		p.value = x;
> -		gem_context_set_param(i915, &p);
> -		gem_context_get_param(i915, &p);
> -		igt_assert_eq_u32(p.value, x);
> -	}
> -
> -	p.value = saved;
> -	gem_context_set_param(i915, &p);
> -}
> -
> -static void test_invalid(int i915)
> -{
> -	struct drm_i915_gem_context_param p = {
> -		.param = I915_CONTEXT_PARAM_RINGSIZE,
> -	};
> -	uint64_t invalid[] = {
> -		0, 1, 4095, 4097, 8191, 8193,
> -		/* upper limit may be HW dependent, atm it is 512KiB */
> -		(512 << 10) - 1, (512 << 10) + 1,
> -		-1, -1u
> -	};
> -	uint32_t saved;
> -
> -	/*
> -	 * The HW only accepts certain aligned values and so we reject
> -	 * any invalid sizes specified by the user.
> -	 *
> -	 * Currently, the HW only accepts 4KiB - 512KiB in 4K increments,
> -	 * and is unlikely to ever accept smaller.
> -	 */
> -
> -	gem_context_get_param(i915, &p);
> -	saved = p.value;
> -
> -	for (int i = 0; i < ARRAY_SIZE(invalid); i++) {
> -		p.value = invalid[i];
> -		igt_assert_eq(__gem_context_set_param(i915, &p), -EINVAL);
> -		gem_context_get_param(i915, &p);
> -		igt_assert_eq_u64(p.value, saved);
> -	}
> -}
> -
> -static int create_ext_ioctl(int i915,
> -			    struct drm_i915_gem_context_create_ext *arg)
> -{
> -	int err;
> -
> -	err = 0;
> -	if (igt_ioctl(i915, DRM_IOCTL_I915_GEM_CONTEXT_CREATE_EXT, arg)) {
> -		err = -errno;
> -		igt_assume(err);
> -	}
> -
> -	errno = 0;
> -	return err;
> -}
> -
> -static void test_create(int i915)
> -{
> -	struct drm_i915_gem_context_create_ext_setparam p = {
> -		.base = {
> -			.name = I915_CONTEXT_CREATE_EXT_SETPARAM,
> -			.next_extension = 0, /* end of chain */
> -		},
> -		.param = {
> -			.param = I915_CONTEXT_PARAM_RINGSIZE,
> -			.value = 512 << 10,
> -		}
> -	};
> -	struct drm_i915_gem_context_create_ext create = {
> -		.flags = I915_CONTEXT_CREATE_FLAGS_USE_EXTENSIONS,
> -		.extensions = to_user_pointer(&p),
> -	};
> -
> -	/*
> -	 * Check that the ringsize parameter is used during context constuction.
> -	 */
> -
> -	igt_assert_eq(create_ext_ioctl(i915, &create),  0);
> -
> -	p.param.ctx_id = create.ctx_id;
> -	p.param.value = 0;
> -	gem_context_get_param(i915, &p.param);
> -	igt_assert_eq(p.param.value, 512 << 10);
> -
> -	gem_context_destroy(i915, create.ctx_id);
> -}
> -
> -static void test_clone(int i915)
> -{
> -	struct drm_i915_gem_context_create_ext_setparam p = {
> -		.base = {
> -			.name = I915_CONTEXT_CREATE_EXT_SETPARAM,
> -			.next_extension = 0, /* end of chain */
> -		},
> -		.param = {
> -			.param = I915_CONTEXT_PARAM_RINGSIZE,
> -			.value = 512 << 10,
> -		}
> -	};
> -	struct drm_i915_gem_context_create_ext create = {
> -		.flags = I915_CONTEXT_CREATE_FLAGS_USE_EXTENSIONS,
> -		.extensions = to_user_pointer(&p),
> -	};
> -
> -	/*
> -	 * Check that the ringsize is copied across during context cloning.
> -	 */
> -
> -	igt_assert_eq(create_ext_ioctl(i915, &create),  0);
> -
> -	p.param.ctx_id = gem_context_clone(i915, create.ctx_id,
> -					   I915_CONTEXT_CLONE_ENGINES, 0);
> -	igt_assert_neq(p.param.ctx_id, create.ctx_id);
> -	gem_context_destroy(i915, create.ctx_id);
> -
> -	p.param.value = 0;
> -	gem_context_get_param(i915, &p.param);
> -	igt_assert_eq(p.param.value, 512 << 10);
> -
> -	gem_context_destroy(i915, p.param.ctx_id);
> -}
> -
> -static int __execbuf(int i915, struct drm_i915_gem_execbuffer2 *execbuf)
> -{
> -	int err;
> -
> -	err = 0;
> -	if (ioctl(i915, DRM_IOCTL_I915_GEM_EXECBUFFER2, execbuf)) {
> -		err = -errno;
> -		igt_assume(err);
> -	}
> -
> -	errno = 0;
> -	return err;
> -}
> -
> -#define IDLE (1 << 0)
> -#define PLUG (1 << 1)
> -
> -static void sighandler(int sig)
> -{
> -}
> -
> -static unsigned int
> -measure_inflight(int i915, unsigned int engine, int timeout, unsigned int flags)
> -{
> -	IGT_CORK_FENCE(cork);
> -	unsigned int count;
> -	igt_spin_t *spin;
> -	int fence;
> -	int err;
> -
> -	fcntl(i915, F_SETFL, fcntl(i915, F_GETFL) | O_NONBLOCK);
> -	signal(SIGALRM, sighandler);
> -	alarm(timeout);
> -
> -	fence = igt_cork_plug(&cork, i915);
> -	spin = igt_spin_new(i915,
> -			    .engine = engine,
> -			    .fence = fence,
> -			    .flags = (flags & PLUG) ? IGT_SPIN_FENCE_IN : 0);
> -	for (count = 1; (err = __execbuf(i915, &spin->execbuf)) == 0; count++)
> -		;
> -	igt_debugfs_dump(i915, "i915_engine_info");
> -	igt_assert_eq(err, -EWOULDBLOCK);
> -	close(fence);
> -
> -	alarm(0);
> -	signal(SIGALRM, SIG_DFL);
> -	fcntl(i915, F_SETFL, fcntl(i915, F_GETFL) & ~O_NONBLOCK);
> -
> -	igt_spin_free(i915, spin);
> -	igt_cork_unplug(&cork);
> -
> -	return count;
> -}
> -
> -static void test_resize(int i915,
> -			const struct intel_execution_engine2 *e,
> -			void *data)
> -#define as_pointer(x) (void *)(uintptr_t)(x)
> -{
> -	struct drm_i915_gem_context_param p = {
> -		.param = I915_CONTEXT_PARAM_RINGSIZE,
> -	};
> -	unsigned long flags = (uintptr_t)data;
> -	unsigned int prev[2] = {};
> -	uint64_t elapsed;
> -	uint32_t saved;
> -
> -	/*
> -	 * The ringsize directly affects the number of batches we can have
> -	 * inflight -- when we run out of room in the ring, the client is
> -	 * blocked (or if O_NONBLOCK is specified, -EWOULDBLOCK is reported).
> -	 * The kernel throttles the client when they enter the last 4KiB page,
> -	 * so as we double the size of the ring, we nearly double the number
> -	 * of requests we can fit as 2^n-1: i.e 0, 1, 3, 7, 15, 31 pages.
> -	 */
> -
> -	gem_context_get_param(i915, &p);
> -	saved = p.value;
> -
> -	/* XXX disable hangchecking? */
> -	elapsed = 0;
> -	gem_quiescent_gpu(i915);
> -	for (p.value = 1 << 12; p.value <= 128 << 12; p.value <<= 1) {
> -		struct timespec tv = {};
> -		unsigned int count;
> -
> -		gem_context_set_param(i915, &p);
> -
> -		igt_nsec_elapsed(&tv);
> -		count = measure_inflight(i915,
> -					 e->flags,
> -					 1 + 4 * ceil(elapsed*1e-9),
> -					 flags);
> -		elapsed = igt_nsec_elapsed(&tv);
> -
> -		igt_info("%s: %6llx -> %'6d\n", e->name, p.value, count);
> -		igt_assert(count > 3 * (prev[1] - prev[0]) / 4 + prev[1]);
> -		if (flags & IDLE)
> -			gem_quiescent_gpu(i915);
> -
> -		prev[0] = prev[1];
> -		prev[1] = count;
> -	}
> -	gem_quiescent_gpu(i915);
> -
> -	p.value = saved;
> -	gem_context_set_param(i915, &p);
> -}
> -
> -static void gem_test_each_engine(int i915, const char *name,
> -				 void (*fn)(int i915,
> -					    const struct intel_execution_engine2 *e,
> -					    void *data),
> -				 void *data)
> -{
> -	const struct intel_execution_engine2 *e;
> -
> -	igt_subtest_with_dynamic(name) {
> -		__for_each_physical_engine(i915, e) {
> -			igt_dynamic_f("%s", e->name)
> -				fn(i915, e, data);
> -		}
> -	}
> -}
> -
> -igt_main
> -{
> -	int i915;
> -
> -	igt_fixture {
> -		i915 = drm_open_driver(DRIVER_INTEL);
> -		igt_require_gem(i915);
> -
> -		igt_require(has_ringsize(i915));
> -	}
> -
> -	igt_subtest("idempotent")
> -		test_idempotent(i915);
> -
> -	igt_subtest("invalid")
> -		test_invalid(i915);
> -
> -	igt_subtest("create")
> -		test_create(i915);
> -	igt_subtest("clone")
> -		test_clone(i915);
> -
> -	gem_test_each_engine(i915, "idle", test_resize, as_pointer(IDLE));
> -	gem_test_each_engine(i915, "active", test_resize, 0);
> -	gem_test_each_engine(i915, "plugged", test_resize, as_pointer(PLUG));
> -
> -	/* XXX ctx->engines[]? Clone (above) should be enough */
> -
> -	igt_fixture {
> -		close(i915);
> -	}
> -}
> diff --git a/tests/meson.build b/tests/meson.build
> index 0abda2c3..846a9ccf 100644
> --- a/tests/meson.build
> +++ b/tests/meson.build
> @@ -135,7 +135,6 @@ i915_progs = [
>  	'gem_ctx_isolation',
>  	'gem_ctx_param',
>  	'gem_ctx_persistence',
> -	'gem_ctx_ringsize',
>  	'gem_ctx_shared',
>  	'gem_ctx_switch',
>  	'gem_evict_alignment',
> -- 
> 2.29.2
> 
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: [igt-dev] [PATCH i-g-t 3/8] tests/i915/gem_exec_endless: Stop setting the ring size
  2021-03-19 22:32 ` [igt-dev] [PATCH i-g-t 3/8] tests/i915/gem_exec_endless: Stop setting the ring size Jason Ekstrand
@ 2021-03-22 19:14   ` Daniel Vetter
  0 siblings, 0 replies; 44+ messages in thread
From: Daniel Vetter @ 2021-03-22 19:14 UTC (permalink / raw)
  To: Jason Ekstrand; +Cc: igt-dev

On Fri, Mar 19, 2021 at 05:32:28PM -0500, Jason Ekstrand wrote:
> I915_CONTEXT_PARAM_RINGSIZE is being removed from upstream i915 because
> it's never been used by any userspace other than IGT.

Lots of MI_SEMAPHORE in this tests, looks a bit like something that is
probably not a valid usecase for legacy dma_fence execbuf with
end-of-batch dma_fence semantics. But didn't look too closely.

Up to this patch, with sob added:

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>

> ---
>  tests/i915/gem_exec_endless.c | 12 +-----------
>  1 file changed, 1 insertion(+), 11 deletions(-)
> 
> diff --git a/tests/i915/gem_exec_endless.c b/tests/i915/gem_exec_endless.c
> index 1b320d4c..a3e2fa49 100644
> --- a/tests/i915/gem_exec_endless.c
> +++ b/tests/i915/gem_exec_endless.c
> @@ -67,16 +67,6 @@ static unsigned int offset_in_page(void *addr)
>  static uint32_t __supervisor_create_context(int i915,
>  					    const struct intel_execution_engine2 *e)
>  {
> -	struct drm_i915_gem_context_create_ext_setparam p_ring = {
> -		{
> -			.name = I915_CONTEXT_CREATE_EXT_SETPARAM,
> -			.next_extension = 0
> -		},
> -		{
> -			.param = I915_CONTEXT_PARAM_RINGSIZE,
> -			.value = 4096,
> -		},
> -	};
>  	I915_DEFINE_CONTEXT_PARAM_ENGINES(engines, 2) = {
>  		.engines = {
>  			{ e->class, e->instance },
> @@ -86,7 +76,7 @@ static uint32_t __supervisor_create_context(int i915,
>  	struct drm_i915_gem_context_create_ext_setparam p_engines = {
>  		{
>  			.name = I915_CONTEXT_CREATE_EXT_SETPARAM,
> -			.next_extension = to_user_pointer(&p_ring)
> +			.next_extension = 0,
>  		},
>  		{
>  			.param = I915_CONTEXT_PARAM_ENGINES,
> -- 
> 2.29.2
> 
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: [igt-dev] [PATCH i-g-t 1/8] tests/i915: Drop gem_ctx_ringsize
  2021-03-22 19:11   ` Daniel Vetter
@ 2021-03-22 19:15     ` Daniel Vetter
  0 siblings, 0 replies; 44+ messages in thread
From: Daniel Vetter @ 2021-03-22 19:15 UTC (permalink / raw)
  To: Jason Ekstrand; +Cc: igt-dev

On Mon, Mar 22, 2021 at 08:11:04PM +0100, Daniel Vetter wrote:
> On Fri, Mar 19, 2021 at 05:32:26PM -0500, Jason Ekstrand wrote:
> > I915_CONTEXT_PARAM_RINGSIZE is being removed from upstream i915 because
> > it's never been used by any userspace other than IGT.
> > ---
> >  tests/Makefile.sources        |   3 -
> >  tests/i915/gem_ctx_ringsize.c | 345 ----------------------------------
> >  tests/meson.build             |   1 -
> 
> Your forgot Makefile.sources. Yes we still have some autotools left for
> test building. With that fixed and the sob line fixed.

Lol I was blind, apologies :-/

Maybe shouldn't review patch series this late, but oh well.
-Daniel

> 
> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> 
> >  3 files changed, 349 deletions(-)
> >  delete mode 100644 tests/i915/gem_ctx_ringsize.c
> > 
> > diff --git a/tests/Makefile.sources b/tests/Makefile.sources
> > index ec52ee3b..cfef5d34 100644
> > --- a/tests/Makefile.sources
> > +++ b/tests/Makefile.sources
> > @@ -194,9 +194,6 @@ gem_ctx_param_SOURCES = i915/gem_ctx_param.c
> >  TESTS_progs += gem_ctx_persistence
> >  gem_ctx_persistence_SOURCES = i915/gem_ctx_persistence.c
> >  
> > -TESTS_progs += gem_ctx_ringsize
> > -gem_ctx_ringsize_SOURCES = i915/gem_ctx_ringsize.c
> > -
> >  TESTS_progs += gem_ctx_shared
> >  gem_ctx_shared_SOURCES = i915/gem_ctx_shared.c
> >  
> > diff --git a/tests/i915/gem_ctx_ringsize.c b/tests/i915/gem_ctx_ringsize.c
> > deleted file mode 100644
> > index 60187b7c..00000000
> > --- a/tests/i915/gem_ctx_ringsize.c
> > +++ /dev/null
> > @@ -1,345 +0,0 @@
> > -/*
> > - * Copyright © 2019 Intel Corporation
> > - *
> > - * Permission is hereby granted, free of charge, to any person obtaining a
> > - * copy of this software and associated documentation files (the "Software"),
> > - * to deal in the Software without restriction, including without limitation
> > - * the rights to use, copy, modify, merge, publish, distribute, sublicense,
> > - * and/or sell copies of the Software, and to permit persons to whom the
> > - * Software is furnished to do so, subject to the following conditions:
> > - *
> > - * The above copyright notice and this permission notice (including the next
> > - * paragraph) shall be included in all copies or substantial portions of the
> > - * Software.
> > - *
> > - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> > - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> > - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
> > - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
> > - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
> > - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
> > - * IN THE SOFTWARE.
> > - */
> > -
> > -#include <errno.h>
> > -#include <fcntl.h>
> > -#include <inttypes.h>
> > -#include <math.h>
> > -#include <signal.h>
> > -#include <sys/ioctl.h>
> > -#include <sys/types.h>
> > -#include <unistd.h>
> > -
> > -#include "drmtest.h"
> > -#include "i915/gem.h"
> > -#include "i915/gem_context.h"
> > -#include "i915/gem_engine_topology.h"
> > -#include "ioctl_wrappers.h" /* gem_wait()! */
> > -#include "sw_sync.h"
> > -
> > -static bool has_ringsize(int i915)
> > -{
> > -	struct drm_i915_gem_context_param p = {
> > -		.param = I915_CONTEXT_PARAM_RINGSIZE,
> > -	};
> > -
> > -	return __gem_context_get_param(i915, &p) == 0;
> > -}
> > -
> > -static void test_idempotent(int i915)
> > -{
> > -	struct drm_i915_gem_context_param p = {
> > -		.param = I915_CONTEXT_PARAM_RINGSIZE,
> > -	};
> > -	uint32_t saved;
> > -
> > -	/*
> > -	 * Simple test to verify that we are able to read back the same
> > -	 * value as we set.
> > -	 */
> > -
> > -	gem_context_get_param(i915, &p);
> > -	saved = p.value;
> > -
> > -	for (uint32_t x = 1 << 12; x <= 128 << 12; x <<= 1) {
> > -		p.value = x;
> > -		gem_context_set_param(i915, &p);
> > -		gem_context_get_param(i915, &p);
> > -		igt_assert_eq_u32(p.value, x);
> > -	}
> > -
> > -	p.value = saved;
> > -	gem_context_set_param(i915, &p);
> > -}
> > -
> > -static void test_invalid(int i915)
> > -{
> > -	struct drm_i915_gem_context_param p = {
> > -		.param = I915_CONTEXT_PARAM_RINGSIZE,
> > -	};
> > -	uint64_t invalid[] = {
> > -		0, 1, 4095, 4097, 8191, 8193,
> > -		/* upper limit may be HW dependent, atm it is 512KiB */
> > -		(512 << 10) - 1, (512 << 10) + 1,
> > -		-1, -1u
> > -	};
> > -	uint32_t saved;
> > -
> > -	/*
> > -	 * The HW only accepts certain aligned values and so we reject
> > -	 * any invalid sizes specified by the user.
> > -	 *
> > -	 * Currently, the HW only accepts 4KiB - 512KiB in 4K increments,
> > -	 * and is unlikely to ever accept smaller.
> > -	 */
> > -
> > -	gem_context_get_param(i915, &p);
> > -	saved = p.value;
> > -
> > -	for (int i = 0; i < ARRAY_SIZE(invalid); i++) {
> > -		p.value = invalid[i];
> > -		igt_assert_eq(__gem_context_set_param(i915, &p), -EINVAL);
> > -		gem_context_get_param(i915, &p);
> > -		igt_assert_eq_u64(p.value, saved);
> > -	}
> > -}
> > -
> > -static int create_ext_ioctl(int i915,
> > -			    struct drm_i915_gem_context_create_ext *arg)
> > -{
> > -	int err;
> > -
> > -	err = 0;
> > -	if (igt_ioctl(i915, DRM_IOCTL_I915_GEM_CONTEXT_CREATE_EXT, arg)) {
> > -		err = -errno;
> > -		igt_assume(err);
> > -	}
> > -
> > -	errno = 0;
> > -	return err;
> > -}
> > -
> > -static void test_create(int i915)
> > -{
> > -	struct drm_i915_gem_context_create_ext_setparam p = {
> > -		.base = {
> > -			.name = I915_CONTEXT_CREATE_EXT_SETPARAM,
> > -			.next_extension = 0, /* end of chain */
> > -		},
> > -		.param = {
> > -			.param = I915_CONTEXT_PARAM_RINGSIZE,
> > -			.value = 512 << 10,
> > -		}
> > -	};
> > -	struct drm_i915_gem_context_create_ext create = {
> > -		.flags = I915_CONTEXT_CREATE_FLAGS_USE_EXTENSIONS,
> > -		.extensions = to_user_pointer(&p),
> > -	};
> > -
> > -	/*
> > -	 * Check that the ringsize parameter is used during context constuction.
> > -	 */
> > -
> > -	igt_assert_eq(create_ext_ioctl(i915, &create),  0);
> > -
> > -	p.param.ctx_id = create.ctx_id;
> > -	p.param.value = 0;
> > -	gem_context_get_param(i915, &p.param);
> > -	igt_assert_eq(p.param.value, 512 << 10);
> > -
> > -	gem_context_destroy(i915, create.ctx_id);
> > -}
> > -
> > -static void test_clone(int i915)
> > -{
> > -	struct drm_i915_gem_context_create_ext_setparam p = {
> > -		.base = {
> > -			.name = I915_CONTEXT_CREATE_EXT_SETPARAM,
> > -			.next_extension = 0, /* end of chain */
> > -		},
> > -		.param = {
> > -			.param = I915_CONTEXT_PARAM_RINGSIZE,
> > -			.value = 512 << 10,
> > -		}
> > -	};
> > -	struct drm_i915_gem_context_create_ext create = {
> > -		.flags = I915_CONTEXT_CREATE_FLAGS_USE_EXTENSIONS,
> > -		.extensions = to_user_pointer(&p),
> > -	};
> > -
> > -	/*
> > -	 * Check that the ringsize is copied across during context cloning.
> > -	 */
> > -
> > -	igt_assert_eq(create_ext_ioctl(i915, &create),  0);
> > -
> > -	p.param.ctx_id = gem_context_clone(i915, create.ctx_id,
> > -					   I915_CONTEXT_CLONE_ENGINES, 0);
> > -	igt_assert_neq(p.param.ctx_id, create.ctx_id);
> > -	gem_context_destroy(i915, create.ctx_id);
> > -
> > -	p.param.value = 0;
> > -	gem_context_get_param(i915, &p.param);
> > -	igt_assert_eq(p.param.value, 512 << 10);
> > -
> > -	gem_context_destroy(i915, p.param.ctx_id);
> > -}
> > -
> > -static int __execbuf(int i915, struct drm_i915_gem_execbuffer2 *execbuf)
> > -{
> > -	int err;
> > -
> > -	err = 0;
> > -	if (ioctl(i915, DRM_IOCTL_I915_GEM_EXECBUFFER2, execbuf)) {
> > -		err = -errno;
> > -		igt_assume(err);
> > -	}
> > -
> > -	errno = 0;
> > -	return err;
> > -}
> > -
> > -#define IDLE (1 << 0)
> > -#define PLUG (1 << 1)
> > -
> > -static void sighandler(int sig)
> > -{
> > -}
> > -
> > -static unsigned int
> > -measure_inflight(int i915, unsigned int engine, int timeout, unsigned int flags)
> > -{
> > -	IGT_CORK_FENCE(cork);
> > -	unsigned int count;
> > -	igt_spin_t *spin;
> > -	int fence;
> > -	int err;
> > -
> > -	fcntl(i915, F_SETFL, fcntl(i915, F_GETFL) | O_NONBLOCK);
> > -	signal(SIGALRM, sighandler);
> > -	alarm(timeout);
> > -
> > -	fence = igt_cork_plug(&cork, i915);
> > -	spin = igt_spin_new(i915,
> > -			    .engine = engine,
> > -			    .fence = fence,
> > -			    .flags = (flags & PLUG) ? IGT_SPIN_FENCE_IN : 0);
> > -	for (count = 1; (err = __execbuf(i915, &spin->execbuf)) == 0; count++)
> > -		;
> > -	igt_debugfs_dump(i915, "i915_engine_info");
> > -	igt_assert_eq(err, -EWOULDBLOCK);
> > -	close(fence);
> > -
> > -	alarm(0);
> > -	signal(SIGALRM, SIG_DFL);
> > -	fcntl(i915, F_SETFL, fcntl(i915, F_GETFL) & ~O_NONBLOCK);
> > -
> > -	igt_spin_free(i915, spin);
> > -	igt_cork_unplug(&cork);
> > -
> > -	return count;
> > -}
> > -
> > -static void test_resize(int i915,
> > -			const struct intel_execution_engine2 *e,
> > -			void *data)
> > -#define as_pointer(x) (void *)(uintptr_t)(x)
> > -{
> > -	struct drm_i915_gem_context_param p = {
> > -		.param = I915_CONTEXT_PARAM_RINGSIZE,
> > -	};
> > -	unsigned long flags = (uintptr_t)data;
> > -	unsigned int prev[2] = {};
> > -	uint64_t elapsed;
> > -	uint32_t saved;
> > -
> > -	/*
> > -	 * The ringsize directly affects the number of batches we can have
> > -	 * inflight -- when we run out of room in the ring, the client is
> > -	 * blocked (or if O_NONBLOCK is specified, -EWOULDBLOCK is reported).
> > -	 * The kernel throttles the client when they enter the last 4KiB page,
> > -	 * so as we double the size of the ring, we nearly double the number
> > -	 * of requests we can fit as 2^n-1: i.e 0, 1, 3, 7, 15, 31 pages.
> > -	 */
> > -
> > -	gem_context_get_param(i915, &p);
> > -	saved = p.value;
> > -
> > -	/* XXX disable hangchecking? */
> > -	elapsed = 0;
> > -	gem_quiescent_gpu(i915);
> > -	for (p.value = 1 << 12; p.value <= 128 << 12; p.value <<= 1) {
> > -		struct timespec tv = {};
> > -		unsigned int count;
> > -
> > -		gem_context_set_param(i915, &p);
> > -
> > -		igt_nsec_elapsed(&tv);
> > -		count = measure_inflight(i915,
> > -					 e->flags,
> > -					 1 + 4 * ceil(elapsed*1e-9),
> > -					 flags);
> > -		elapsed = igt_nsec_elapsed(&tv);
> > -
> > -		igt_info("%s: %6llx -> %'6d\n", e->name, p.value, count);
> > -		igt_assert(count > 3 * (prev[1] - prev[0]) / 4 + prev[1]);
> > -		if (flags & IDLE)
> > -			gem_quiescent_gpu(i915);
> > -
> > -		prev[0] = prev[1];
> > -		prev[1] = count;
> > -	}
> > -	gem_quiescent_gpu(i915);
> > -
> > -	p.value = saved;
> > -	gem_context_set_param(i915, &p);
> > -}
> > -
> > -static void gem_test_each_engine(int i915, const char *name,
> > -				 void (*fn)(int i915,
> > -					    const struct intel_execution_engine2 *e,
> > -					    void *data),
> > -				 void *data)
> > -{
> > -	const struct intel_execution_engine2 *e;
> > -
> > -	igt_subtest_with_dynamic(name) {
> > -		__for_each_physical_engine(i915, e) {
> > -			igt_dynamic_f("%s", e->name)
> > -				fn(i915, e, data);
> > -		}
> > -	}
> > -}
> > -
> > -igt_main
> > -{
> > -	int i915;
> > -
> > -	igt_fixture {
> > -		i915 = drm_open_driver(DRIVER_INTEL);
> > -		igt_require_gem(i915);
> > -
> > -		igt_require(has_ringsize(i915));
> > -	}
> > -
> > -	igt_subtest("idempotent")
> > -		test_idempotent(i915);
> > -
> > -	igt_subtest("invalid")
> > -		test_invalid(i915);
> > -
> > -	igt_subtest("create")
> > -		test_create(i915);
> > -	igt_subtest("clone")
> > -		test_clone(i915);
> > -
> > -	gem_test_each_engine(i915, "idle", test_resize, as_pointer(IDLE));
> > -	gem_test_each_engine(i915, "active", test_resize, 0);
> > -	gem_test_each_engine(i915, "plugged", test_resize, as_pointer(PLUG));
> > -
> > -	/* XXX ctx->engines[]? Clone (above) should be enough */
> > -
> > -	igt_fixture {
> > -		close(i915);
> > -	}
> > -}
> > diff --git a/tests/meson.build b/tests/meson.build
> > index 0abda2c3..846a9ccf 100644
> > --- a/tests/meson.build
> > +++ b/tests/meson.build
> > @@ -135,7 +135,6 @@ i915_progs = [
> >  	'gem_ctx_isolation',
> >  	'gem_ctx_param',
> >  	'gem_ctx_persistence',
> > -	'gem_ctx_ringsize',
> >  	'gem_ctx_shared',
> >  	'gem_ctx_switch',
> >  	'gem_evict_alignment',
> > -- 
> > 2.29.2
> > 
> > _______________________________________________
> > igt-dev mailing list
> > igt-dev@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/igt-dev
> 
> -- 
> Daniel Vetter
> Software Engineer, Intel Corporation
> http://blog.ffwll.ch

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: [igt-dev] [PATCH i-g-t 4/8] tests/i915/gem_ctx_param: Drop the zeromap subtests
  2021-03-19 22:32 ` [igt-dev] [PATCH i-g-t 4/8] tests/i915/gem_ctx_param: Drop the zeromap subtests Jason Ekstrand
@ 2021-03-22 19:16   ` Daniel Vetter
  0 siblings, 0 replies; 44+ messages in thread
From: Daniel Vetter @ 2021-03-22 19:16 UTC (permalink / raw)
  To: Jason Ekstrand; +Cc: igt-dev

On Fri, Mar 19, 2021 at 05:32:29PM -0500, Jason Ekstrand wrote:
> We're going to be deleting this param from i915 since it's never been
> used by any actual userspace beyond this test.

I think a bit more history here would be nice: Userspace did exist once in
the form of patches for beignet, but never landed. This is probably one of
the features that originally have been driven by the geod stack, and as
soon as the kernel side landed, no one cared.

With sob: Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
>  tests/i915/gem_ctx_param.c | 33 ---------------------------------
>  1 file changed, 33 deletions(-)
> 
> diff --git a/tests/i915/gem_ctx_param.c b/tests/i915/gem_ctx_param.c
> index ab0e3007..47fea06d 100644
> --- a/tests/i915/gem_ctx_param.c
> +++ b/tests/i915/gem_ctx_param.c
> @@ -335,39 +335,6 @@ igt_main
>  		gem_context_set_param(fd, &arg);
>  	}
>  
> -	arg.param = I915_CONTEXT_PARAM_NO_ZEROMAP;
> -
> -	igt_describe("Validates context set param ioctl in non root mode with param "
> -	       "set to no zeromap");
> -	igt_subtest("non-root-set-no-zeromap") {
> -		igt_fork(child, 1) {
> -			igt_drop_root();
> -
> -			arg.ctx_id = ctx;
> -			gem_context_get_param(fd, &arg);
> -			arg.value--;
> -			gem_context_set_param(fd, &arg);
> -		}
> -
> -		igt_waitchildren();
> -	}
> -
> -	igt_describe("Tests the context set param ioctl with no zeromap enabled in root mode");
> -	igt_subtest("root-set-no-zeromap-enabled") {
> -		arg.ctx_id = ctx;
> -		gem_context_get_param(fd, &arg);
> -		arg.value = 1;
> -		gem_context_set_param(fd, &arg);
> -	}
> -
> -	igt_describe("Tests the context set param ioctl with no zeromap disabled in root mode");
> -	igt_subtest("root-set-no-zeromap-disabled") {
> -		arg.ctx_id = ctx;
> -		gem_context_get_param(fd, &arg);
> -		arg.value = 0;
> -		gem_context_set_param(fd, &arg);
> -	}
> -
>  	igt_describe("Tests that multiple contexts can share the same VMA");
>  	igt_subtest("vm")
>  		test_vm(fd);
> -- 
> 2.29.2
> 
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: [igt-dev] [PATCH i-g-t 7/8] tests/i915/gem_ctx_persistence: Drop the clone test
  2021-03-19 22:32 ` [igt-dev] [PATCH i-g-t 7/8] tests/i915/gem_ctx_persistence: Drop the clone test Jason Ekstrand
@ 2021-03-22 19:17   ` Daniel Vetter
  0 siblings, 0 replies; 44+ messages in thread
From: Daniel Vetter @ 2021-03-22 19:17 UTC (permalink / raw)
  To: Jason Ekstrand; +Cc: igt-dev

On Fri, Mar 19, 2021 at 05:32:32PM -0500, Jason Ekstrand wrote:
> We're going to be deleting the CONTEXT_CLONE API since IGT is the only
> userspace to ever use it.  Drop the tests for it.

Patches 5-7 with sob added:

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>

> ---
>  tests/i915/gem_ctx_persistence.c | 30 ------------------------------
>  1 file changed, 30 deletions(-)
> 
> diff --git a/tests/i915/gem_ctx_persistence.c b/tests/i915/gem_ctx_persistence.c
> index 10d057f1..91c30176 100644
> --- a/tests/i915/gem_ctx_persistence.c
> +++ b/tests/i915/gem_ctx_persistence.c
> @@ -147,33 +147,6 @@ static void test_idempotent(int i915)
>  	igt_assert_eq(p.value, expected);
>  }
>  
> -static void test_clone(int i915)
> -{
> -	struct drm_i915_gem_context_param p = {
> -		.param = I915_CONTEXT_PARAM_PERSISTENCE,
> -	};
> -	uint32_t ctx, clone;
> -
> -	/*
> -	 * Check that persistence is inherited across a clone.
> -	 */
> -	igt_require( __gem_context_create(i915, &ctx) == 0);
> -
> -	p.ctx_id = ctx;
> -	p.value = 0;
> -	gem_context_set_param(i915, &p);
> -
> -	clone = gem_context_clone(i915, ctx, I915_CONTEXT_CLONE_FLAGS, 0);
> -	gem_context_destroy(i915, ctx);
> -
> -	p.ctx_id = clone;
> -	p.value = -1;
> -	gem_context_get_param(i915, &p);
> -	igt_assert_eq(p.value, 0);
> -
> -	gem_context_destroy(i915, clone);
> -}
> -
>  static void test_persistence(int i915, unsigned int engine)
>  {
>  	igt_spin_t *spin;
> @@ -1366,9 +1339,6 @@ igt_main
>  	igt_subtest("idempotent")
>  		test_idempotent(i915);
>  
> -	igt_subtest("clone")
> -		test_clone(i915);
> -
>  	igt_subtest("file")
>  		test_nonpersistent_file(i915);
>  
> -- 
> 2.29.2
> 
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 44+ messages in thread

* Re: [igt-dev] [PATCH i-g-t 8/8] lib/i915/gem_context: Implement VM and engine cloning manually
  2021-03-19 22:32 ` [igt-dev] [PATCH i-g-t 8/8] lib/i915/gem_context: Implement VM and engine cloning manually Jason Ekstrand
@ 2021-03-22 19:25   ` Daniel Vetter
  2021-03-22 20:42     ` Jason Ekstrand
  0 siblings, 1 reply; 44+ messages in thread
From: Daniel Vetter @ 2021-03-22 19:25 UTC (permalink / raw)
  To: Jason Ekstrand; +Cc: igt-dev

On Fri, Mar 19, 2021 at 05:32:33PM -0500, Jason Ekstrand wrote:
> We're going to be deleting the CONTEXT_CLONE API since IGT is the only
> userspace to ever use it.  There are only two bits of this API that IGT
> uses in interesting ways so implement them as create params instead of
> cloning.

I think this works, only major concern I have: Do we have a userspace that
uses getparam with the engine param? vm_id I know we need to keep working
in some form, but engines I've not seen. And keeping the getparam working
just for igt isn't much better than keeping clone working.

Maybe we need to limit this to just VM sharing, and open code the other
users in the test directly.

Once that's sorted: For at least the functions you're touching, can you
pls add gtkdoc in the libraries and wire it up for the doc build? I know
in the past especially gem igt libarary code has been extremely lacking on
this, but we need to start somewhere with better test code. This is as
good a place as any. For that perhaps check with Petri and Zbyscek on irc
how to get the doc build going, it's a bit an adventure unfortunately.

Also I do wonder how much more fallout we'll see once we start to lock
down the contexts after the first execbuf.

Also needs sob.

> ---
>  lib/i915/gem_context.c         | 90 ++++++++++++++++++++++++++--------
>  lib/i915/gem_context.h         |  7 ++-
>  tests/i915/gem_ctx_shared.c    | 10 ++--
>  tests/i915/gem_exec_balancer.c |  6 +--
>  tests/i915/gem_exec_schedule.c |  8 +--
>  5 files changed, 86 insertions(+), 35 deletions(-)
> 
> diff --git a/lib/i915/gem_context.c b/lib/i915/gem_context.c
> index 79411e10..ed56d974 100644
> --- a/lib/i915/gem_context.c
> +++ b/lib/i915/gem_context.c
> @@ -334,28 +334,77 @@ bool gem_context_has_persistence(int i915)
>  	return __gem_context_get_param(i915, &param) == 0;
>  }
>  
> +static void
> +add_ctx_create_ext(struct drm_i915_gem_context_create_ext *ctx,
> +		   struct i915_user_extension *ext)
> +{
> +	ext->next_extension = ctx->extensions;
> +	ctx->extensions = to_user_pointer(ext);
> +}
> +
>  int
>  __gem_context_clone(int i915,
> -		    uint32_t src, unsigned int share,
> +		    uint32_t src, unsigned int clone,
>  		    unsigned int flags,
>  		    uint32_t *out)
>  {
> -	struct drm_i915_gem_context_create_ext_clone clone = {
> -		{ .name = I915_CONTEXT_CREATE_EXT_CLONE },
> -		.clone_id = src,
> -		.flags = share,
> -	};
> -	struct drm_i915_gem_context_create_ext arg = {
> +	I915_DEFINE_CONTEXT_PARAM_ENGINES(engines, I915_EXEC_RING_MASK + 1);
> +	uint32_t vm;
> +	struct drm_i915_gem_context_create_ext_setparam engines_param, vm_param;
> +	int err;
> +
> +	struct drm_i915_gem_context_create_ext ctx_create = {
>  		.flags = flags | I915_CONTEXT_CREATE_FLAGS_USE_EXTENSIONS,
> -		.extensions = to_user_pointer(&clone),
> +		.extensions = 0,
>  	};
> -	int err;
>  
> -	err = create_ext_ioctl(i915, &arg);
> +	if (clone & GEM_CONTEXT_CLONE_ENGINES) {
> +		engines_param = (struct drm_i915_gem_context_create_ext_setparam) {
> +			.base = {
> +				.name = I915_CONTEXT_CREATE_EXT_SETPARAM,
> +			},
> +			.param = {
> +				.param = I915_CONTEXT_PARAM_ENGINES,
> +				.size = sizeof(engines),
> +				.value = to_user_pointer(&engines),
> +			},
> +		};
> +
> +		engines_param.param.ctx_id = src;
> +		err = __gem_context_get_param(i915, &engines_param.param);
> +		if (err)
> +			return err;
> +
> +		engines_param.param.ctx_id = 0;
> +		add_ctx_create_ext(&ctx_create, &engines_param.base);
> +	}
> +
> +	if (clone & GEM_CONTEXT_CLONE_VM) {
> +		vm_param = (struct drm_i915_gem_context_create_ext_setparam) {
> +			.base = {
> +				.name = I915_CONTEXT_CREATE_EXT_SETPARAM,
> +			},
> +			.param = {
> +				.param = I915_CONTEXT_PARAM_VM,
> +				.size = sizeof(vm),
> +				.value = to_user_pointer(&vm),
> +			},
> +		};
> +
> +		vm_param.param.ctx_id = src;
> +		err = __gem_context_get_param(i915, &vm_param.param);
> +		if (err)
> +			return err;
> +
> +		vm_param.param.ctx_id = 0;
> +		add_ctx_create_ext(&ctx_create, &vm_param.base);
> +	}
> +
> +	err = create_ext_ioctl(i915, &ctx_create);
>  	if (err)
>  		return err;
>  
> -	*out = arg.ctx_id;
> +	*out = ctx_create.ctx_id;
>  	return 0;
>  }
>  
> @@ -373,23 +422,22 @@ static bool __gem_context_has(int i915, uint32_t share, unsigned int flags)
>  
>  bool gem_contexts_has_shared_gtt(int i915)
>  {
> -	return __gem_context_has(i915, I915_CONTEXT_CLONE_VM, 0);
> +	return __gem_context_has(i915, GEM_CONTEXT_CLONE_VM, 0);
>  }
>  
>  bool gem_has_queues(int i915)
>  {
> -	return __gem_context_has(i915,
> -				 I915_CONTEXT_CLONE_VM,
> +	return __gem_context_has(i915, GEM_CONTEXT_CLONE_VM,
>  				 I915_CONTEXT_CREATE_FLAGS_SINGLE_TIMELINE);
>  }
>  
>  uint32_t gem_context_clone(int i915,
> -			   uint32_t src, unsigned int share,
> +			   uint32_t src, unsigned int clone,
>  			   unsigned int flags)
>  {
>  	uint32_t ctx;
>  
> -	igt_assert_eq(__gem_context_clone(i915, src, share, flags, &ctx), 0);
> +	igt_assert_eq(__gem_context_clone(i915, src, clone, flags, &ctx), 0);
>  
>  	return ctx;
>  }
> @@ -426,15 +474,15 @@ uint32_t gem_context_clone_with_engines(int i915, uint32_t src)
>  	if (!gem_has_context_clone(i915))
>  		return gem_context_create(i915);
>  	else
> -		return gem_context_clone(i915, src, I915_CONTEXT_CLONE_ENGINES,
> +		return gem_context_clone(i915, src, GEM_CONTEXT_CLONE_ENGINES,
>  					 0);
>  }
>  
>  uint32_t gem_queue_create(int i915)
>  {
>  	return gem_context_clone(i915, 0,
> -				 I915_CONTEXT_CLONE_VM |
> -				 I915_CONTEXT_CLONE_ENGINES,
> +				 GEM_CONTEXT_CLONE_VM |
> +				 GEM_CONTEXT_CLONE_ENGINES,
>  				 I915_CONTEXT_CREATE_FLAGS_SINGLE_TIMELINE);
>  }
>  
> @@ -448,8 +496,8 @@ uint32_t gem_queue_create(int i915)
>  uint32_t gem_queue_clone_with_engines(int i915, uint32_t src)
>  {
>  	return gem_context_clone(i915, src,
> -				 I915_CONTEXT_CLONE_ENGINES |
> -				 I915_CONTEXT_CLONE_VM,
> +				 GEM_CONTEXT_CLONE_ENGINES |
> +				 GEM_CONTEXT_CLONE_VM,
>  				 I915_CONTEXT_CREATE_FLAGS_SINGLE_TIMELINE);
>  }
>  
> diff --git a/lib/i915/gem_context.h b/lib/i915/gem_context.h
> index c2c2b827..e583ce09 100644
> --- a/lib/i915/gem_context.h
> +++ b/lib/i915/gem_context.h
> @@ -37,12 +37,15 @@ int __gem_context_destroy(int fd, uint32_t ctx_id);
>  uint32_t gem_context_create_for_engine(int fd, unsigned int class, unsigned int inst);
>  uint32_t gem_context_create_for_class(int i915, unsigned int class, unsigned int *count);
>  
> +#define GEM_CONTEXT_CLONE_ENGINES (1 << 4)
> +#define GEM_CONTEXT_CLONE_VM (1 << 5)

At least in the kernel we tend to make these enums so you have a place to
put docs, but not sure about igt.
-Daniel

> +
>  int __gem_context_clone(int i915,
> -			uint32_t src, unsigned int share,
> +			uint32_t src, unsigned int clone,
>  			unsigned int flags,
>  			uint32_t *out);
>  uint32_t gem_context_clone(int i915,
> -			   uint32_t src, unsigned int share,
> +			   uint32_t src, unsigned int clone,
>  			   unsigned int flags);
>  uint32_t gem_context_clone_with_engines(int i915, uint32_t src);
>  void gem_context_copy_engines(int src_fd, uint32_t src,
> diff --git a/tests/i915/gem_ctx_shared.c b/tests/i915/gem_ctx_shared.c
> index 6b21994d..21b07083 100644
> --- a/tests/i915/gem_ctx_shared.c
> +++ b/tests/i915/gem_ctx_shared.c
> @@ -82,7 +82,7 @@ static void create_shared_gtt(int i915, unsigned int flags)
>  	igt_until_timeout(2) {
>  		parent = flags & DETACHED ? child : 0;
>  		child = gem_context_clone(i915,
> -					  parent, I915_CONTEXT_CLONE_VM,
> +					  parent, GEM_CONTEXT_CLONE_VM,
>  					  0);
>  		execbuf.rsvd1 = child;
>  		gem_execbuf(i915, &execbuf);
> @@ -98,7 +98,7 @@ static void create_shared_gtt(int i915, unsigned int flags)
>  		execbuf.rsvd1 = parent;
>  		igt_assert_eq(__gem_execbuf(i915, &execbuf), -ENOENT);
>  		igt_assert_eq(__gem_context_clone(i915,
> -						  parent, I915_CONTEXT_CLONE_VM,
> +						  parent, GEM_CONTEXT_CLONE_VM,
>  						  0, &parent), -ENOENT);
>  	}
>  	if (flags & DETACHED)
> @@ -121,7 +121,7 @@ static void disjoint_timelines(int i915)
>  	 * distinct timelines. A request queued to one context should be
>  	 * independent of any shared contexts.
>  	 */
> -	child = gem_context_clone(i915, 0, I915_CONTEXT_CLONE_VM, 0);
> +	child = gem_context_clone(i915, 0, GEM_CONTEXT_CLONE_VM, 0);
>  	plug = igt_cork_plug(&cork, i915);
>  
>  	spin[0] = __igt_spin_new(i915, .ctx = 0, .dependency = plug);
> @@ -161,7 +161,7 @@ static void exhaust_shared_gtt(int i915, unsigned int flags)
>  		for (;;) {
>  			parent = child;
>  			err = __gem_context_clone(i915,
> -						  parent, I915_CONTEXT_CLONE_VM,
> +						  parent, GEM_CONTEXT_CLONE_VM,
>  						  0, &child);
>  			if (err)
>  				break;
> @@ -201,7 +201,7 @@ static void exec_shared_gtt(int i915, unsigned int ring)
>  	int timeline;
>  	int i;
>  
> -	clone = gem_context_clone(i915, 0, I915_CONTEXT_CLONE_VM, 0);
> +	clone = gem_context_clone(i915, 0, GEM_CONTEXT_CLONE_VM, 0);
>  
>  	/* Find a hole big enough for both objects later */
>  	scratch = gem_create(i915, 16384);
> diff --git a/tests/i915/gem_exec_balancer.c b/tests/i915/gem_exec_balancer.c
> index 9feb20fb..64ad259c 100644
> --- a/tests/i915/gem_exec_balancer.c
> +++ b/tests/i915/gem_exec_balancer.c
> @@ -627,7 +627,7 @@ static void bonded(int i915, unsigned int flags)
>  		}
>  
>  		ctx = gem_context_clone(i915,
> -					master, I915_CONTEXT_CLONE_VM,
> +					master, GEM_CONTEXT_CLONE_VM,
>  					I915_CONTEXT_CREATE_FLAGS_SINGLE_TIMELINE);
>  		set_load_balancer(i915, ctx, siblings, count, &bonds[limit - 1]);
>  
> @@ -827,7 +827,7 @@ static void bonded_slice(int i915)
>  			igt_list_del(&spin->link);
>  
>  			ctx = gem_context_clone(i915, ctx,
> -						I915_CONTEXT_CLONE_ENGINES, 0);
> +						GEM_CONTEXT_CLONE_ENGINES, 0);
>  
>  			while (!READ_ONCE(*stop)) {
>  				spin = igt_spin_new(i915,
> @@ -2443,7 +2443,7 @@ static void nop(int i915)
>  				.buffer_count = 1,
>  				.flags = child + 1,
>  				.rsvd1 = gem_context_clone(i915, ctx,
> -							   I915_CONTEXT_CLONE_ENGINES, 0),
> +							   GEM_CONTEXT_CLONE_ENGINES, 0),
>  			};
>  			struct timespec tv = {};
>  			unsigned long nops;
> diff --git a/tests/i915/gem_exec_schedule.c b/tests/i915/gem_exec_schedule.c
> index 9585059d..aedcdf33 100644
> --- a/tests/i915/gem_exec_schedule.c
> +++ b/tests/i915/gem_exec_schedule.c
> @@ -1183,8 +1183,8 @@ noreorder(int i915, unsigned int engine, int prio, unsigned int flags)
>  		fence = igt_cork_plug(&cork, i915);
>  
>  	ctx = gem_context_clone(i915, execbuf.rsvd1,
> -			      I915_CONTEXT_CLONE_ENGINES |
> -			      I915_CONTEXT_CLONE_VM,
> +			      GEM_CONTEXT_CLONE_ENGINES |
> +			      GEM_CONTEXT_CLONE_VM,
>  			      0);
>  	spin = igt_spin_new(i915, ctx,
>  			    .engine = engine,
> @@ -2428,9 +2428,9 @@ static void *iova_thread(struct ufd_thread *t, int prio)
>  	unsigned int clone;
>  	uint32_t ctx;
>  
> -	clone = I915_CONTEXT_CLONE_ENGINES;
> +	clone = GEM_CONTEXT_CLONE_ENGINES;
>  	if (t->flags & SHARED)
> -		clone |= I915_CONTEXT_CLONE_VM;
> +		clone |= GEM_CONTEXT_CLONE_VM;
>  
>  	ctx = gem_context_clone(t->i915, 0, clone, 0);
>  	gem_context_set_priority(t->i915, ctx, prio);
> -- 
> 2.29.2
> 
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 44+ messages in thread

* [igt-dev] [PATCH i-g-t 0/9] Adjust IGT for upstream API clean-ups (v2)
  2021-03-19 22:32 [igt-dev] [PATCH i-g-t 0/8] Adjust IGT for upstream API clean-ups Jason Ekstrand
                   ` (10 preceding siblings ...)
  2021-03-22 18:20 ` [igt-dev] [PATCH i-g-t 0/8] " Daniel Vetter
@ 2021-03-22 20:41 ` Jason Ekstrand
  2021-03-22 20:41   ` [igt-dev] [PATCH i-g-t 1/9] tests/i915: Drop gem_ctx_ringsize Jason Ekstrand
                     ` (12 more replies)
  2021-03-22 22:05 ` [igt-dev] ✗ Fi.CI.BUILD: failure for Adjust IGT for upstream API clean-ups (rev2) Patchwork
  12 siblings, 13 replies; 44+ messages in thread
From: Jason Ekstrand @ 2021-03-22 20:41 UTC (permalink / raw)
  To: igt-dev

I'm trying to remove some unused APIs from upstream i915.  This i-g-t
series updates tests in accordance with those removals.  For a few things,
it simply deletes tests which test explicitly for that feature.  For
cloning, we do actually use that for a bunch of stuff today so I just
implement the two clones we care about (engines and VMs) directly with
getparam and a create setparam.

Jason Ekstrand (9):
  tests/i915: Drop gem_ctx_ringsize
  tests/i915/gem_exec_balancer: Drop the ringsize subtest
  tests/i915/gem_exec_endless: Stop setting the ring size
  tests/i915/gem_ctx_param: Drop the zeromap subtests
  tests/i915: Drop gem_ctx_clone
  tests/i915/gem_ctx_create: Stop cloning engines
  tests/i915/gem_ctx_persistence: Drop the clone test
  tests/i915/gem_exec_balancer: Stop cloning engines
  lib/i915/gem_context: Implement VM and engine cloning manually (v2)

 lib/i915/gem_context.c           | 109 ++++++--
 lib/i915/gem_context.h           |   7 +-
 tests/Makefile.sources           |   6 -
 tests/i915/gem_ctx_clone.c       | 450 -------------------------------
 tests/i915/gem_ctx_create.c      |   4 +-
 tests/i915/gem_ctx_param.c       |  33 ---
 tests/i915/gem_ctx_persistence.c |  30 ---
 tests/i915/gem_ctx_ringsize.c    | 345 ------------------------
 tests/i915/gem_ctx_shared.c      |  10 +-
 tests/i915/gem_exec_balancer.c   |  90 +------
 tests/i915/gem_exec_endless.c    |  12 +-
 tests/i915/gem_exec_schedule.c   |   8 +-
 tests/meson.build                |   2 -
 13 files changed, 108 insertions(+), 998 deletions(-)
 delete mode 100644 tests/i915/gem_ctx_clone.c
 delete mode 100644 tests/i915/gem_ctx_ringsize.c

-- 
2.29.2

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

^ permalink raw reply	[flat|nested] 44+ messages in thread

* [igt-dev] [PATCH i-g-t 1/9] tests/i915: Drop gem_ctx_ringsize
  2021-03-22 20:41 ` [igt-dev] [PATCH i-g-t 0/9] Adjust IGT for upstream API clean-ups (v2) Jason Ekstrand
@ 2021-03-22 20:41   ` Jason Ekstrand
  2021-03-22 20:41   ` [igt-dev] [PATCH i-g-t 2/9] tests/i915/gem_exec_balancer: Drop the ringsize subtest Jason Ekstrand
                     ` (11 subsequent siblings)
  12 siblings, 0 replies; 44+ messages in thread
From: Jason Ekstrand @ 2021-03-22 20:41 UTC (permalink / raw)
  To: igt-dev

I915_CONTEXT_PARAM_RINGSIZE is being removed from upstream i915 because
it's never been used by any userspace other than IGT.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 tests/Makefile.sources        |   3 -
 tests/i915/gem_ctx_ringsize.c | 345 ----------------------------------
 tests/meson.build             |   1 -
 3 files changed, 349 deletions(-)
 delete mode 100644 tests/i915/gem_ctx_ringsize.c

diff --git a/tests/Makefile.sources b/tests/Makefile.sources
index 4f24fb3a..bffa0db3 100644
--- a/tests/Makefile.sources
+++ b/tests/Makefile.sources
@@ -193,9 +193,6 @@ gem_ctx_param_SOURCES = i915/gem_ctx_param.c
 TESTS_progs += gem_ctx_persistence
 gem_ctx_persistence_SOURCES = i915/gem_ctx_persistence.c
 
-TESTS_progs += gem_ctx_ringsize
-gem_ctx_ringsize_SOURCES = i915/gem_ctx_ringsize.c
-
 TESTS_progs += gem_ctx_shared
 gem_ctx_shared_SOURCES = i915/gem_ctx_shared.c
 
diff --git a/tests/i915/gem_ctx_ringsize.c b/tests/i915/gem_ctx_ringsize.c
deleted file mode 100644
index 60187b7c..00000000
--- a/tests/i915/gem_ctx_ringsize.c
+++ /dev/null
@@ -1,345 +0,0 @@
-/*
- * Copyright © 2019 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include <errno.h>
-#include <fcntl.h>
-#include <inttypes.h>
-#include <math.h>
-#include <signal.h>
-#include <sys/ioctl.h>
-#include <sys/types.h>
-#include <unistd.h>
-
-#include "drmtest.h"
-#include "i915/gem.h"
-#include "i915/gem_context.h"
-#include "i915/gem_engine_topology.h"
-#include "ioctl_wrappers.h" /* gem_wait()! */
-#include "sw_sync.h"
-
-static bool has_ringsize(int i915)
-{
-	struct drm_i915_gem_context_param p = {
-		.param = I915_CONTEXT_PARAM_RINGSIZE,
-	};
-
-	return __gem_context_get_param(i915, &p) == 0;
-}
-
-static void test_idempotent(int i915)
-{
-	struct drm_i915_gem_context_param p = {
-		.param = I915_CONTEXT_PARAM_RINGSIZE,
-	};
-	uint32_t saved;
-
-	/*
-	 * Simple test to verify that we are able to read back the same
-	 * value as we set.
-	 */
-
-	gem_context_get_param(i915, &p);
-	saved = p.value;
-
-	for (uint32_t x = 1 << 12; x <= 128 << 12; x <<= 1) {
-		p.value = x;
-		gem_context_set_param(i915, &p);
-		gem_context_get_param(i915, &p);
-		igt_assert_eq_u32(p.value, x);
-	}
-
-	p.value = saved;
-	gem_context_set_param(i915, &p);
-}
-
-static void test_invalid(int i915)
-{
-	struct drm_i915_gem_context_param p = {
-		.param = I915_CONTEXT_PARAM_RINGSIZE,
-	};
-	uint64_t invalid[] = {
-		0, 1, 4095, 4097, 8191, 8193,
-		/* upper limit may be HW dependent, atm it is 512KiB */
-		(512 << 10) - 1, (512 << 10) + 1,
-		-1, -1u
-	};
-	uint32_t saved;
-
-	/*
-	 * The HW only accepts certain aligned values and so we reject
-	 * any invalid sizes specified by the user.
-	 *
-	 * Currently, the HW only accepts 4KiB - 512KiB in 4K increments,
-	 * and is unlikely to ever accept smaller.
-	 */
-
-	gem_context_get_param(i915, &p);
-	saved = p.value;
-
-	for (int i = 0; i < ARRAY_SIZE(invalid); i++) {
-		p.value = invalid[i];
-		igt_assert_eq(__gem_context_set_param(i915, &p), -EINVAL);
-		gem_context_get_param(i915, &p);
-		igt_assert_eq_u64(p.value, saved);
-	}
-}
-
-static int create_ext_ioctl(int i915,
-			    struct drm_i915_gem_context_create_ext *arg)
-{
-	int err;
-
-	err = 0;
-	if (igt_ioctl(i915, DRM_IOCTL_I915_GEM_CONTEXT_CREATE_EXT, arg)) {
-		err = -errno;
-		igt_assume(err);
-	}
-
-	errno = 0;
-	return err;
-}
-
-static void test_create(int i915)
-{
-	struct drm_i915_gem_context_create_ext_setparam p = {
-		.base = {
-			.name = I915_CONTEXT_CREATE_EXT_SETPARAM,
-			.next_extension = 0, /* end of chain */
-		},
-		.param = {
-			.param = I915_CONTEXT_PARAM_RINGSIZE,
-			.value = 512 << 10,
-		}
-	};
-	struct drm_i915_gem_context_create_ext create = {
-		.flags = I915_CONTEXT_CREATE_FLAGS_USE_EXTENSIONS,
-		.extensions = to_user_pointer(&p),
-	};
-
-	/*
-	 * Check that the ringsize parameter is used during context constuction.
-	 */
-
-	igt_assert_eq(create_ext_ioctl(i915, &create),  0);
-
-	p.param.ctx_id = create.ctx_id;
-	p.param.value = 0;
-	gem_context_get_param(i915, &p.param);
-	igt_assert_eq(p.param.value, 512 << 10);
-
-	gem_context_destroy(i915, create.ctx_id);
-}
-
-static void test_clone(int i915)
-{
-	struct drm_i915_gem_context_create_ext_setparam p = {
-		.base = {
-			.name = I915_CONTEXT_CREATE_EXT_SETPARAM,
-			.next_extension = 0, /* end of chain */
-		},
-		.param = {
-			.param = I915_CONTEXT_PARAM_RINGSIZE,
-			.value = 512 << 10,
-		}
-	};
-	struct drm_i915_gem_context_create_ext create = {
-		.flags = I915_CONTEXT_CREATE_FLAGS_USE_EXTENSIONS,
-		.extensions = to_user_pointer(&p),
-	};
-
-	/*
-	 * Check that the ringsize is copied across during context cloning.
-	 */
-
-	igt_assert_eq(create_ext_ioctl(i915, &create),  0);
-
-	p.param.ctx_id = gem_context_clone(i915, create.ctx_id,
-					   I915_CONTEXT_CLONE_ENGINES, 0);
-	igt_assert_neq(p.param.ctx_id, create.ctx_id);
-	gem_context_destroy(i915, create.ctx_id);
-
-	p.param.value = 0;
-	gem_context_get_param(i915, &p.param);
-	igt_assert_eq(p.param.value, 512 << 10);
-
-	gem_context_destroy(i915, p.param.ctx_id);
-}
-
-static int __execbuf(int i915, struct drm_i915_gem_execbuffer2 *execbuf)
-{
-	int err;
-
-	err = 0;
-	if (ioctl(i915, DRM_IOCTL_I915_GEM_EXECBUFFER2, execbuf)) {
-		err = -errno;
-		igt_assume(err);
-	}
-
-	errno = 0;
-	return err;
-}
-
-#define IDLE (1 << 0)
-#define PLUG (1 << 1)
-
-static void sighandler(int sig)
-{
-}
-
-static unsigned int
-measure_inflight(int i915, unsigned int engine, int timeout, unsigned int flags)
-{
-	IGT_CORK_FENCE(cork);
-	unsigned int count;
-	igt_spin_t *spin;
-	int fence;
-	int err;
-
-	fcntl(i915, F_SETFL, fcntl(i915, F_GETFL) | O_NONBLOCK);
-	signal(SIGALRM, sighandler);
-	alarm(timeout);
-
-	fence = igt_cork_plug(&cork, i915);
-	spin = igt_spin_new(i915,
-			    .engine = engine,
-			    .fence = fence,
-			    .flags = (flags & PLUG) ? IGT_SPIN_FENCE_IN : 0);
-	for (count = 1; (err = __execbuf(i915, &spin->execbuf)) == 0; count++)
-		;
-	igt_debugfs_dump(i915, "i915_engine_info");
-	igt_assert_eq(err, -EWOULDBLOCK);
-	close(fence);
-
-	alarm(0);
-	signal(SIGALRM, SIG_DFL);
-	fcntl(i915, F_SETFL, fcntl(i915, F_GETFL) & ~O_NONBLOCK);
-
-	igt_spin_free(i915, spin);
-	igt_cork_unplug(&cork);
-
-	return count;
-}
-
-static void test_resize(int i915,
-			const struct intel_execution_engine2 *e,
-			void *data)
-#define as_pointer(x) (void *)(uintptr_t)(x)
-{
-	struct drm_i915_gem_context_param p = {
-		.param = I915_CONTEXT_PARAM_RINGSIZE,
-	};
-	unsigned long flags = (uintptr_t)data;
-	unsigned int prev[2] = {};
-	uint64_t elapsed;
-	uint32_t saved;
-
-	/*
-	 * The ringsize directly affects the number of batches we can have
-	 * inflight -- when we run out of room in the ring, the client is
-	 * blocked (or if O_NONBLOCK is specified, -EWOULDBLOCK is reported).
-	 * The kernel throttles the client when they enter the last 4KiB page,
-	 * so as we double the size of the ring, we nearly double the number
-	 * of requests we can fit as 2^n-1: i.e 0, 1, 3, 7, 15, 31 pages.
-	 */
-
-	gem_context_get_param(i915, &p);
-	saved = p.value;
-
-	/* XXX disable hangchecking? */
-	elapsed = 0;
-	gem_quiescent_gpu(i915);
-	for (p.value = 1 << 12; p.value <= 128 << 12; p.value <<= 1) {
-		struct timespec tv = {};
-		unsigned int count;
-
-		gem_context_set_param(i915, &p);
-
-		igt_nsec_elapsed(&tv);
-		count = measure_inflight(i915,
-					 e->flags,
-					 1 + 4 * ceil(elapsed*1e-9),
-					 flags);
-		elapsed = igt_nsec_elapsed(&tv);
-
-		igt_info("%s: %6llx -> %'6d\n", e->name, p.value, count);
-		igt_assert(count > 3 * (prev[1] - prev[0]) / 4 + prev[1]);
-		if (flags & IDLE)
-			gem_quiescent_gpu(i915);
-
-		prev[0] = prev[1];
-		prev[1] = count;
-	}
-	gem_quiescent_gpu(i915);
-
-	p.value = saved;
-	gem_context_set_param(i915, &p);
-}
-
-static void gem_test_each_engine(int i915, const char *name,
-				 void (*fn)(int i915,
-					    const struct intel_execution_engine2 *e,
-					    void *data),
-				 void *data)
-{
-	const struct intel_execution_engine2 *e;
-
-	igt_subtest_with_dynamic(name) {
-		__for_each_physical_engine(i915, e) {
-			igt_dynamic_f("%s", e->name)
-				fn(i915, e, data);
-		}
-	}
-}
-
-igt_main
-{
-	int i915;
-
-	igt_fixture {
-		i915 = drm_open_driver(DRIVER_INTEL);
-		igt_require_gem(i915);
-
-		igt_require(has_ringsize(i915));
-	}
-
-	igt_subtest("idempotent")
-		test_idempotent(i915);
-
-	igt_subtest("invalid")
-		test_invalid(i915);
-
-	igt_subtest("create")
-		test_create(i915);
-	igt_subtest("clone")
-		test_clone(i915);
-
-	gem_test_each_engine(i915, "idle", test_resize, as_pointer(IDLE));
-	gem_test_each_engine(i915, "active", test_resize, 0);
-	gem_test_each_engine(i915, "plugged", test_resize, as_pointer(PLUG));
-
-	/* XXX ctx->engines[]? Clone (above) should be enough */
-
-	igt_fixture {
-		close(i915);
-	}
-}
diff --git a/tests/meson.build b/tests/meson.build
index 825e0183..c85768e1 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -134,7 +134,6 @@ i915_progs = [
 	'gem_ctx_isolation',
 	'gem_ctx_param',
 	'gem_ctx_persistence',
-	'gem_ctx_ringsize',
 	'gem_ctx_shared',
 	'gem_ctx_switch',
 	'gem_evict_alignment',
-- 
2.29.2

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

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [igt-dev] [PATCH i-g-t 2/9] tests/i915/gem_exec_balancer: Drop the ringsize subtest
  2021-03-22 20:41 ` [igt-dev] [PATCH i-g-t 0/9] Adjust IGT for upstream API clean-ups (v2) Jason Ekstrand
  2021-03-22 20:41   ` [igt-dev] [PATCH i-g-t 1/9] tests/i915: Drop gem_ctx_ringsize Jason Ekstrand
@ 2021-03-22 20:41   ` Jason Ekstrand
  2021-03-22 20:41   ` [igt-dev] [PATCH i-g-t 3/9] tests/i915/gem_exec_endless: Stop setting the ring size Jason Ekstrand
                     ` (10 subsequent siblings)
  12 siblings, 0 replies; 44+ messages in thread
From: Jason Ekstrand @ 2021-03-22 20:41 UTC (permalink / raw)
  To: igt-dev

I915_CONTEXT_PARAM_RINGSIZE is being removed from upstream i915 because
it's never been used by any userspace other than IGT.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 tests/i915/gem_exec_balancer.c | 81 ----------------------------------
 1 file changed, 81 deletions(-)

diff --git a/tests/i915/gem_exec_balancer.c b/tests/i915/gem_exec_balancer.c
index 01db0e11..bfd65b29 100644
--- a/tests/i915/gem_exec_balancer.c
+++ b/tests/i915/gem_exec_balancer.c
@@ -2551,84 +2551,6 @@ next:
 	gem_quiescent_gpu(i915);
 }
 
-static void sighandler(int sig)
-{
-}
-
-static unsigned int measure_inflight(int i915, uint32_t ctx, int timeout)
-{
-	igt_spin_t *spin = igt_spin_new(i915, ctx);
-	unsigned int count;
-	int err;
-
-	fcntl(i915, F_SETFL, fcntl(i915, F_GETFL) | O_NONBLOCK);
-	signal(SIGALRM, sighandler);
-	alarm(timeout);
-
-	for (count = 1; (err = __execbuf(i915, &spin->execbuf)) == 0; count++)
-		;
-	igt_assert_eq(err, -EWOULDBLOCK);
-
-	alarm(0);
-	signal(SIGALRM, SIG_DFL);
-	fcntl(i915, F_SETFL, fcntl(i915, F_GETFL) & ~O_NONBLOCK);
-
-	igt_spin_free(i915, spin);
-
-	return count;
-}
-
-static void __resize(int i915, uint32_t ctx)
-{
-	struct drm_i915_gem_context_param p = {
-		.ctx_id = ctx,
-		.param = I915_CONTEXT_PARAM_RINGSIZE,
-	};
-	unsigned int prev[2] = {};
-	uint64_t elapsed;
-
-	elapsed = 0;
-	gem_quiescent_gpu(i915);
-	for (p.value = 1 << 12; p.value <= 128 << 12; p.value <<= 1) {
-		struct timespec tv = {};
-		unsigned int count;
-
-		gem_context_set_param(i915, &p);
-
-		igt_nsec_elapsed(&tv);
-		count = measure_inflight(i915, ctx, 1 + 4 * ceil(elapsed*1e-9));
-		elapsed = igt_nsec_elapsed(&tv);
-
-		igt_info("%6llx -> %'6d\n", p.value, count);
-		igt_assert(count > 3 * (prev[1] - prev[0]) / 4 + prev[1]);
-
-		prev[0] = prev[1];
-		prev[1] = count;
-	}
-	gem_quiescent_gpu(i915);
-}
-
-static void ringsz(int i915)
-{
-	for (int class = 0; class < 32; class++) {
-		struct i915_engine_class_instance *ci;
-		unsigned int count;
-		uint32_t ctx;
-
-		ci = list_engines(i915, 1u << class, &count);
-		if (!ci || count < 2)
-			goto next;
-
-		ctx = load_balancer_create(i915, ci, count);
-		__resize(i915, ctx);
-		gem_context_destroy(i915, ctx);
-next:
-		free(ci);
-	}
-
-	gem_quiescent_gpu(i915);
-}
-
 static void ping(int i915, uint32_t ctx, unsigned int engine)
 {
 	struct drm_i915_gem_exec_object2 obj = {
@@ -3304,9 +3226,6 @@ igt_main
 	igt_subtest("fairslice")
 		fairslice(i915);
 
-	igt_subtest("ringsize")
-		ringsz(i915);
-
 	igt_subtest("nop")
 		nop(i915);
 
-- 
2.29.2

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

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [igt-dev] [PATCH i-g-t 3/9] tests/i915/gem_exec_endless: Stop setting the ring size
  2021-03-22 20:41 ` [igt-dev] [PATCH i-g-t 0/9] Adjust IGT for upstream API clean-ups (v2) Jason Ekstrand
  2021-03-22 20:41   ` [igt-dev] [PATCH i-g-t 1/9] tests/i915: Drop gem_ctx_ringsize Jason Ekstrand
  2021-03-22 20:41   ` [igt-dev] [PATCH i-g-t 2/9] tests/i915/gem_exec_balancer: Drop the ringsize subtest Jason Ekstrand
@ 2021-03-22 20:41   ` Jason Ekstrand
  2021-03-22 20:41   ` [igt-dev] [PATCH i-g-t 4/9] tests/i915/gem_ctx_param: Drop the zeromap subtests Jason Ekstrand
                     ` (9 subsequent siblings)
  12 siblings, 0 replies; 44+ messages in thread
From: Jason Ekstrand @ 2021-03-22 20:41 UTC (permalink / raw)
  To: igt-dev

I915_CONTEXT_PARAM_RINGSIZE is being removed from upstream i915 because
it's never been used by any userspace other than IGT.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 tests/i915/gem_exec_endless.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/tests/i915/gem_exec_endless.c b/tests/i915/gem_exec_endless.c
index 1b320d4c..a3e2fa49 100644
--- a/tests/i915/gem_exec_endless.c
+++ b/tests/i915/gem_exec_endless.c
@@ -67,16 +67,6 @@ static unsigned int offset_in_page(void *addr)
 static uint32_t __supervisor_create_context(int i915,
 					    const struct intel_execution_engine2 *e)
 {
-	struct drm_i915_gem_context_create_ext_setparam p_ring = {
-		{
-			.name = I915_CONTEXT_CREATE_EXT_SETPARAM,
-			.next_extension = 0
-		},
-		{
-			.param = I915_CONTEXT_PARAM_RINGSIZE,
-			.value = 4096,
-		},
-	};
 	I915_DEFINE_CONTEXT_PARAM_ENGINES(engines, 2) = {
 		.engines = {
 			{ e->class, e->instance },
@@ -86,7 +76,7 @@ static uint32_t __supervisor_create_context(int i915,
 	struct drm_i915_gem_context_create_ext_setparam p_engines = {
 		{
 			.name = I915_CONTEXT_CREATE_EXT_SETPARAM,
-			.next_extension = to_user_pointer(&p_ring)
+			.next_extension = 0,
 		},
 		{
 			.param = I915_CONTEXT_PARAM_ENGINES,
-- 
2.29.2

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

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [igt-dev] [PATCH i-g-t 4/9] tests/i915/gem_ctx_param: Drop the zeromap subtests
  2021-03-22 20:41 ` [igt-dev] [PATCH i-g-t 0/9] Adjust IGT for upstream API clean-ups (v2) Jason Ekstrand
                     ` (2 preceding siblings ...)
  2021-03-22 20:41   ` [igt-dev] [PATCH i-g-t 3/9] tests/i915/gem_exec_endless: Stop setting the ring size Jason Ekstrand
@ 2021-03-22 20:41   ` Jason Ekstrand
  2021-03-22 20:41   ` [igt-dev] [PATCH i-g-t 5/9] tests/i915: Drop gem_ctx_clone Jason Ekstrand
                     ` (8 subsequent siblings)
  12 siblings, 0 replies; 44+ messages in thread
From: Jason Ekstrand @ 2021-03-22 20:41 UTC (permalink / raw)
  To: igt-dev

The idea behind this param is to support OpenCL drivers with relocations
because OpenCL reserves 0x0 for NULL and, if we placed memory there, it
would confuse CL kernels.  It was originally sent out as part of a patch
series including libdrm [1] and Beignet [2] support.  However, the
libdrm and Beignet patches never landed in their respective upstream
projects so this API has never been used.  It's never been used in Mesa
or any other driver, either.

This means that these IGT tests are the only userspace for NO_ZEROMAP
which has ever really existed.  Let's drop them and drop support from
i915 as well.

[1]: https://lists.freedesktop.org/archives/intel-gfx/2015-May/067030.html
[2]: https://lists.freedesktop.org/archives/intel-gfx/2015-May/067031.html

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 tests/i915/gem_ctx_param.c | 33 ---------------------------------
 1 file changed, 33 deletions(-)

diff --git a/tests/i915/gem_ctx_param.c b/tests/i915/gem_ctx_param.c
index ab0e3007..47fea06d 100644
--- a/tests/i915/gem_ctx_param.c
+++ b/tests/i915/gem_ctx_param.c
@@ -335,39 +335,6 @@ igt_main
 		gem_context_set_param(fd, &arg);
 	}
 
-	arg.param = I915_CONTEXT_PARAM_NO_ZEROMAP;
-
-	igt_describe("Validates context set param ioctl in non root mode with param "
-	       "set to no zeromap");
-	igt_subtest("non-root-set-no-zeromap") {
-		igt_fork(child, 1) {
-			igt_drop_root();
-
-			arg.ctx_id = ctx;
-			gem_context_get_param(fd, &arg);
-			arg.value--;
-			gem_context_set_param(fd, &arg);
-		}
-
-		igt_waitchildren();
-	}
-
-	igt_describe("Tests the context set param ioctl with no zeromap enabled in root mode");
-	igt_subtest("root-set-no-zeromap-enabled") {
-		arg.ctx_id = ctx;
-		gem_context_get_param(fd, &arg);
-		arg.value = 1;
-		gem_context_set_param(fd, &arg);
-	}
-
-	igt_describe("Tests the context set param ioctl with no zeromap disabled in root mode");
-	igt_subtest("root-set-no-zeromap-disabled") {
-		arg.ctx_id = ctx;
-		gem_context_get_param(fd, &arg);
-		arg.value = 0;
-		gem_context_set_param(fd, &arg);
-	}
-
 	igt_describe("Tests that multiple contexts can share the same VMA");
 	igt_subtest("vm")
 		test_vm(fd);
-- 
2.29.2

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

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [igt-dev] [PATCH i-g-t 5/9] tests/i915: Drop gem_ctx_clone
  2021-03-22 20:41 ` [igt-dev] [PATCH i-g-t 0/9] Adjust IGT for upstream API clean-ups (v2) Jason Ekstrand
                     ` (3 preceding siblings ...)
  2021-03-22 20:41   ` [igt-dev] [PATCH i-g-t 4/9] tests/i915/gem_ctx_param: Drop the zeromap subtests Jason Ekstrand
@ 2021-03-22 20:41   ` Jason Ekstrand
  2021-03-22 20:41   ` [igt-dev] [PATCH i-g-t 6/9] tests/i915/gem_ctx_create: Stop cloning engines Jason Ekstrand
                     ` (7 subsequent siblings)
  12 siblings, 0 replies; 44+ messages in thread
From: Jason Ekstrand @ 2021-03-22 20:41 UTC (permalink / raw)
  To: igt-dev

We're going to be deleting the CONTEXT_CLONE API since IGT is the only
userspace to ever use it.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 tests/Makefile.sources     |   3 -
 tests/i915/gem_ctx_clone.c | 450 -------------------------------------
 tests/meson.build          |   1 -
 3 files changed, 454 deletions(-)
 delete mode 100644 tests/i915/gem_ctx_clone.c

diff --git a/tests/Makefile.sources b/tests/Makefile.sources
index bffa0db3..a0c23c1f 100644
--- a/tests/Makefile.sources
+++ b/tests/Makefile.sources
@@ -169,9 +169,6 @@ gem_cs_tlb_SOURCES = i915/gem_cs_tlb.c
 TESTS_progs += gem_ctx_bad_destroy
 gem_ctx_bad_destroy_SOURCES = i915/gem_ctx_bad_destroy.c
 
-TESTS_progs += gem_ctx_clone
-gem_ctx_clone_SOURCES = i915/gem_ctx_clone.c
-
 TESTS_progs += gem_ctx_create
 gem_ctx_create_SOURCES = i915/gem_ctx_create.c
 
diff --git a/tests/i915/gem_ctx_clone.c b/tests/i915/gem_ctx_clone.c
deleted file mode 100644
index b72269bc..00000000
--- a/tests/i915/gem_ctx_clone.c
+++ /dev/null
@@ -1,450 +0,0 @@
-/*
- * Copyright © 2019 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "i915/gem.h"
-#include "i915/gem_vm.h"
-#include "i915_drm.h"
-#include "igt.h"
-#include "igt_gt.h"
-
-static int ctx_create_ioctl(int i915, struct drm_i915_gem_context_create_ext *arg)
-{
-	int err;
-
-	err = 0;
-	if (igt_ioctl(i915, DRM_IOCTL_I915_GEM_CONTEXT_CREATE_EXT, arg)) {
-		err = -errno;
-		igt_assume(err);
-	}
-
-	errno = 0;
-	return err;
-}
-
-static void invalid_clone(int i915)
-{
-	struct drm_i915_gem_context_create_ext_clone ext = {
-		{ .name = I915_CONTEXT_CREATE_EXT_CLONE },
-	};
-	struct drm_i915_gem_context_create_ext create = {
-		.flags = I915_CONTEXT_CREATE_FLAGS_USE_EXTENSIONS,
-		.extensions = to_user_pointer(&ext),
-	};
-
-	igt_assert_eq(ctx_create_ioctl(i915, &create), 0);
-	gem_context_destroy(i915, create.ctx_id);
-
-	ext.flags = -1; /* Hopefully we won't run out of flags */
-	igt_assert_eq(ctx_create_ioctl(i915, &create), -EINVAL);
-	ext.flags = 0;
-
-	ext.base.next_extension = -1;
-	igt_assert_eq(ctx_create_ioctl(i915, &create), -EFAULT);
-	ext.base.next_extension = to_user_pointer(&ext);
-	igt_assert_eq(ctx_create_ioctl(i915, &create), -E2BIG);
-	ext.base.next_extension = 0;
-
-	ext.clone_id = -1;
-	igt_assert_eq(ctx_create_ioctl(i915, &create), -ENOENT);
-	ext.clone_id = 0;
-}
-
-static void clone_flags(int i915)
-{
-	struct drm_i915_gem_context_create_ext_setparam set = {
-		{ .name = I915_CONTEXT_CREATE_EXT_SETPARAM },
-		{ .param = I915_CONTEXT_PARAM_RECOVERABLE },
-	};
-	struct drm_i915_gem_context_create_ext_clone ext = {
-		{ .name = I915_CONTEXT_CREATE_EXT_CLONE },
-		.flags = I915_CONTEXT_CLONE_FLAGS,
-	};
-	struct drm_i915_gem_context_create_ext create = {
-		.flags = I915_CONTEXT_CREATE_FLAGS_USE_EXTENSIONS,
-		.extensions = to_user_pointer(&ext),
-	};
-	int expected;
-
-	set.param.value = 1; /* default is recoverable */
-	igt_require(__gem_context_set_param(i915, &set.param) == 0);
-
-	for (int pass = 0; pass < 2; pass++) { /* cloning default, then child */
-		igt_debug("Cloning %d\n", ext.clone_id);
-		igt_assert_eq(ctx_create_ioctl(i915, &create), 0);
-
-		set.param.ctx_id = ext.clone_id;
-		gem_context_get_param(i915, &set.param);
-		expected = set.param.value;
-
-		set.param.ctx_id = create.ctx_id;
-		gem_context_get_param(i915, &set.param);
-
-		igt_assert_eq_u64(set.param.param,
-				  I915_CONTEXT_PARAM_RECOVERABLE);
-		igt_assert_eq((int)set.param.value, expected);
-
-		gem_context_destroy(i915, create.ctx_id);
-
-		expected = set.param.value = 0;
-		set.param.ctx_id = ext.clone_id;
-		gem_context_set_param(i915, &set.param);
-
-		igt_assert_eq(ctx_create_ioctl(i915, &create), 0);
-
-		set.param.ctx_id = create.ctx_id;
-		gem_context_get_param(i915, &set.param);
-
-		igt_assert_eq_u64(set.param.param,
-				  I915_CONTEXT_PARAM_RECOVERABLE);
-		igt_assert_eq((int)set.param.value, expected);
-
-		gem_context_destroy(i915, create.ctx_id);
-
-		/* clone but then reset priority to default... */
-		set.param.ctx_id = 0;
-		set.param.value = 1;
-		ext.base.next_extension = to_user_pointer(&set);
-		igt_assert_eq(ctx_create_ioctl(i915, &create), 0);
-		ext.base.next_extension = 0;
-
-		/* then new context should have updated priority... */
-		set.param.ctx_id = create.ctx_id;
-		gem_context_get_param(i915, &set.param);
-		igt_assert_eq_u64(set.param.value, 1);
-
-		/* but original context should have default priority */
-		set.param.ctx_id = ext.clone_id;
-		gem_context_get_param(i915, &set.param);
-		igt_assert_eq_u64(set.param.value, 0);
-
-		gem_context_destroy(i915, create.ctx_id);
-		ext.clone_id = gem_context_create(i915);
-	}
-
-	gem_context_destroy(i915, ext.clone_id);
-}
-
-static void clone_engines(int i915)
-{
-	struct drm_i915_gem_context_create_ext_setparam set = {
-		{ .name = I915_CONTEXT_CREATE_EXT_SETPARAM },
-		{ .param = I915_CONTEXT_PARAM_ENGINES },
-	};
-	struct drm_i915_gem_context_create_ext_clone ext = {
-		{ .name = I915_CONTEXT_CREATE_EXT_CLONE },
-		.flags = I915_CONTEXT_CLONE_ENGINES,
-	};
-	struct drm_i915_gem_context_create_ext create = {
-		.flags = I915_CONTEXT_CREATE_FLAGS_USE_EXTENSIONS,
-		.extensions = to_user_pointer(&ext),
-	};
-	I915_DEFINE_CONTEXT_PARAM_ENGINES(expected, 64);
-	I915_DEFINE_CONTEXT_PARAM_ENGINES(engines, 64);
-	uint64_t ex_size;
-
-	memset(&expected, 0, sizeof(expected));
-	memset(&engines, 0, sizeof(engines));
-
-	igt_require(__gem_context_set_param(i915, &set.param) == 0);
-
-	for (int pass = 0; pass < 2; pass++) { /* cloning default, then child */
-		igt_debug("Cloning %d\n", ext.clone_id);
-		igt_assert_eq(ctx_create_ioctl(i915, &create), 0);
-
-		/* Check that we cloned the engine map */
-		set.param.ctx_id = ext.clone_id;
-		set.param.size = sizeof(expected);
-		set.param.value = to_user_pointer(&expected);
-		gem_context_get_param(i915, &set.param);
-		ex_size = set.param.size;
-
-		set.param.ctx_id = create.ctx_id;
-		set.param.size = sizeof(engines);
-		set.param.value = to_user_pointer(&engines);
-		gem_context_get_param(i915, &set.param);
-
-		igt_assert_eq_u64(set.param.param, I915_CONTEXT_PARAM_ENGINES);
-		igt_assert_eq_u64(set.param.size, ex_size);
-		igt_assert(!memcmp(&engines, &expected, ex_size));
-
-		gem_context_destroy(i915, create.ctx_id);
-
-		/* Check that the clone will replace an earlier set */
-		expected.engines[0].engine_class =
-			I915_ENGINE_CLASS_INVALID;
-		expected.engines[0].engine_instance =
-			I915_ENGINE_CLASS_INVALID_NONE;
-		ex_size = (sizeof(struct i915_context_param_engines) +
-			   sizeof(expected.engines[0]));
-
-		set.param.ctx_id = ext.clone_id;
-		set.param.size = ex_size;
-		set.param.value = to_user_pointer(&expected);
-		gem_context_set_param(i915, &set.param);
-
-		igt_assert_eq(ctx_create_ioctl(i915, &create), 0);
-
-		set.param.ctx_id = create.ctx_id;
-		set.param.size = sizeof(engines);
-		set.param.value = to_user_pointer(&engines);
-		gem_context_get_param(i915, &set.param);
-
-		igt_assert_eq_u64(set.param.size, ex_size);
-		igt_assert(!memcmp(&engines, &expected, ex_size));
-
-		gem_context_destroy(i915, create.ctx_id);
-
-		/* clone but then reset engines to default */
-		set.param.ctx_id = 0;
-		set.param.size = 0;
-		set.param.value = 0;
-		ext.base.next_extension = to_user_pointer(&set);
-
-		igt_assert_eq(ctx_create_ioctl(i915, &create), 0);
-		ext.base.next_extension = 0;
-
-		set.param.ctx_id = create.ctx_id;
-		set.param.size = sizeof(engines);
-		set.param.value = to_user_pointer(&engines);
-		gem_context_get_param(i915, &set.param);
-		igt_assert_eq_u64(set.param.size, 0);
-
-		gem_context_destroy(i915, create.ctx_id);
-
-		/* And check we ignore the flag */
-		ext.flags = 0;
-		igt_assert_eq(ctx_create_ioctl(i915, &create), 0);
-		ext.flags = I915_CONTEXT_CLONE_ENGINES;
-
-		set.param.ctx_id = create.ctx_id;
-		set.param.size = sizeof(engines);
-		set.param.value = to_user_pointer(&engines);
-		gem_context_get_param(i915, &set.param);
-		igt_assert_eq_u64(set.param.size, 0);
-
-		ext.clone_id = gem_context_create(i915);
-	}
-
-	gem_context_destroy(i915, ext.clone_id);
-}
-
-static void clone_scheduler(int i915)
-{
-	struct drm_i915_gem_context_create_ext_setparam set = {
-		{ .name = I915_CONTEXT_CREATE_EXT_SETPARAM },
-		{ .param = I915_CONTEXT_PARAM_PRIORITY },
-	};
-	struct drm_i915_gem_context_create_ext_clone ext = {
-		{ .name = I915_CONTEXT_CREATE_EXT_CLONE },
-		.flags = I915_CONTEXT_CLONE_SCHEDATTR,
-	};
-	struct drm_i915_gem_context_create_ext create = {
-		.flags = I915_CONTEXT_CREATE_FLAGS_USE_EXTENSIONS,
-		.extensions = to_user_pointer(&ext),
-	};
-	int expected;
-
-	igt_require(__gem_context_set_param(i915, &set.param) == 0);
-
-	for (int pass = 0; pass < 2; pass++) { /* cloning default, then child */
-		igt_debug("Cloning %d\n", ext.clone_id);
-		igt_assert_eq(ctx_create_ioctl(i915, &create), 0);
-
-		set.param.ctx_id = ext.clone_id;
-		gem_context_get_param(i915, &set.param);
-		expected = set.param.value;
-
-		set.param.ctx_id = create.ctx_id;
-		gem_context_get_param(i915, &set.param);
-
-		igt_assert_eq_u64(set.param.param, I915_CONTEXT_PARAM_PRIORITY);
-		igt_assert_eq((int)set.param.value, expected);
-
-		gem_context_destroy(i915, create.ctx_id);
-
-		expected = set.param.value = 1;
-		set.param.ctx_id = ext.clone_id;
-		gem_context_set_param(i915, &set.param);
-
-		igt_assert_eq(ctx_create_ioctl(i915, &create), 0);
-
-		set.param.ctx_id = create.ctx_id;
-		gem_context_get_param(i915, &set.param);
-
-		igt_assert_eq_u64(set.param.param, I915_CONTEXT_PARAM_PRIORITY);
-		igt_assert_eq((int)set.param.value, expected);
-
-		gem_context_destroy(i915, create.ctx_id);
-
-		/* clone but then reset priority to default */
-		set.param.ctx_id = 0;
-		set.param.value = 0;
-		ext.base.next_extension = to_user_pointer(&set);
-		igt_assert_eq(ctx_create_ioctl(i915, &create), 0);
-		ext.base.next_extension = 0;
-
-		set.param.ctx_id = create.ctx_id;
-		gem_context_get_param(i915, &set.param);
-		igt_assert_eq_u64(set.param.value, 0);
-
-		set.param.ctx_id = ext.clone_id;
-		gem_context_get_param(i915, &set.param);
-		igt_assert_eq_u64(set.param.value, 1);
-
-		gem_context_destroy(i915, create.ctx_id);
-		ext.clone_id = gem_context_create(i915);
-	}
-
-	gem_context_destroy(i915, ext.clone_id);
-}
-
-static uint32_t __batch_create(int i915, uint32_t offset)
-{
-	const uint32_t bbe = MI_BATCH_BUFFER_END;
-	uint32_t handle;
-
-	handle = gem_create(i915, ALIGN(offset + 4, 4096));
-	gem_write(i915, handle, offset, &bbe, sizeof(bbe));
-
-	return handle;
-}
-
-static uint32_t batch_create(int i915)
-{
-	return __batch_create(i915, 0);
-}
-
-static void check_same_vm(int i915, uint32_t ctx_a, uint32_t ctx_b)
-{
-	struct drm_i915_gem_exec_object2 batch = {
-		.handle = batch_create(i915),
-	};
-	struct drm_i915_gem_execbuffer2 eb = {
-		.buffers_ptr = to_user_pointer(&batch),
-		.buffer_count = 1,
-	};
-
-	/* First verify that we try to use "softpinning" by default */
-	batch.offset = 48 << 20;
-	eb.rsvd1 = ctx_a;
-	gem_execbuf(i915, &eb);
-	igt_assert_eq_u64(batch.offset, 48 << 20);
-
-	/* An already active VMA will try to keep its offset */
-	batch.offset = 0;
-	eb.rsvd1 = ctx_b;
-	gem_execbuf(i915, &eb);
-	igt_assert_eq_u64(batch.offset, 48 << 20);
-
-	gem_sync(i915, batch.handle);
-	gem_close(i915, batch.handle);
-
-	gem_quiescent_gpu(i915); /* evict the vma */
-}
-
-static void clone_vm(int i915)
-{
-	struct drm_i915_gem_context_param set = {
-		.param = I915_CONTEXT_PARAM_VM,
-	};
-	struct drm_i915_gem_context_create_ext_clone ext = {
-		{ .name = I915_CONTEXT_CREATE_EXT_CLONE },
-		.flags = I915_CONTEXT_CLONE_VM,
-	};
-	struct drm_i915_gem_context_create_ext create = {
-		.flags = I915_CONTEXT_CREATE_FLAGS_USE_EXTENSIONS,
-		.extensions = to_user_pointer(&ext),
-	};
-	uint32_t vm_id[2];
-
-	igt_require(__gem_context_set_param(i915, &set) == -ENOENT);
-
-	/* Scrub the VM for our tests */
-	i915 = gem_reopen_driver(i915);
-
-	set.ctx_id = gem_context_create(i915);
-	gem_context_get_param(i915, &set);
-	vm_id[0] = set.value;
-	gem_context_destroy(i915, set.ctx_id);
-
-	vm_id[1] = gem_vm_create(i915);
-
-	for (int pass = 0; pass < 2; pass++) { /* cloning default, then child */
-		igt_debug("Cloning %d\n", ext.clone_id);
-
-		igt_assert_eq(ctx_create_ioctl(i915, &create), 0);
-		check_same_vm(i915, ext.clone_id, create.ctx_id);
-		gem_context_destroy(i915, create.ctx_id);
-
-		set.value = vm_id[pass];
-		set.ctx_id = ext.clone_id;
-		gem_context_set_param(i915, &set);
-
-		igt_assert_eq(ctx_create_ioctl(i915, &create), 0);
-		check_same_vm(i915, ext.clone_id, create.ctx_id);
-		gem_context_destroy(i915, create.ctx_id);
-
-		ext.clone_id = gem_context_create(i915);
-	}
-
-	gem_context_destroy(i915, ext.clone_id);
-
-	for (int i = 0; i < ARRAY_SIZE(vm_id); i++)
-		gem_vm_destroy(i915, vm_id[i]);
-
-	close(i915);
-}
-
-igt_main
-{
-	int i915 = -1;
-
-	igt_fixture {
-		i915 = drm_open_driver(DRIVER_INTEL);
-		igt_require_gem(i915);
-		gem_require_contexts(i915);
-
-		igt_require(gem_has_context_clone(i915));
-		igt_fork_hang_detector(i915);
-	}
-
-	igt_subtest("invalid")
-		invalid_clone(i915);
-
-	igt_subtest("engines")
-		clone_engines(i915);
-
-	igt_subtest("flags")
-		clone_flags(i915);
-
-	igt_subtest("scheduler")
-		clone_scheduler(i915);
-
-	igt_subtest("vm")
-		clone_vm(i915);
-
-	igt_fixture {
-		igt_stop_hang_detector();
-		close(i915);
-	}
-}
diff --git a/tests/meson.build b/tests/meson.build
index c85768e1..45c07763 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -127,7 +127,6 @@ i915_progs = [
 	'gem_concurrent_blit',
 	'gem_cs_tlb',
 	'gem_ctx_bad_destroy',
-	'gem_ctx_clone',
 	'gem_ctx_create',
 	'gem_ctx_engines',
 	'gem_ctx_exec',
-- 
2.29.2

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

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [igt-dev] [PATCH i-g-t 6/9] tests/i915/gem_ctx_create: Stop cloning engines
  2021-03-22 20:41 ` [igt-dev] [PATCH i-g-t 0/9] Adjust IGT for upstream API clean-ups (v2) Jason Ekstrand
                     ` (4 preceding siblings ...)
  2021-03-22 20:41   ` [igt-dev] [PATCH i-g-t 5/9] tests/i915: Drop gem_ctx_clone Jason Ekstrand
@ 2021-03-22 20:41   ` Jason Ekstrand
  2021-03-22 20:41   ` [igt-dev] [PATCH i-g-t 7/9] tests/i915/gem_ctx_persistence: Drop the clone test Jason Ekstrand
                     ` (6 subsequent siblings)
  12 siblings, 0 replies; 44+ messages in thread
From: Jason Ekstrand @ 2021-03-22 20:41 UTC (permalink / raw)
  To: igt-dev

There's no reason to clone engines here, especially when context 0 is
just a default context so creating a new context will have the same
engines as context 0.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 tests/i915/gem_ctx_create.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/tests/i915/gem_ctx_create.c b/tests/i915/gem_ctx_create.c
index 9a512a03..7d2ee8fb 100644
--- a/tests/i915/gem_ctx_create.c
+++ b/tests/i915/gem_ctx_create.c
@@ -299,9 +299,7 @@ static void maximum(int fd, int ncpus, unsigned mode)
 
 		err = -ENOMEM;
 		if (avail_mem > (count + 1) * ctx_size)
-			err =  __gem_context_clone(fd, 0,
-						   I915_CONTEXT_CLONE_ENGINES,
-						   0, &ctx_id);
+			err =  __gem_context_create(fd, &ctx_id);
 		if (err) {
 			igt_info("Created %lu contexts, before failing with '%s' [%d]\n",
 				 count, strerror(-err), -err);
-- 
2.29.2

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

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [igt-dev] [PATCH i-g-t 7/9] tests/i915/gem_ctx_persistence: Drop the clone test
  2021-03-22 20:41 ` [igt-dev] [PATCH i-g-t 0/9] Adjust IGT for upstream API clean-ups (v2) Jason Ekstrand
                     ` (5 preceding siblings ...)
  2021-03-22 20:41   ` [igt-dev] [PATCH i-g-t 6/9] tests/i915/gem_ctx_create: Stop cloning engines Jason Ekstrand
@ 2021-03-22 20:41   ` Jason Ekstrand
  2021-03-22 20:41   ` [igt-dev] [PATCH i-g-t 8/9] tests/i915/gem_exec_balancer: Stop cloning engines Jason Ekstrand
                     ` (5 subsequent siblings)
  12 siblings, 0 replies; 44+ messages in thread
From: Jason Ekstrand @ 2021-03-22 20:41 UTC (permalink / raw)
  To: igt-dev

We're going to be deleting the CONTEXT_CLONE API since IGT is the only
userspace to ever use it.  Drop the tests for it.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 tests/i915/gem_ctx_persistence.c | 30 ------------------------------
 1 file changed, 30 deletions(-)

diff --git a/tests/i915/gem_ctx_persistence.c b/tests/i915/gem_ctx_persistence.c
index 10d057f1..91c30176 100644
--- a/tests/i915/gem_ctx_persistence.c
+++ b/tests/i915/gem_ctx_persistence.c
@@ -147,33 +147,6 @@ static void test_idempotent(int i915)
 	igt_assert_eq(p.value, expected);
 }
 
-static void test_clone(int i915)
-{
-	struct drm_i915_gem_context_param p = {
-		.param = I915_CONTEXT_PARAM_PERSISTENCE,
-	};
-	uint32_t ctx, clone;
-
-	/*
-	 * Check that persistence is inherited across a clone.
-	 */
-	igt_require( __gem_context_create(i915, &ctx) == 0);
-
-	p.ctx_id = ctx;
-	p.value = 0;
-	gem_context_set_param(i915, &p);
-
-	clone = gem_context_clone(i915, ctx, I915_CONTEXT_CLONE_FLAGS, 0);
-	gem_context_destroy(i915, ctx);
-
-	p.ctx_id = clone;
-	p.value = -1;
-	gem_context_get_param(i915, &p);
-	igt_assert_eq(p.value, 0);
-
-	gem_context_destroy(i915, clone);
-}
-
 static void test_persistence(int i915, unsigned int engine)
 {
 	igt_spin_t *spin;
@@ -1366,9 +1339,6 @@ igt_main
 	igt_subtest("idempotent")
 		test_idempotent(i915);
 
-	igt_subtest("clone")
-		test_clone(i915);
-
 	igt_subtest("file")
 		test_nonpersistent_file(i915);
 
-- 
2.29.2

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

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [igt-dev] [PATCH i-g-t 8/9] tests/i915/gem_exec_balancer: Stop cloning engines
  2021-03-22 20:41 ` [igt-dev] [PATCH i-g-t 0/9] Adjust IGT for upstream API clean-ups (v2) Jason Ekstrand
                     ` (6 preceding siblings ...)
  2021-03-22 20:41   ` [igt-dev] [PATCH i-g-t 7/9] tests/i915/gem_ctx_persistence: Drop the clone test Jason Ekstrand
@ 2021-03-22 20:41   ` Jason Ekstrand
  2021-03-22 20:41   ` [igt-dev] [PATCH i-g-t 9/9] lib/i915/gem_context: Implement VM and engine cloning manually (v2) Jason Ekstrand
                     ` (4 subsequent siblings)
  12 siblings, 0 replies; 44+ messages in thread
From: Jason Ekstrand @ 2021-03-22 20:41 UTC (permalink / raw)
  To: igt-dev

We've got the parameters to setup the balancer right there; we may as
well use them directly.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
---
 tests/i915/gem_exec_balancer.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/tests/i915/gem_exec_balancer.c b/tests/i915/gem_exec_balancer.c
index bfd65b29..19948ecb 100644
--- a/tests/i915/gem_exec_balancer.c
+++ b/tests/i915/gem_exec_balancer.c
@@ -826,8 +826,8 @@ static void bonded_slice(int i915)
 		igt_fork(child, count + 1) { /* C: arbitrary background load */
 			igt_list_del(&spin->link);
 
-			ctx = gem_context_clone(i915, ctx,
-						I915_CONTEXT_CLONE_ENGINES, 0);
+			ctx = gem_context_create(i915);
+			set_load_balancer(i915, ctx, siblings, count, NULL);
 
 			while (!READ_ONCE(*stop)) {
 				spin = igt_spin_new(i915,
@@ -2442,8 +2442,7 @@ static void nop(int i915)
 				.buffers_ptr = to_user_pointer(&batch),
 				.buffer_count = 1,
 				.flags = child + 1,
-				.rsvd1 = gem_context_clone(i915, ctx,
-							   I915_CONTEXT_CLONE_ENGINES, 0),
+				.rsvd1 = load_balancer_create(i915, ci, count),
 			};
 			struct timespec tv = {};
 			unsigned long nops;
-- 
2.29.2

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

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [igt-dev] [PATCH i-g-t 9/9] lib/i915/gem_context: Implement VM and engine cloning manually (v2)
  2021-03-22 20:41 ` [igt-dev] [PATCH i-g-t 0/9] Adjust IGT for upstream API clean-ups (v2) Jason Ekstrand
                     ` (7 preceding siblings ...)
  2021-03-22 20:41   ` [igt-dev] [PATCH i-g-t 8/9] tests/i915/gem_exec_balancer: Stop cloning engines Jason Ekstrand
@ 2021-03-22 20:41   ` Jason Ekstrand
  2021-03-22 21:48     ` [igt-dev] [PATCH i-g-t 9/9] lib/i915/gem_context: Implement VM and engine cloning manually (v3) Jason Ekstrand
  2021-03-23  3:51   ` Jason Ekstrand
                     ` (3 subsequent siblings)
  12 siblings, 1 reply; 44+ messages in thread
From: Jason Ekstrand @ 2021-03-22 20:41 UTC (permalink / raw)
  To: igt-dev

We're going to be deleting the CONTEXT_CLONE API since IGT is the only
userspace to ever use it.  There are only two bits of this API that IGT
uses in interesting ways so implement them as create params instead of
cloning.

v2 (Jason Ekstrand):
 - Fix our usage of the param struct for VM cloning
 - Handle the case of zero user engines properly
 - Assert that all cloned engines are physical, not virtual

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
---
 lib/i915/gem_context.c         | 109 ++++++++++++++++++++++++++-------
 lib/i915/gem_context.h         |   7 ++-
 tests/i915/gem_ctx_shared.c    |  10 +--
 tests/i915/gem_exec_balancer.c |   2 +-
 tests/i915/gem_exec_schedule.c |   8 +--
 5 files changed, 103 insertions(+), 33 deletions(-)

diff --git a/lib/i915/gem_context.c b/lib/i915/gem_context.c
index 79411e10..ff018880 100644
--- a/lib/i915/gem_context.c
+++ b/lib/i915/gem_context.c
@@ -334,28 +334,96 @@ bool gem_context_has_persistence(int i915)
 	return __gem_context_get_param(i915, &param) == 0;
 }
 
+static void
+add_ctx_create_ext(struct drm_i915_gem_context_create_ext *ctx,
+		   struct i915_user_extension *ext)
+{
+	ext->next_extension = ctx->extensions;
+	ctx->extensions = to_user_pointer(ext);
+}
+
 int
 __gem_context_clone(int i915,
-		    uint32_t src, unsigned int share,
+		    uint32_t src, unsigned int clone,
 		    unsigned int flags,
 		    uint32_t *out)
 {
-	struct drm_i915_gem_context_create_ext_clone clone = {
-		{ .name = I915_CONTEXT_CREATE_EXT_CLONE },
-		.clone_id = src,
-		.flags = share,
-	};
-	struct drm_i915_gem_context_create_ext arg = {
+	I915_DEFINE_CONTEXT_PARAM_ENGINES(engines, I915_EXEC_RING_MASK + 1);
+	struct drm_i915_gem_context_create_ext_setparam engines_param, vm_param;
+	unsigned i, count;
+	int err;
+
+	struct drm_i915_gem_context_create_ext ctx_create = {
 		.flags = flags | I915_CONTEXT_CREATE_FLAGS_USE_EXTENSIONS,
-		.extensions = to_user_pointer(&clone),
+		.extensions = 0,
 	};
-	int err;
 
-	err = create_ext_ioctl(i915, &arg);
+	if (clone & GEM_CONTEXT_CLONE_ENGINES) {
+		engines_param = (struct drm_i915_gem_context_create_ext_setparam) {
+			.base = {
+				.name = I915_CONTEXT_CREATE_EXT_SETPARAM,
+			},
+			.param = {
+				.param = I915_CONTEXT_PARAM_ENGINES,
+				.size = sizeof(engines),
+				.value = to_user_pointer(&engines),
+			},
+		};
+
+		engines_param.param.ctx_id = src;
+		err = __gem_context_get_param(i915, &engines_param.param);
+		igt_assert_eq(err, 0);
+		if (err)
+			return err;
+
+		if (engines_param.param.size > 0) {
+			igt_assert(engines_param.param.size > sizeof(uint64_t));
+			count = (engines_param.param.size - sizeof(uint64_t)) /
+				sizeof(struct i915_engine_class_instance);
+
+			igt_debug("Cloning context with %u engines:\n", count);
+			for (i = 0; i < count; i++) {
+				igt_debug("    %d, %d\n",
+					  (int)(int16_t)engines.engines[i].engine_class,
+					  (int)(int16_t)engines.engines[i].engine_instance);
+				/* We can't clone virtual engines */
+				igt_assert((int16_t)engines.engines[i].engine_class >= 0);
+				igt_assert((int16_t)engines.engines[i].engine_instance >= 0);
+			}
+
+			engines_param.param.ctx_id = 0;
+			add_ctx_create_ext(&ctx_create, &engines_param.base);
+		}
+	}
+
+	if (clone & GEM_CONTEXT_CLONE_VM) {
+		vm_param = (struct drm_i915_gem_context_create_ext_setparam) {
+			.base = {
+				.name = I915_CONTEXT_CREATE_EXT_SETPARAM,
+			},
+			.param = {
+				.param = I915_CONTEXT_PARAM_VM,
+			},
+		};
+
+		vm_param.param.ctx_id = src;
+		err = __gem_context_get_param(i915, &vm_param.param);
+		igt_assert_eq(err, 0);
+		if (err)
+			return err;
+
+		igt_debug("vm: %d\n", (int)vm_param.param.value);
+
+		vm_param.param.ctx_id = 0;
+		add_ctx_create_ext(&ctx_create, &vm_param.base);
+	}
+
+	err = create_ext_ioctl(i915, &ctx_create);
+	igt_assert_eq(err, 0);
 	if (err)
 		return err;
 
-	*out = arg.ctx_id;
+	*out = ctx_create.ctx_id;
 	return 0;
 }
 
@@ -373,23 +441,22 @@ static bool __gem_context_has(int i915, uint32_t share, unsigned int flags)
 
 bool gem_contexts_has_shared_gtt(int i915)
 {
-	return __gem_context_has(i915, I915_CONTEXT_CLONE_VM, 0);
+	return __gem_context_has(i915, GEM_CONTEXT_CLONE_VM, 0);
 }
 
 bool gem_has_queues(int i915)
 {
-	return __gem_context_has(i915,
-				 I915_CONTEXT_CLONE_VM,
+	return __gem_context_has(i915, GEM_CONTEXT_CLONE_VM,
 				 I915_CONTEXT_CREATE_FLAGS_SINGLE_TIMELINE);
 }
 
 uint32_t gem_context_clone(int i915,
-			   uint32_t src, unsigned int share,
+			   uint32_t src, unsigned int clone,
 			   unsigned int flags)
 {
 	uint32_t ctx;
 
-	igt_assert_eq(__gem_context_clone(i915, src, share, flags, &ctx), 0);
+	igt_assert_eq(__gem_context_clone(i915, src, clone, flags, &ctx), 0);
 
 	return ctx;
 }
@@ -426,15 +493,15 @@ uint32_t gem_context_clone_with_engines(int i915, uint32_t src)
 	if (!gem_has_context_clone(i915))
 		return gem_context_create(i915);
 	else
-		return gem_context_clone(i915, src, I915_CONTEXT_CLONE_ENGINES,
+		return gem_context_clone(i915, src, GEM_CONTEXT_CLONE_ENGINES,
 					 0);
 }
 
 uint32_t gem_queue_create(int i915)
 {
 	return gem_context_clone(i915, 0,
-				 I915_CONTEXT_CLONE_VM |
-				 I915_CONTEXT_CLONE_ENGINES,
+				 GEM_CONTEXT_CLONE_VM |
+				 GEM_CONTEXT_CLONE_ENGINES,
 				 I915_CONTEXT_CREATE_FLAGS_SINGLE_TIMELINE);
 }
 
@@ -448,8 +515,8 @@ uint32_t gem_queue_create(int i915)
 uint32_t gem_queue_clone_with_engines(int i915, uint32_t src)
 {
 	return gem_context_clone(i915, src,
-				 I915_CONTEXT_CLONE_ENGINES |
-				 I915_CONTEXT_CLONE_VM,
+				 GEM_CONTEXT_CLONE_ENGINES |
+				 GEM_CONTEXT_CLONE_VM,
 				 I915_CONTEXT_CREATE_FLAGS_SINGLE_TIMELINE);
 }
 
diff --git a/lib/i915/gem_context.h b/lib/i915/gem_context.h
index c2c2b827..e583ce09 100644
--- a/lib/i915/gem_context.h
+++ b/lib/i915/gem_context.h
@@ -37,12 +37,15 @@ int __gem_context_destroy(int fd, uint32_t ctx_id);
 uint32_t gem_context_create_for_engine(int fd, unsigned int class, unsigned int inst);
 uint32_t gem_context_create_for_class(int i915, unsigned int class, unsigned int *count);
 
+#define GEM_CONTEXT_CLONE_ENGINES (1 << 4)
+#define GEM_CONTEXT_CLONE_VM (1 << 5)
+
 int __gem_context_clone(int i915,
-			uint32_t src, unsigned int share,
+			uint32_t src, unsigned int clone,
 			unsigned int flags,
 			uint32_t *out);
 uint32_t gem_context_clone(int i915,
-			   uint32_t src, unsigned int share,
+			   uint32_t src, unsigned int clone,
 			   unsigned int flags);
 uint32_t gem_context_clone_with_engines(int i915, uint32_t src);
 void gem_context_copy_engines(int src_fd, uint32_t src,
diff --git a/tests/i915/gem_ctx_shared.c b/tests/i915/gem_ctx_shared.c
index 6b21994d..21b07083 100644
--- a/tests/i915/gem_ctx_shared.c
+++ b/tests/i915/gem_ctx_shared.c
@@ -82,7 +82,7 @@ static void create_shared_gtt(int i915, unsigned int flags)
 	igt_until_timeout(2) {
 		parent = flags & DETACHED ? child : 0;
 		child = gem_context_clone(i915,
-					  parent, I915_CONTEXT_CLONE_VM,
+					  parent, GEM_CONTEXT_CLONE_VM,
 					  0);
 		execbuf.rsvd1 = child;
 		gem_execbuf(i915, &execbuf);
@@ -98,7 +98,7 @@ static void create_shared_gtt(int i915, unsigned int flags)
 		execbuf.rsvd1 = parent;
 		igt_assert_eq(__gem_execbuf(i915, &execbuf), -ENOENT);
 		igt_assert_eq(__gem_context_clone(i915,
-						  parent, I915_CONTEXT_CLONE_VM,
+						  parent, GEM_CONTEXT_CLONE_VM,
 						  0, &parent), -ENOENT);
 	}
 	if (flags & DETACHED)
@@ -121,7 +121,7 @@ static void disjoint_timelines(int i915)
 	 * distinct timelines. A request queued to one context should be
 	 * independent of any shared contexts.
 	 */
-	child = gem_context_clone(i915, 0, I915_CONTEXT_CLONE_VM, 0);
+	child = gem_context_clone(i915, 0, GEM_CONTEXT_CLONE_VM, 0);
 	plug = igt_cork_plug(&cork, i915);
 
 	spin[0] = __igt_spin_new(i915, .ctx = 0, .dependency = plug);
@@ -161,7 +161,7 @@ static void exhaust_shared_gtt(int i915, unsigned int flags)
 		for (;;) {
 			parent = child;
 			err = __gem_context_clone(i915,
-						  parent, I915_CONTEXT_CLONE_VM,
+						  parent, GEM_CONTEXT_CLONE_VM,
 						  0, &child);
 			if (err)
 				break;
@@ -201,7 +201,7 @@ static void exec_shared_gtt(int i915, unsigned int ring)
 	int timeline;
 	int i;
 
-	clone = gem_context_clone(i915, 0, I915_CONTEXT_CLONE_VM, 0);
+	clone = gem_context_clone(i915, 0, GEM_CONTEXT_CLONE_VM, 0);
 
 	/* Find a hole big enough for both objects later */
 	scratch = gem_create(i915, 16384);
diff --git a/tests/i915/gem_exec_balancer.c b/tests/i915/gem_exec_balancer.c
index 19948ecb..5c0f52a6 100644
--- a/tests/i915/gem_exec_balancer.c
+++ b/tests/i915/gem_exec_balancer.c
@@ -627,7 +627,7 @@ static void bonded(int i915, unsigned int flags)
 		}
 
 		ctx = gem_context_clone(i915,
-					master, I915_CONTEXT_CLONE_VM,
+					master, GEM_CONTEXT_CLONE_VM,
 					I915_CONTEXT_CREATE_FLAGS_SINGLE_TIMELINE);
 		set_load_balancer(i915, ctx, siblings, count, &bonds[limit - 1]);
 
diff --git a/tests/i915/gem_exec_schedule.c b/tests/i915/gem_exec_schedule.c
index 9585059d..aedcdf33 100644
--- a/tests/i915/gem_exec_schedule.c
+++ b/tests/i915/gem_exec_schedule.c
@@ -1183,8 +1183,8 @@ noreorder(int i915, unsigned int engine, int prio, unsigned int flags)
 		fence = igt_cork_plug(&cork, i915);
 
 	ctx = gem_context_clone(i915, execbuf.rsvd1,
-			      I915_CONTEXT_CLONE_ENGINES |
-			      I915_CONTEXT_CLONE_VM,
+			      GEM_CONTEXT_CLONE_ENGINES |
+			      GEM_CONTEXT_CLONE_VM,
 			      0);
 	spin = igt_spin_new(i915, ctx,
 			    .engine = engine,
@@ -2428,9 +2428,9 @@ static void *iova_thread(struct ufd_thread *t, int prio)
 	unsigned int clone;
 	uint32_t ctx;
 
-	clone = I915_CONTEXT_CLONE_ENGINES;
+	clone = GEM_CONTEXT_CLONE_ENGINES;
 	if (t->flags & SHARED)
-		clone |= I915_CONTEXT_CLONE_VM;
+		clone |= GEM_CONTEXT_CLONE_VM;
 
 	ctx = gem_context_clone(t->i915, 0, clone, 0);
 	gem_context_set_priority(t->i915, ctx, prio);
-- 
2.29.2

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

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* Re: [igt-dev] [PATCH i-g-t 8/8] lib/i915/gem_context: Implement VM and engine cloning manually
  2021-03-22 19:25   ` Daniel Vetter
@ 2021-03-22 20:42     ` Jason Ekstrand
  0 siblings, 0 replies; 44+ messages in thread
From: Jason Ekstrand @ 2021-03-22 20:42 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: IGT GPU Tools

On Mon, Mar 22, 2021 at 2:25 PM Daniel Vetter <daniel@ffwll.ch> wrote:
>
> On Fri, Mar 19, 2021 at 05:32:33PM -0500, Jason Ekstrand wrote:
> > We're going to be deleting the CONTEXT_CLONE API since IGT is the only
> > userspace to ever use it.  There are only two bits of this API that IGT
> > uses in interesting ways so implement them as create params instead of
> > cloning.
>
> I think this works, only major concern I have: Do we have a userspace that
> uses getparam with the engine param?

Not sure.  I kind-of doubt it.  Also, the getparam has some pretty
ugly corners.  If the client hasn't explicitly set any engines, it
doesn't return any so there's no "get me the default".  This makes me
suspect the answer is "no".

There are a few tests which use the engine clone for a useful purpose.
It could be plumbed through but it'd be semi-annoying.  That said,
it's only 1-2 tests so I could probably do that easily enough.

--Jason

> vm_id I know we need to keep working
> in some form, but engines I've not seen. And keeping the getparam working
> just for igt isn't much better than keeping clone working.
>
> Maybe we need to limit this to just VM sharing, and open code the other
> users in the test directly.
>
> Once that's sorted: For at least the functions you're touching, can you
> pls add gtkdoc in the libraries and wire it up for the doc build? I know
> in the past especially gem igt libarary code has been extremely lacking on
> this, but we need to start somewhere with better test code. This is as
> good a place as any. For that perhaps check with Petri and Zbyscek on irc
> how to get the doc build going, it's a bit an adventure unfortunately.
>
> Also I do wonder how much more fallout we'll see once we start to lock
> down the contexts after the first execbuf.
>
> Also needs sob.
>
> > ---
> >  lib/i915/gem_context.c         | 90 ++++++++++++++++++++++++++--------
> >  lib/i915/gem_context.h         |  7 ++-
> >  tests/i915/gem_ctx_shared.c    | 10 ++--
> >  tests/i915/gem_exec_balancer.c |  6 +--
> >  tests/i915/gem_exec_schedule.c |  8 +--
> >  5 files changed, 86 insertions(+), 35 deletions(-)
> >
> > diff --git a/lib/i915/gem_context.c b/lib/i915/gem_context.c
> > index 79411e10..ed56d974 100644
> > --- a/lib/i915/gem_context.c
> > +++ b/lib/i915/gem_context.c
> > @@ -334,28 +334,77 @@ bool gem_context_has_persistence(int i915)
> >       return __gem_context_get_param(i915, &param) == 0;
> >  }
> >
> > +static void
> > +add_ctx_create_ext(struct drm_i915_gem_context_create_ext *ctx,
> > +                struct i915_user_extension *ext)
> > +{
> > +     ext->next_extension = ctx->extensions;
> > +     ctx->extensions = to_user_pointer(ext);
> > +}
> > +
> >  int
> >  __gem_context_clone(int i915,
> > -                 uint32_t src, unsigned int share,
> > +                 uint32_t src, unsigned int clone,
> >                   unsigned int flags,
> >                   uint32_t *out)
> >  {
> > -     struct drm_i915_gem_context_create_ext_clone clone = {
> > -             { .name = I915_CONTEXT_CREATE_EXT_CLONE },
> > -             .clone_id = src,
> > -             .flags = share,
> > -     };
> > -     struct drm_i915_gem_context_create_ext arg = {
> > +     I915_DEFINE_CONTEXT_PARAM_ENGINES(engines, I915_EXEC_RING_MASK + 1);
> > +     uint32_t vm;
> > +     struct drm_i915_gem_context_create_ext_setparam engines_param, vm_param;
> > +     int err;
> > +
> > +     struct drm_i915_gem_context_create_ext ctx_create = {
> >               .flags = flags | I915_CONTEXT_CREATE_FLAGS_USE_EXTENSIONS,
> > -             .extensions = to_user_pointer(&clone),
> > +             .extensions = 0,
> >       };
> > -     int err;
> >
> > -     err = create_ext_ioctl(i915, &arg);
> > +     if (clone & GEM_CONTEXT_CLONE_ENGINES) {
> > +             engines_param = (struct drm_i915_gem_context_create_ext_setparam) {
> > +                     .base = {
> > +                             .name = I915_CONTEXT_CREATE_EXT_SETPARAM,
> > +                     },
> > +                     .param = {
> > +                             .param = I915_CONTEXT_PARAM_ENGINES,
> > +                             .size = sizeof(engines),
> > +                             .value = to_user_pointer(&engines),
> > +                     },
> > +             };
> > +
> > +             engines_param.param.ctx_id = src;
> > +             err = __gem_context_get_param(i915, &engines_param.param);
> > +             if (err)
> > +                     return err;
> > +
> > +             engines_param.param.ctx_id = 0;
> > +             add_ctx_create_ext(&ctx_create, &engines_param.base);
> > +     }
> > +
> > +     if (clone & GEM_CONTEXT_CLONE_VM) {
> > +             vm_param = (struct drm_i915_gem_context_create_ext_setparam) {
> > +                     .base = {
> > +                             .name = I915_CONTEXT_CREATE_EXT_SETPARAM,
> > +                     },
> > +                     .param = {
> > +                             .param = I915_CONTEXT_PARAM_VM,
> > +                             .size = sizeof(vm),
> > +                             .value = to_user_pointer(&vm),
> > +                     },
> > +             };
> > +
> > +             vm_param.param.ctx_id = src;
> > +             err = __gem_context_get_param(i915, &vm_param.param);
> > +             if (err)
> > +                     return err;
> > +
> > +             vm_param.param.ctx_id = 0;
> > +             add_ctx_create_ext(&ctx_create, &vm_param.base);
> > +     }
> > +
> > +     err = create_ext_ioctl(i915, &ctx_create);
> >       if (err)
> >               return err;
> >
> > -     *out = arg.ctx_id;
> > +     *out = ctx_create.ctx_id;
> >       return 0;
> >  }
> >
> > @@ -373,23 +422,22 @@ static bool __gem_context_has(int i915, uint32_t share, unsigned int flags)
> >
> >  bool gem_contexts_has_shared_gtt(int i915)
> >  {
> > -     return __gem_context_has(i915, I915_CONTEXT_CLONE_VM, 0);
> > +     return __gem_context_has(i915, GEM_CONTEXT_CLONE_VM, 0);
> >  }
> >
> >  bool gem_has_queues(int i915)
> >  {
> > -     return __gem_context_has(i915,
> > -                              I915_CONTEXT_CLONE_VM,
> > +     return __gem_context_has(i915, GEM_CONTEXT_CLONE_VM,
> >                                I915_CONTEXT_CREATE_FLAGS_SINGLE_TIMELINE);
> >  }
> >
> >  uint32_t gem_context_clone(int i915,
> > -                        uint32_t src, unsigned int share,
> > +                        uint32_t src, unsigned int clone,
> >                          unsigned int flags)
> >  {
> >       uint32_t ctx;
> >
> > -     igt_assert_eq(__gem_context_clone(i915, src, share, flags, &ctx), 0);
> > +     igt_assert_eq(__gem_context_clone(i915, src, clone, flags, &ctx), 0);
> >
> >       return ctx;
> >  }
> > @@ -426,15 +474,15 @@ uint32_t gem_context_clone_with_engines(int i915, uint32_t src)
> >       if (!gem_has_context_clone(i915))
> >               return gem_context_create(i915);
> >       else
> > -             return gem_context_clone(i915, src, I915_CONTEXT_CLONE_ENGINES,
> > +             return gem_context_clone(i915, src, GEM_CONTEXT_CLONE_ENGINES,
> >                                        0);
> >  }
> >
> >  uint32_t gem_queue_create(int i915)
> >  {
> >       return gem_context_clone(i915, 0,
> > -                              I915_CONTEXT_CLONE_VM |
> > -                              I915_CONTEXT_CLONE_ENGINES,
> > +                              GEM_CONTEXT_CLONE_VM |
> > +                              GEM_CONTEXT_CLONE_ENGINES,
> >                                I915_CONTEXT_CREATE_FLAGS_SINGLE_TIMELINE);
> >  }
> >
> > @@ -448,8 +496,8 @@ uint32_t gem_queue_create(int i915)
> >  uint32_t gem_queue_clone_with_engines(int i915, uint32_t src)
> >  {
> >       return gem_context_clone(i915, src,
> > -                              I915_CONTEXT_CLONE_ENGINES |
> > -                              I915_CONTEXT_CLONE_VM,
> > +                              GEM_CONTEXT_CLONE_ENGINES |
> > +                              GEM_CONTEXT_CLONE_VM,
> >                                I915_CONTEXT_CREATE_FLAGS_SINGLE_TIMELINE);
> >  }
> >
> > diff --git a/lib/i915/gem_context.h b/lib/i915/gem_context.h
> > index c2c2b827..e583ce09 100644
> > --- a/lib/i915/gem_context.h
> > +++ b/lib/i915/gem_context.h
> > @@ -37,12 +37,15 @@ int __gem_context_destroy(int fd, uint32_t ctx_id);
> >  uint32_t gem_context_create_for_engine(int fd, unsigned int class, unsigned int inst);
> >  uint32_t gem_context_create_for_class(int i915, unsigned int class, unsigned int *count);
> >
> > +#define GEM_CONTEXT_CLONE_ENGINES (1 << 4)
> > +#define GEM_CONTEXT_CLONE_VM (1 << 5)
>
> At least in the kernel we tend to make these enums so you have a place to
> put docs, but not sure about igt.
> -Daniel
>
> > +
> >  int __gem_context_clone(int i915,
> > -                     uint32_t src, unsigned int share,
> > +                     uint32_t src, unsigned int clone,
> >                       unsigned int flags,
> >                       uint32_t *out);
> >  uint32_t gem_context_clone(int i915,
> > -                        uint32_t src, unsigned int share,
> > +                        uint32_t src, unsigned int clone,
> >                          unsigned int flags);
> >  uint32_t gem_context_clone_with_engines(int i915, uint32_t src);
> >  void gem_context_copy_engines(int src_fd, uint32_t src,
> > diff --git a/tests/i915/gem_ctx_shared.c b/tests/i915/gem_ctx_shared.c
> > index 6b21994d..21b07083 100644
> > --- a/tests/i915/gem_ctx_shared.c
> > +++ b/tests/i915/gem_ctx_shared.c
> > @@ -82,7 +82,7 @@ static void create_shared_gtt(int i915, unsigned int flags)
> >       igt_until_timeout(2) {
> >               parent = flags & DETACHED ? child : 0;
> >               child = gem_context_clone(i915,
> > -                                       parent, I915_CONTEXT_CLONE_VM,
> > +                                       parent, GEM_CONTEXT_CLONE_VM,
> >                                         0);
> >               execbuf.rsvd1 = child;
> >               gem_execbuf(i915, &execbuf);
> > @@ -98,7 +98,7 @@ static void create_shared_gtt(int i915, unsigned int flags)
> >               execbuf.rsvd1 = parent;
> >               igt_assert_eq(__gem_execbuf(i915, &execbuf), -ENOENT);
> >               igt_assert_eq(__gem_context_clone(i915,
> > -                                               parent, I915_CONTEXT_CLONE_VM,
> > +                                               parent, GEM_CONTEXT_CLONE_VM,
> >                                                 0, &parent), -ENOENT);
> >       }
> >       if (flags & DETACHED)
> > @@ -121,7 +121,7 @@ static void disjoint_timelines(int i915)
> >        * distinct timelines. A request queued to one context should be
> >        * independent of any shared contexts.
> >        */
> > -     child = gem_context_clone(i915, 0, I915_CONTEXT_CLONE_VM, 0);
> > +     child = gem_context_clone(i915, 0, GEM_CONTEXT_CLONE_VM, 0);
> >       plug = igt_cork_plug(&cork, i915);
> >
> >       spin[0] = __igt_spin_new(i915, .ctx = 0, .dependency = plug);
> > @@ -161,7 +161,7 @@ static void exhaust_shared_gtt(int i915, unsigned int flags)
> >               for (;;) {
> >                       parent = child;
> >                       err = __gem_context_clone(i915,
> > -                                               parent, I915_CONTEXT_CLONE_VM,
> > +                                               parent, GEM_CONTEXT_CLONE_VM,
> >                                                 0, &child);
> >                       if (err)
> >                               break;
> > @@ -201,7 +201,7 @@ static void exec_shared_gtt(int i915, unsigned int ring)
> >       int timeline;
> >       int i;
> >
> > -     clone = gem_context_clone(i915, 0, I915_CONTEXT_CLONE_VM, 0);
> > +     clone = gem_context_clone(i915, 0, GEM_CONTEXT_CLONE_VM, 0);
> >
> >       /* Find a hole big enough for both objects later */
> >       scratch = gem_create(i915, 16384);
> > diff --git a/tests/i915/gem_exec_balancer.c b/tests/i915/gem_exec_balancer.c
> > index 9feb20fb..64ad259c 100644
> > --- a/tests/i915/gem_exec_balancer.c
> > +++ b/tests/i915/gem_exec_balancer.c
> > @@ -627,7 +627,7 @@ static void bonded(int i915, unsigned int flags)
> >               }
> >
> >               ctx = gem_context_clone(i915,
> > -                                     master, I915_CONTEXT_CLONE_VM,
> > +                                     master, GEM_CONTEXT_CLONE_VM,
> >                                       I915_CONTEXT_CREATE_FLAGS_SINGLE_TIMELINE);
> >               set_load_balancer(i915, ctx, siblings, count, &bonds[limit - 1]);
> >
> > @@ -827,7 +827,7 @@ static void bonded_slice(int i915)
> >                       igt_list_del(&spin->link);
> >
> >                       ctx = gem_context_clone(i915, ctx,
> > -                                             I915_CONTEXT_CLONE_ENGINES, 0);
> > +                                             GEM_CONTEXT_CLONE_ENGINES, 0);
> >
> >                       while (!READ_ONCE(*stop)) {
> >                               spin = igt_spin_new(i915,
> > @@ -2443,7 +2443,7 @@ static void nop(int i915)
> >                               .buffer_count = 1,
> >                               .flags = child + 1,
> >                               .rsvd1 = gem_context_clone(i915, ctx,
> > -                                                        I915_CONTEXT_CLONE_ENGINES, 0),
> > +                                                        GEM_CONTEXT_CLONE_ENGINES, 0),
> >                       };
> >                       struct timespec tv = {};
> >                       unsigned long nops;
> > diff --git a/tests/i915/gem_exec_schedule.c b/tests/i915/gem_exec_schedule.c
> > index 9585059d..aedcdf33 100644
> > --- a/tests/i915/gem_exec_schedule.c
> > +++ b/tests/i915/gem_exec_schedule.c
> > @@ -1183,8 +1183,8 @@ noreorder(int i915, unsigned int engine, int prio, unsigned int flags)
> >               fence = igt_cork_plug(&cork, i915);
> >
> >       ctx = gem_context_clone(i915, execbuf.rsvd1,
> > -                           I915_CONTEXT_CLONE_ENGINES |
> > -                           I915_CONTEXT_CLONE_VM,
> > +                           GEM_CONTEXT_CLONE_ENGINES |
> > +                           GEM_CONTEXT_CLONE_VM,
> >                             0);
> >       spin = igt_spin_new(i915, ctx,
> >                           .engine = engine,
> > @@ -2428,9 +2428,9 @@ static void *iova_thread(struct ufd_thread *t, int prio)
> >       unsigned int clone;
> >       uint32_t ctx;
> >
> > -     clone = I915_CONTEXT_CLONE_ENGINES;
> > +     clone = GEM_CONTEXT_CLONE_ENGINES;
> >       if (t->flags & SHARED)
> > -             clone |= I915_CONTEXT_CLONE_VM;
> > +             clone |= GEM_CONTEXT_CLONE_VM;
> >
> >       ctx = gem_context_clone(t->i915, 0, clone, 0);
> >       gem_context_set_priority(t->i915, ctx, prio);
> > --
> > 2.29.2
> >
> > _______________________________________________
> > igt-dev mailing list
> > igt-dev@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/igt-dev
>
> --
> Daniel Vetter
> Software Engineer, Intel Corporation
> http://blog.ffwll.ch
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 44+ messages in thread

* [igt-dev] [PATCH i-g-t 9/9] lib/i915/gem_context: Implement VM and engine cloning manually (v3)
  2021-03-22 20:41   ` [igt-dev] [PATCH i-g-t 9/9] lib/i915/gem_context: Implement VM and engine cloning manually (v2) Jason Ekstrand
@ 2021-03-22 21:48     ` Jason Ekstrand
  0 siblings, 0 replies; 44+ messages in thread
From: Jason Ekstrand @ 2021-03-22 21:48 UTC (permalink / raw)
  To: igt-dev

We're going to be deleting the CONTEXT_CLONE API since IGT is the only
userspace to ever use it.  There are only two bits of this API that IGT
uses in interesting ways so implement them as create params instead of
cloning.

v2 (Jason Ekstrand):
 - Fix our usage of the param struct for VM cloning
 - Handle the case of zero user engines properly
 - Assert that all cloned engines are physical, not virtual

v3 (Jason Ekstrand):
 - Drop gem_has_context_clone()
 - Add docs for [__]gem_context_clone()

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
---
 lib/i915/gem_context.c         | 157 +++++++++++++++++++++++++--------
 lib/i915/gem_context.h         |   9 +-
 tests/i915/gem_ctx_shared.c    |  10 +--
 tests/i915/gem_exec_balancer.c |   2 +-
 tests/i915/gem_exec_schedule.c |   8 +-
 5 files changed, 133 insertions(+), 53 deletions(-)

diff --git a/lib/i915/gem_context.c b/lib/i915/gem_context.c
index 79411e10..d0eb3159 100644
--- a/lib/i915/gem_context.c
+++ b/lib/i915/gem_context.c
@@ -334,28 +334,110 @@ bool gem_context_has_persistence(int i915)
 	return __gem_context_get_param(i915, &param) == 0;
 }
 
+static void
+add_ctx_create_ext(struct drm_i915_gem_context_create_ext *ctx,
+		   struct i915_user_extension *ext)
+{
+	ext->next_extension = ctx->extensions;
+	ctx->extensions = to_user_pointer(ext);
+}
+
+/**
+ * __gem_context_clone:
+ * @i915: open i915 drm file descriptor
+ * @src: i915 context id from which to clone parameters
+ * @clone: bitfield of parameters to clone
+ * @flags: context creation flags
+ * @out: resulting context
+ *
+ * Special purpose wrapper to create a new context by cloning params from @src.
+ *
+ * Currently, we support cloning the VM and the engine set.  Engine set
+ * cloning is only supported if they're all "real" engines.  Virtual bonded
+ * or balanced are not supported.
+ */
 int
 __gem_context_clone(int i915,
-		    uint32_t src, unsigned int share,
+		    uint32_t src, unsigned int clone,
 		    unsigned int flags,
 		    uint32_t *out)
 {
-	struct drm_i915_gem_context_create_ext_clone clone = {
-		{ .name = I915_CONTEXT_CREATE_EXT_CLONE },
-		.clone_id = src,
-		.flags = share,
-	};
-	struct drm_i915_gem_context_create_ext arg = {
+	I915_DEFINE_CONTEXT_PARAM_ENGINES(engines, I915_EXEC_RING_MASK + 1);
+	struct drm_i915_gem_context_create_ext_setparam engines_param, vm_param;
+	unsigned i, count;
+	int err;
+
+	struct drm_i915_gem_context_create_ext ctx_create = {
 		.flags = flags | I915_CONTEXT_CREATE_FLAGS_USE_EXTENSIONS,
-		.extensions = to_user_pointer(&clone),
+		.extensions = 0,
 	};
-	int err;
 
-	err = create_ext_ioctl(i915, &arg);
+	if (clone & GEM_CONTEXT_CLONE_ENGINES) {
+		engines_param = (struct drm_i915_gem_context_create_ext_setparam) {
+			.base = {
+				.name = I915_CONTEXT_CREATE_EXT_SETPARAM,
+			},
+			.param = {
+				.param = I915_CONTEXT_PARAM_ENGINES,
+				.size = sizeof(engines),
+				.value = to_user_pointer(&engines),
+			},
+		};
+
+		engines_param.param.ctx_id = src;
+		err = __gem_context_get_param(i915, &engines_param.param);
+		igt_assert_eq(err, 0);
+		if (err)
+			return err;
+
+		if (engines_param.param.size > 0) {
+			igt_assert(engines_param.param.size > sizeof(uint64_t));
+			count = (engines_param.param.size - sizeof(uint64_t)) /
+				sizeof(struct i915_engine_class_instance);
+
+			igt_debug("Cloning context with %u engines:\n", count);
+			for (i = 0; i < count; i++) {
+				igt_debug("    %d, %d\n",
+					  (int)(int16_t)engines.engines[i].engine_class,
+					  (int)(int16_t)engines.engines[i].engine_instance);
+				/* We can't clone virtual engines */
+				igt_assert((int16_t)engines.engines[i].engine_class >= 0);
+				igt_assert((int16_t)engines.engines[i].engine_instance >= 0);
+			}
+
+			engines_param.param.ctx_id = 0;
+			add_ctx_create_ext(&ctx_create, &engines_param.base);
+		}
+	}
+
+	if (clone & GEM_CONTEXT_CLONE_VM) {
+		vm_param = (struct drm_i915_gem_context_create_ext_setparam) {
+			.base = {
+				.name = I915_CONTEXT_CREATE_EXT_SETPARAM,
+			},
+			.param = {
+				.param = I915_CONTEXT_PARAM_VM,
+			},
+		};
+
+		vm_param.param.ctx_id = src;
+		err = __gem_context_get_param(i915, &vm_param.param);
+		igt_assert_eq(err, 0);
+		if (err)
+			return err;
+
+		igt_debug("vm: %d\n", (int)vm_param.param.value);
+
+		vm_param.param.ctx_id = 0;
+		add_ctx_create_ext(&ctx_create, &vm_param.base);
+	}
+
+	err = create_ext_ioctl(i915, &ctx_create);
+	igt_assert_eq(err, 0);
 	if (err)
 		return err;
 
-	*out = arg.ctx_id;
+	*out = ctx_create.ctx_id;
 	return 0;
 }
 
@@ -373,41 +455,35 @@ static bool __gem_context_has(int i915, uint32_t share, unsigned int flags)
 
 bool gem_contexts_has_shared_gtt(int i915)
 {
-	return __gem_context_has(i915, I915_CONTEXT_CLONE_VM, 0);
+	return __gem_context_has(i915, GEM_CONTEXT_CLONE_VM, 0);
 }
 
 bool gem_has_queues(int i915)
 {
-	return __gem_context_has(i915,
-				 I915_CONTEXT_CLONE_VM,
+	return __gem_context_has(i915, GEM_CONTEXT_CLONE_VM,
 				 I915_CONTEXT_CREATE_FLAGS_SINGLE_TIMELINE);
 }
 
+/**
+ * gem_context_clone: Create a new context, cloning some params from another
+ * @i915: open i915 drm file descriptor
+ * @src: i915 context id from which to clone parameters
+ * @clone: bitfield of parameters to clone
+ * @flags: context creation flags
+ *
+ * Like __gem_context_clone, only asserts on failure.
+ */
 uint32_t gem_context_clone(int i915,
-			   uint32_t src, unsigned int share,
+			   uint32_t src, unsigned int clone,
 			   unsigned int flags)
 {
 	uint32_t ctx;
 
-	igt_assert_eq(__gem_context_clone(i915, src, share, flags, &ctx), 0);
+	igt_assert_eq(__gem_context_clone(i915, src, clone, flags, &ctx), 0);
 
 	return ctx;
 }
 
-bool gem_has_context_clone(int i915)
-{
-	struct drm_i915_gem_context_create_ext_clone ext = {
-		{ .name = I915_CONTEXT_CREATE_EXT_CLONE },
-		.clone_id = -1,
-	};
-	struct drm_i915_gem_context_create_ext create = {
-		.flags = I915_CONTEXT_CREATE_FLAGS_USE_EXTENSIONS,
-		.extensions = to_user_pointer(&ext),
-	};
-
-	return create_ext_ioctl(i915, &create) == -ENOENT;
-}
-
 /**
  * gem_context_clone_with_engines:
  * @i915: open i915 drm file descriptor
@@ -423,18 +499,21 @@ bool gem_has_context_clone(int i915)
  */
 uint32_t gem_context_clone_with_engines(int i915, uint32_t src)
 {
-	if (!gem_has_context_clone(i915))
-		return gem_context_create(i915);
-	else
-		return gem_context_clone(i915, src, I915_CONTEXT_CLONE_ENGINES,
-					 0);
+	uint32_t ctx;
+	int ret;
+
+	ret = __gem_context_clone(i915, src, GEM_CONTEXT_CLONE_ENGINES, 0, &ctx);
+	if (!ret)
+		return ctx;
+
+	return gem_context_create(i915);
 }
 
 uint32_t gem_queue_create(int i915)
 {
 	return gem_context_clone(i915, 0,
-				 I915_CONTEXT_CLONE_VM |
-				 I915_CONTEXT_CLONE_ENGINES,
+				 GEM_CONTEXT_CLONE_VM |
+				 GEM_CONTEXT_CLONE_ENGINES,
 				 I915_CONTEXT_CREATE_FLAGS_SINGLE_TIMELINE);
 }
 
@@ -448,8 +527,8 @@ uint32_t gem_queue_create(int i915)
 uint32_t gem_queue_clone_with_engines(int i915, uint32_t src)
 {
 	return gem_context_clone(i915, src,
-				 I915_CONTEXT_CLONE_ENGINES |
-				 I915_CONTEXT_CLONE_VM,
+				 GEM_CONTEXT_CLONE_ENGINES |
+				 GEM_CONTEXT_CLONE_VM,
 				 I915_CONTEXT_CREATE_FLAGS_SINGLE_TIMELINE);
 }
 
diff --git a/lib/i915/gem_context.h b/lib/i915/gem_context.h
index c2c2b827..a82f0325 100644
--- a/lib/i915/gem_context.h
+++ b/lib/i915/gem_context.h
@@ -37,12 +37,15 @@ int __gem_context_destroy(int fd, uint32_t ctx_id);
 uint32_t gem_context_create_for_engine(int fd, unsigned int class, unsigned int inst);
 uint32_t gem_context_create_for_class(int i915, unsigned int class, unsigned int *count);
 
+#define GEM_CONTEXT_CLONE_ENGINES (1 << 4)
+#define GEM_CONTEXT_CLONE_VM (1 << 5)
+
 int __gem_context_clone(int i915,
-			uint32_t src, unsigned int share,
+			uint32_t src, unsigned int clone,
 			unsigned int flags,
 			uint32_t *out);
 uint32_t gem_context_clone(int i915,
-			   uint32_t src, unsigned int share,
+			   uint32_t src, unsigned int clone,
 			   unsigned int flags);
 uint32_t gem_context_clone_with_engines(int i915, uint32_t src);
 void gem_context_copy_engines(int src_fd, uint32_t src,
@@ -59,8 +62,6 @@ void gem_require_contexts(int fd);
 void gem_context_require_bannable(int fd);
 void gem_context_require_param(int fd, uint64_t param);
 
-bool gem_has_context_clone(int i915);
-
 void gem_context_get_param(int fd, struct drm_i915_gem_context_param *p);
 void gem_context_set_param(int fd, struct drm_i915_gem_context_param *p);
 int __gem_context_set_param(int fd, struct drm_i915_gem_context_param *p);
diff --git a/tests/i915/gem_ctx_shared.c b/tests/i915/gem_ctx_shared.c
index 6b21994d..21b07083 100644
--- a/tests/i915/gem_ctx_shared.c
+++ b/tests/i915/gem_ctx_shared.c
@@ -82,7 +82,7 @@ static void create_shared_gtt(int i915, unsigned int flags)
 	igt_until_timeout(2) {
 		parent = flags & DETACHED ? child : 0;
 		child = gem_context_clone(i915,
-					  parent, I915_CONTEXT_CLONE_VM,
+					  parent, GEM_CONTEXT_CLONE_VM,
 					  0);
 		execbuf.rsvd1 = child;
 		gem_execbuf(i915, &execbuf);
@@ -98,7 +98,7 @@ static void create_shared_gtt(int i915, unsigned int flags)
 		execbuf.rsvd1 = parent;
 		igt_assert_eq(__gem_execbuf(i915, &execbuf), -ENOENT);
 		igt_assert_eq(__gem_context_clone(i915,
-						  parent, I915_CONTEXT_CLONE_VM,
+						  parent, GEM_CONTEXT_CLONE_VM,
 						  0, &parent), -ENOENT);
 	}
 	if (flags & DETACHED)
@@ -121,7 +121,7 @@ static void disjoint_timelines(int i915)
 	 * distinct timelines. A request queued to one context should be
 	 * independent of any shared contexts.
 	 */
-	child = gem_context_clone(i915, 0, I915_CONTEXT_CLONE_VM, 0);
+	child = gem_context_clone(i915, 0, GEM_CONTEXT_CLONE_VM, 0);
 	plug = igt_cork_plug(&cork, i915);
 
 	spin[0] = __igt_spin_new(i915, .ctx = 0, .dependency = plug);
@@ -161,7 +161,7 @@ static void exhaust_shared_gtt(int i915, unsigned int flags)
 		for (;;) {
 			parent = child;
 			err = __gem_context_clone(i915,
-						  parent, I915_CONTEXT_CLONE_VM,
+						  parent, GEM_CONTEXT_CLONE_VM,
 						  0, &child);
 			if (err)
 				break;
@@ -201,7 +201,7 @@ static void exec_shared_gtt(int i915, unsigned int ring)
 	int timeline;
 	int i;
 
-	clone = gem_context_clone(i915, 0, I915_CONTEXT_CLONE_VM, 0);
+	clone = gem_context_clone(i915, 0, GEM_CONTEXT_CLONE_VM, 0);
 
 	/* Find a hole big enough for both objects later */
 	scratch = gem_create(i915, 16384);
diff --git a/tests/i915/gem_exec_balancer.c b/tests/i915/gem_exec_balancer.c
index 19948ecb..5c0f52a6 100644
--- a/tests/i915/gem_exec_balancer.c
+++ b/tests/i915/gem_exec_balancer.c
@@ -627,7 +627,7 @@ static void bonded(int i915, unsigned int flags)
 		}
 
 		ctx = gem_context_clone(i915,
-					master, I915_CONTEXT_CLONE_VM,
+					master, GEM_CONTEXT_CLONE_VM,
 					I915_CONTEXT_CREATE_FLAGS_SINGLE_TIMELINE);
 		set_load_balancer(i915, ctx, siblings, count, &bonds[limit - 1]);
 
diff --git a/tests/i915/gem_exec_schedule.c b/tests/i915/gem_exec_schedule.c
index 9585059d..aedcdf33 100644
--- a/tests/i915/gem_exec_schedule.c
+++ b/tests/i915/gem_exec_schedule.c
@@ -1183,8 +1183,8 @@ noreorder(int i915, unsigned int engine, int prio, unsigned int flags)
 		fence = igt_cork_plug(&cork, i915);
 
 	ctx = gem_context_clone(i915, execbuf.rsvd1,
-			      I915_CONTEXT_CLONE_ENGINES |
-			      I915_CONTEXT_CLONE_VM,
+			      GEM_CONTEXT_CLONE_ENGINES |
+			      GEM_CONTEXT_CLONE_VM,
 			      0);
 	spin = igt_spin_new(i915, ctx,
 			    .engine = engine,
@@ -2428,9 +2428,9 @@ static void *iova_thread(struct ufd_thread *t, int prio)
 	unsigned int clone;
 	uint32_t ctx;
 
-	clone = I915_CONTEXT_CLONE_ENGINES;
+	clone = GEM_CONTEXT_CLONE_ENGINES;
 	if (t->flags & SHARED)
-		clone |= I915_CONTEXT_CLONE_VM;
+		clone |= GEM_CONTEXT_CLONE_VM;
 
 	ctx = gem_context_clone(t->i915, 0, clone, 0);
 	gem_context_set_priority(t->i915, ctx, prio);
-- 
2.29.2

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

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [igt-dev] ✗ Fi.CI.BUILD: failure for Adjust IGT for upstream API clean-ups (rev2)
  2021-03-19 22:32 [igt-dev] [PATCH i-g-t 0/8] Adjust IGT for upstream API clean-ups Jason Ekstrand
                   ` (11 preceding siblings ...)
  2021-03-22 20:41 ` [igt-dev] [PATCH i-g-t 0/9] Adjust IGT for upstream API clean-ups (v2) Jason Ekstrand
@ 2021-03-22 22:05 ` Patchwork
  12 siblings, 0 replies; 44+ messages in thread
From: Patchwork @ 2021-03-22 22:05 UTC (permalink / raw)
  To: Jason Ekstrand; +Cc: igt-dev

== Series Details ==

Series: Adjust IGT for upstream API clean-ups (rev2)
URL   : https://patchwork.freedesktop.org/series/88194/
State : failure

== Summary ==

Applying: tests/i915: Drop gem_ctx_ringsize
Applying: tests/i915/gem_exec_balancer: Drop the ringsize subtest
Applying: tests/i915/gem_exec_endless: Stop setting the ring size
Applying: tests/i915/gem_ctx_param: Drop the zeromap subtests
Applying: tests/i915: Drop gem_ctx_clone
Applying: tests/i915/gem_ctx_create: Stop cloning engines
Applying: tests/i915/gem_ctx_persistence: Drop the clone test
Applying: lib/i915/gem_context: Implement VM and engine cloning manually
Applying: lib/i915/gem_context: Implement VM and engine cloning manually (v3)
Using index info to reconstruct a base tree...
M	lib/i915/gem_context.c
M	lib/i915/gem_context.h
M	tests/i915/gem_ctx_shared.c
M	tests/i915/gem_exec_balancer.c
M	tests/i915/gem_exec_schedule.c
Falling back to patching base and 3-way merge...
Auto-merging tests/i915/gem_exec_balancer.c
Auto-merging lib/i915/gem_context.h
Auto-merging lib/i915/gem_context.c
CONFLICT (content): Merge conflict in lib/i915/gem_context.c
Patch failed at 0009 lib/i915/gem_context: Implement VM and engine cloning manually (v3)
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".


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

^ permalink raw reply	[flat|nested] 44+ messages in thread

* [igt-dev] [PATCH i-g-t 9/9] lib/i915/gem_context: Implement VM and engine cloning manually (v3)
  2021-03-22 20:41 ` [igt-dev] [PATCH i-g-t 0/9] Adjust IGT for upstream API clean-ups (v2) Jason Ekstrand
                     ` (8 preceding siblings ...)
  2021-03-22 20:41   ` [igt-dev] [PATCH i-g-t 9/9] lib/i915/gem_context: Implement VM and engine cloning manually (v2) Jason Ekstrand
@ 2021-03-23  3:51   ` Jason Ekstrand
  2021-03-23  3:51   ` [igt-dev] [PATCH i-g-t 0/9] Adjust IGT for upstream API clean-ups (v2) Jason Ekstrand
                     ` (2 subsequent siblings)
  12 siblings, 0 replies; 44+ messages in thread
From: Jason Ekstrand @ 2021-03-23  3:51 UTC (permalink / raw)
  To: igt-dev

We're going to be deleting the CONTEXT_CLONE API since IGT is the only
userspace to ever use it.  There are only two bits of this API that IGT
uses in interesting ways so implement them as create params instead of
cloning.

v2 (Jason Ekstrand):
 - Fix our usage of the param struct for VM cloning
 - Handle the case of zero user engines properly
 - Assert that all cloned engines are physical, not virtual

v3 (Jason Ekstrand):
 - Drop gem_has_context_clone()
 - Add docs for [__]gem_context_clone()

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
---
 lib/i915/gem_context.c         | 157 +++++++++++++++++++++++++--------
 lib/i915/gem_context.h         |   9 +-
 tests/i915/gem_ctx_shared.c    |  10 +--
 tests/i915/gem_exec_balancer.c |   2 +-
 tests/i915/gem_exec_schedule.c |   8 +-
 5 files changed, 133 insertions(+), 53 deletions(-)

diff --git a/lib/i915/gem_context.c b/lib/i915/gem_context.c
index 79411e10..d0eb3159 100644
--- a/lib/i915/gem_context.c
+++ b/lib/i915/gem_context.c
@@ -334,28 +334,110 @@ bool gem_context_has_persistence(int i915)
 	return __gem_context_get_param(i915, &param) == 0;
 }
 
+static void
+add_ctx_create_ext(struct drm_i915_gem_context_create_ext *ctx,
+		   struct i915_user_extension *ext)
+{
+	ext->next_extension = ctx->extensions;
+	ctx->extensions = to_user_pointer(ext);
+}
+
+/**
+ * __gem_context_clone:
+ * @i915: open i915 drm file descriptor
+ * @src: i915 context id from which to clone parameters
+ * @clone: bitfield of parameters to clone
+ * @flags: context creation flags
+ * @out: resulting context
+ *
+ * Special purpose wrapper to create a new context by cloning params from @src.
+ *
+ * Currently, we support cloning the VM and the engine set.  Engine set
+ * cloning is only supported if they're all "real" engines.  Virtual bonded
+ * or balanced are not supported.
+ */
 int
 __gem_context_clone(int i915,
-		    uint32_t src, unsigned int share,
+		    uint32_t src, unsigned int clone,
 		    unsigned int flags,
 		    uint32_t *out)
 {
-	struct drm_i915_gem_context_create_ext_clone clone = {
-		{ .name = I915_CONTEXT_CREATE_EXT_CLONE },
-		.clone_id = src,
-		.flags = share,
-	};
-	struct drm_i915_gem_context_create_ext arg = {
+	I915_DEFINE_CONTEXT_PARAM_ENGINES(engines, I915_EXEC_RING_MASK + 1);
+	struct drm_i915_gem_context_create_ext_setparam engines_param, vm_param;
+	unsigned i, count;
+	int err;
+
+	struct drm_i915_gem_context_create_ext ctx_create = {
 		.flags = flags | I915_CONTEXT_CREATE_FLAGS_USE_EXTENSIONS,
-		.extensions = to_user_pointer(&clone),
+		.extensions = 0,
 	};
-	int err;
 
-	err = create_ext_ioctl(i915, &arg);
+	if (clone & GEM_CONTEXT_CLONE_ENGINES) {
+		engines_param = (struct drm_i915_gem_context_create_ext_setparam) {
+			.base = {
+				.name = I915_CONTEXT_CREATE_EXT_SETPARAM,
+			},
+			.param = {
+				.param = I915_CONTEXT_PARAM_ENGINES,
+				.size = sizeof(engines),
+				.value = to_user_pointer(&engines),
+			},
+		};
+
+		engines_param.param.ctx_id = src;
+		err = __gem_context_get_param(i915, &engines_param.param);
+		igt_assert_eq(err, 0);
+		if (err)
+			return err;
+
+		if (engines_param.param.size > 0) {
+			igt_assert(engines_param.param.size > sizeof(uint64_t));
+			count = (engines_param.param.size - sizeof(uint64_t)) /
+				sizeof(struct i915_engine_class_instance);
+
+			igt_debug("Cloning context with %u engines:\n", count);
+			for (i = 0; i < count; i++) {
+				igt_debug("    %d, %d\n",
+					  (int)(int16_t)engines.engines[i].engine_class,
+					  (int)(int16_t)engines.engines[i].engine_instance);
+				/* We can't clone virtual engines */
+				igt_assert((int16_t)engines.engines[i].engine_class >= 0);
+				igt_assert((int16_t)engines.engines[i].engine_instance >= 0);
+			}
+
+			engines_param.param.ctx_id = 0;
+			add_ctx_create_ext(&ctx_create, &engines_param.base);
+		}
+	}
+
+	if (clone & GEM_CONTEXT_CLONE_VM) {
+		vm_param = (struct drm_i915_gem_context_create_ext_setparam) {
+			.base = {
+				.name = I915_CONTEXT_CREATE_EXT_SETPARAM,
+			},
+			.param = {
+				.param = I915_CONTEXT_PARAM_VM,
+			},
+		};
+
+		vm_param.param.ctx_id = src;
+		err = __gem_context_get_param(i915, &vm_param.param);
+		igt_assert_eq(err, 0);
+		if (err)
+			return err;
+
+		igt_debug("vm: %d\n", (int)vm_param.param.value);
+
+		vm_param.param.ctx_id = 0;
+		add_ctx_create_ext(&ctx_create, &vm_param.base);
+	}
+
+	err = create_ext_ioctl(i915, &ctx_create);
+	igt_assert_eq(err, 0);
 	if (err)
 		return err;
 
-	*out = arg.ctx_id;
+	*out = ctx_create.ctx_id;
 	return 0;
 }
 
@@ -373,41 +455,35 @@ static bool __gem_context_has(int i915, uint32_t share, unsigned int flags)
 
 bool gem_contexts_has_shared_gtt(int i915)
 {
-	return __gem_context_has(i915, I915_CONTEXT_CLONE_VM, 0);
+	return __gem_context_has(i915, GEM_CONTEXT_CLONE_VM, 0);
 }
 
 bool gem_has_queues(int i915)
 {
-	return __gem_context_has(i915,
-				 I915_CONTEXT_CLONE_VM,
+	return __gem_context_has(i915, GEM_CONTEXT_CLONE_VM,
 				 I915_CONTEXT_CREATE_FLAGS_SINGLE_TIMELINE);
 }
 
+/**
+ * gem_context_clone: Create a new context, cloning some params from another
+ * @i915: open i915 drm file descriptor
+ * @src: i915 context id from which to clone parameters
+ * @clone: bitfield of parameters to clone
+ * @flags: context creation flags
+ *
+ * Like __gem_context_clone, only asserts on failure.
+ */
 uint32_t gem_context_clone(int i915,
-			   uint32_t src, unsigned int share,
+			   uint32_t src, unsigned int clone,
 			   unsigned int flags)
 {
 	uint32_t ctx;
 
-	igt_assert_eq(__gem_context_clone(i915, src, share, flags, &ctx), 0);
+	igt_assert_eq(__gem_context_clone(i915, src, clone, flags, &ctx), 0);
 
 	return ctx;
 }
 
-bool gem_has_context_clone(int i915)
-{
-	struct drm_i915_gem_context_create_ext_clone ext = {
-		{ .name = I915_CONTEXT_CREATE_EXT_CLONE },
-		.clone_id = -1,
-	};
-	struct drm_i915_gem_context_create_ext create = {
-		.flags = I915_CONTEXT_CREATE_FLAGS_USE_EXTENSIONS,
-		.extensions = to_user_pointer(&ext),
-	};
-
-	return create_ext_ioctl(i915, &create) == -ENOENT;
-}
-
 /**
  * gem_context_clone_with_engines:
  * @i915: open i915 drm file descriptor
@@ -423,18 +499,21 @@ bool gem_has_context_clone(int i915)
  */
 uint32_t gem_context_clone_with_engines(int i915, uint32_t src)
 {
-	if (!gem_has_context_clone(i915))
-		return gem_context_create(i915);
-	else
-		return gem_context_clone(i915, src, I915_CONTEXT_CLONE_ENGINES,
-					 0);
+	uint32_t ctx;
+	int ret;
+
+	ret = __gem_context_clone(i915, src, GEM_CONTEXT_CLONE_ENGINES, 0, &ctx);
+	if (!ret)
+		return ctx;
+
+	return gem_context_create(i915);
 }
 
 uint32_t gem_queue_create(int i915)
 {
 	return gem_context_clone(i915, 0,
-				 I915_CONTEXT_CLONE_VM |
-				 I915_CONTEXT_CLONE_ENGINES,
+				 GEM_CONTEXT_CLONE_VM |
+				 GEM_CONTEXT_CLONE_ENGINES,
 				 I915_CONTEXT_CREATE_FLAGS_SINGLE_TIMELINE);
 }
 
@@ -448,8 +527,8 @@ uint32_t gem_queue_create(int i915)
 uint32_t gem_queue_clone_with_engines(int i915, uint32_t src)
 {
 	return gem_context_clone(i915, src,
-				 I915_CONTEXT_CLONE_ENGINES |
-				 I915_CONTEXT_CLONE_VM,
+				 GEM_CONTEXT_CLONE_ENGINES |
+				 GEM_CONTEXT_CLONE_VM,
 				 I915_CONTEXT_CREATE_FLAGS_SINGLE_TIMELINE);
 }
 
diff --git a/lib/i915/gem_context.h b/lib/i915/gem_context.h
index c2c2b827..a82f0325 100644
--- a/lib/i915/gem_context.h
+++ b/lib/i915/gem_context.h
@@ -37,12 +37,15 @@ int __gem_context_destroy(int fd, uint32_t ctx_id);
 uint32_t gem_context_create_for_engine(int fd, unsigned int class, unsigned int inst);
 uint32_t gem_context_create_for_class(int i915, unsigned int class, unsigned int *count);
 
+#define GEM_CONTEXT_CLONE_ENGINES (1 << 4)
+#define GEM_CONTEXT_CLONE_VM (1 << 5)
+
 int __gem_context_clone(int i915,
-			uint32_t src, unsigned int share,
+			uint32_t src, unsigned int clone,
 			unsigned int flags,
 			uint32_t *out);
 uint32_t gem_context_clone(int i915,
-			   uint32_t src, unsigned int share,
+			   uint32_t src, unsigned int clone,
 			   unsigned int flags);
 uint32_t gem_context_clone_with_engines(int i915, uint32_t src);
 void gem_context_copy_engines(int src_fd, uint32_t src,
@@ -59,8 +62,6 @@ void gem_require_contexts(int fd);
 void gem_context_require_bannable(int fd);
 void gem_context_require_param(int fd, uint64_t param);
 
-bool gem_has_context_clone(int i915);
-
 void gem_context_get_param(int fd, struct drm_i915_gem_context_param *p);
 void gem_context_set_param(int fd, struct drm_i915_gem_context_param *p);
 int __gem_context_set_param(int fd, struct drm_i915_gem_context_param *p);
diff --git a/tests/i915/gem_ctx_shared.c b/tests/i915/gem_ctx_shared.c
index 6b21994d..21b07083 100644
--- a/tests/i915/gem_ctx_shared.c
+++ b/tests/i915/gem_ctx_shared.c
@@ -82,7 +82,7 @@ static void create_shared_gtt(int i915, unsigned int flags)
 	igt_until_timeout(2) {
 		parent = flags & DETACHED ? child : 0;
 		child = gem_context_clone(i915,
-					  parent, I915_CONTEXT_CLONE_VM,
+					  parent, GEM_CONTEXT_CLONE_VM,
 					  0);
 		execbuf.rsvd1 = child;
 		gem_execbuf(i915, &execbuf);
@@ -98,7 +98,7 @@ static void create_shared_gtt(int i915, unsigned int flags)
 		execbuf.rsvd1 = parent;
 		igt_assert_eq(__gem_execbuf(i915, &execbuf), -ENOENT);
 		igt_assert_eq(__gem_context_clone(i915,
-						  parent, I915_CONTEXT_CLONE_VM,
+						  parent, GEM_CONTEXT_CLONE_VM,
 						  0, &parent), -ENOENT);
 	}
 	if (flags & DETACHED)
@@ -121,7 +121,7 @@ static void disjoint_timelines(int i915)
 	 * distinct timelines. A request queued to one context should be
 	 * independent of any shared contexts.
 	 */
-	child = gem_context_clone(i915, 0, I915_CONTEXT_CLONE_VM, 0);
+	child = gem_context_clone(i915, 0, GEM_CONTEXT_CLONE_VM, 0);
 	plug = igt_cork_plug(&cork, i915);
 
 	spin[0] = __igt_spin_new(i915, .ctx = 0, .dependency = plug);
@@ -161,7 +161,7 @@ static void exhaust_shared_gtt(int i915, unsigned int flags)
 		for (;;) {
 			parent = child;
 			err = __gem_context_clone(i915,
-						  parent, I915_CONTEXT_CLONE_VM,
+						  parent, GEM_CONTEXT_CLONE_VM,
 						  0, &child);
 			if (err)
 				break;
@@ -201,7 +201,7 @@ static void exec_shared_gtt(int i915, unsigned int ring)
 	int timeline;
 	int i;
 
-	clone = gem_context_clone(i915, 0, I915_CONTEXT_CLONE_VM, 0);
+	clone = gem_context_clone(i915, 0, GEM_CONTEXT_CLONE_VM, 0);
 
 	/* Find a hole big enough for both objects later */
 	scratch = gem_create(i915, 16384);
diff --git a/tests/i915/gem_exec_balancer.c b/tests/i915/gem_exec_balancer.c
index 19948ecb..5c0f52a6 100644
--- a/tests/i915/gem_exec_balancer.c
+++ b/tests/i915/gem_exec_balancer.c
@@ -627,7 +627,7 @@ static void bonded(int i915, unsigned int flags)
 		}
 
 		ctx = gem_context_clone(i915,
-					master, I915_CONTEXT_CLONE_VM,
+					master, GEM_CONTEXT_CLONE_VM,
 					I915_CONTEXT_CREATE_FLAGS_SINGLE_TIMELINE);
 		set_load_balancer(i915, ctx, siblings, count, &bonds[limit - 1]);
 
diff --git a/tests/i915/gem_exec_schedule.c b/tests/i915/gem_exec_schedule.c
index 9585059d..aedcdf33 100644
--- a/tests/i915/gem_exec_schedule.c
+++ b/tests/i915/gem_exec_schedule.c
@@ -1183,8 +1183,8 @@ noreorder(int i915, unsigned int engine, int prio, unsigned int flags)
 		fence = igt_cork_plug(&cork, i915);
 
 	ctx = gem_context_clone(i915, execbuf.rsvd1,
-			      I915_CONTEXT_CLONE_ENGINES |
-			      I915_CONTEXT_CLONE_VM,
+			      GEM_CONTEXT_CLONE_ENGINES |
+			      GEM_CONTEXT_CLONE_VM,
 			      0);
 	spin = igt_spin_new(i915, ctx,
 			    .engine = engine,
@@ -2428,9 +2428,9 @@ static void *iova_thread(struct ufd_thread *t, int prio)
 	unsigned int clone;
 	uint32_t ctx;
 
-	clone = I915_CONTEXT_CLONE_ENGINES;
+	clone = GEM_CONTEXT_CLONE_ENGINES;
 	if (t->flags & SHARED)
-		clone |= I915_CONTEXT_CLONE_VM;
+		clone |= GEM_CONTEXT_CLONE_VM;
 
 	ctx = gem_context_clone(t->i915, 0, clone, 0);
 	gem_context_set_priority(t->i915, ctx, prio);
-- 
2.29.2

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

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [igt-dev] [PATCH i-g-t 0/9] Adjust IGT for upstream API clean-ups (v2)
  2021-03-22 20:41 ` [igt-dev] [PATCH i-g-t 0/9] Adjust IGT for upstream API clean-ups (v2) Jason Ekstrand
                     ` (9 preceding siblings ...)
  2021-03-23  3:51   ` Jason Ekstrand
@ 2021-03-23  3:51   ` Jason Ekstrand
  2021-03-23  3:51     ` [igt-dev] [PATCH i-g-t 1/9] tests/i915: Drop gem_ctx_ringsize Jason Ekstrand
                       ` (8 more replies)
  2021-03-23  4:33   ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/9] tests/i915: Drop gem_ctx_ringsize Patchwork
  2021-03-23 23:40   ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
  12 siblings, 9 replies; 44+ messages in thread
From: Jason Ekstrand @ 2021-03-23  3:51 UTC (permalink / raw)
  To: igt-dev

I'm trying to remove some unused APIs from upstream i915.  This i-g-t
series updates tests in accordance with those removals.  For a few things,
it simply deletes tests which test explicitly for that feature.  For
cloning, we do actually use that for a bunch of stuff today so I just
implement the two clones we care about (engines and VMs) directly with
getparam and a create setparam.

Jason Ekstrand (9):
  tests/i915: Drop gem_ctx_ringsize
  tests/i915/gem_exec_balancer: Drop the ringsize subtest
  tests/i915/gem_exec_endless: Stop setting the ring size
  tests/i915/gem_ctx_param: Drop the zeromap subtests
  tests/i915: Drop gem_ctx_clone
  tests/i915/gem_ctx_create: Stop cloning engines
  tests/i915/gem_ctx_persistence: Drop the clone test
  tests/i915/gem_exec_balancer: Stop cloning engines
  lib/i915/gem_context: Implement VM and engine cloning manually (v2)

 lib/i915/gem_context.c           | 109 ++++++--
 lib/i915/gem_context.h           |   7 +-
 tests/Makefile.sources           |   6 -
 tests/i915/gem_ctx_clone.c       | 450 -------------------------------
 tests/i915/gem_ctx_create.c      |   4 +-
 tests/i915/gem_ctx_param.c       |  33 ---
 tests/i915/gem_ctx_persistence.c |  30 ---
 tests/i915/gem_ctx_ringsize.c    | 345 ------------------------
 tests/i915/gem_ctx_shared.c      |  10 +-
 tests/i915/gem_exec_balancer.c   |  90 +------
 tests/i915/gem_exec_endless.c    |  12 +-
 tests/i915/gem_exec_schedule.c   |   8 +-
 tests/meson.build                |   2 -
 13 files changed, 108 insertions(+), 998 deletions(-)
 delete mode 100644 tests/i915/gem_ctx_clone.c
 delete mode 100644 tests/i915/gem_ctx_ringsize.c

-- 
2.29.2

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

^ permalink raw reply	[flat|nested] 44+ messages in thread

* [igt-dev] [PATCH i-g-t 1/9] tests/i915: Drop gem_ctx_ringsize
  2021-03-23  3:51   ` [igt-dev] [PATCH i-g-t 0/9] Adjust IGT for upstream API clean-ups (v2) Jason Ekstrand
@ 2021-03-23  3:51     ` Jason Ekstrand
  2021-03-23  3:51     ` [igt-dev] [PATCH i-g-t 2/9] tests/i915/gem_exec_balancer: Drop the ringsize subtest Jason Ekstrand
                       ` (7 subsequent siblings)
  8 siblings, 0 replies; 44+ messages in thread
From: Jason Ekstrand @ 2021-03-23  3:51 UTC (permalink / raw)
  To: igt-dev

I915_CONTEXT_PARAM_RINGSIZE is being removed from upstream i915 because
it's never been used by any userspace other than IGT.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 tests/Makefile.sources        |   3 -
 tests/i915/gem_ctx_ringsize.c | 345 ----------------------------------
 tests/meson.build             |   1 -
 3 files changed, 349 deletions(-)
 delete mode 100644 tests/i915/gem_ctx_ringsize.c

diff --git a/tests/Makefile.sources b/tests/Makefile.sources
index 4f24fb3a..bffa0db3 100644
--- a/tests/Makefile.sources
+++ b/tests/Makefile.sources
@@ -193,9 +193,6 @@ gem_ctx_param_SOURCES = i915/gem_ctx_param.c
 TESTS_progs += gem_ctx_persistence
 gem_ctx_persistence_SOURCES = i915/gem_ctx_persistence.c
 
-TESTS_progs += gem_ctx_ringsize
-gem_ctx_ringsize_SOURCES = i915/gem_ctx_ringsize.c
-
 TESTS_progs += gem_ctx_shared
 gem_ctx_shared_SOURCES = i915/gem_ctx_shared.c
 
diff --git a/tests/i915/gem_ctx_ringsize.c b/tests/i915/gem_ctx_ringsize.c
deleted file mode 100644
index 60187b7c..00000000
--- a/tests/i915/gem_ctx_ringsize.c
+++ /dev/null
@@ -1,345 +0,0 @@
-/*
- * Copyright © 2019 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include <errno.h>
-#include <fcntl.h>
-#include <inttypes.h>
-#include <math.h>
-#include <signal.h>
-#include <sys/ioctl.h>
-#include <sys/types.h>
-#include <unistd.h>
-
-#include "drmtest.h"
-#include "i915/gem.h"
-#include "i915/gem_context.h"
-#include "i915/gem_engine_topology.h"
-#include "ioctl_wrappers.h" /* gem_wait()! */
-#include "sw_sync.h"
-
-static bool has_ringsize(int i915)
-{
-	struct drm_i915_gem_context_param p = {
-		.param = I915_CONTEXT_PARAM_RINGSIZE,
-	};
-
-	return __gem_context_get_param(i915, &p) == 0;
-}
-
-static void test_idempotent(int i915)
-{
-	struct drm_i915_gem_context_param p = {
-		.param = I915_CONTEXT_PARAM_RINGSIZE,
-	};
-	uint32_t saved;
-
-	/*
-	 * Simple test to verify that we are able to read back the same
-	 * value as we set.
-	 */
-
-	gem_context_get_param(i915, &p);
-	saved = p.value;
-
-	for (uint32_t x = 1 << 12; x <= 128 << 12; x <<= 1) {
-		p.value = x;
-		gem_context_set_param(i915, &p);
-		gem_context_get_param(i915, &p);
-		igt_assert_eq_u32(p.value, x);
-	}
-
-	p.value = saved;
-	gem_context_set_param(i915, &p);
-}
-
-static void test_invalid(int i915)
-{
-	struct drm_i915_gem_context_param p = {
-		.param = I915_CONTEXT_PARAM_RINGSIZE,
-	};
-	uint64_t invalid[] = {
-		0, 1, 4095, 4097, 8191, 8193,
-		/* upper limit may be HW dependent, atm it is 512KiB */
-		(512 << 10) - 1, (512 << 10) + 1,
-		-1, -1u
-	};
-	uint32_t saved;
-
-	/*
-	 * The HW only accepts certain aligned values and so we reject
-	 * any invalid sizes specified by the user.
-	 *
-	 * Currently, the HW only accepts 4KiB - 512KiB in 4K increments,
-	 * and is unlikely to ever accept smaller.
-	 */
-
-	gem_context_get_param(i915, &p);
-	saved = p.value;
-
-	for (int i = 0; i < ARRAY_SIZE(invalid); i++) {
-		p.value = invalid[i];
-		igt_assert_eq(__gem_context_set_param(i915, &p), -EINVAL);
-		gem_context_get_param(i915, &p);
-		igt_assert_eq_u64(p.value, saved);
-	}
-}
-
-static int create_ext_ioctl(int i915,
-			    struct drm_i915_gem_context_create_ext *arg)
-{
-	int err;
-
-	err = 0;
-	if (igt_ioctl(i915, DRM_IOCTL_I915_GEM_CONTEXT_CREATE_EXT, arg)) {
-		err = -errno;
-		igt_assume(err);
-	}
-
-	errno = 0;
-	return err;
-}
-
-static void test_create(int i915)
-{
-	struct drm_i915_gem_context_create_ext_setparam p = {
-		.base = {
-			.name = I915_CONTEXT_CREATE_EXT_SETPARAM,
-			.next_extension = 0, /* end of chain */
-		},
-		.param = {
-			.param = I915_CONTEXT_PARAM_RINGSIZE,
-			.value = 512 << 10,
-		}
-	};
-	struct drm_i915_gem_context_create_ext create = {
-		.flags = I915_CONTEXT_CREATE_FLAGS_USE_EXTENSIONS,
-		.extensions = to_user_pointer(&p),
-	};
-
-	/*
-	 * Check that the ringsize parameter is used during context constuction.
-	 */
-
-	igt_assert_eq(create_ext_ioctl(i915, &create),  0);
-
-	p.param.ctx_id = create.ctx_id;
-	p.param.value = 0;
-	gem_context_get_param(i915, &p.param);
-	igt_assert_eq(p.param.value, 512 << 10);
-
-	gem_context_destroy(i915, create.ctx_id);
-}
-
-static void test_clone(int i915)
-{
-	struct drm_i915_gem_context_create_ext_setparam p = {
-		.base = {
-			.name = I915_CONTEXT_CREATE_EXT_SETPARAM,
-			.next_extension = 0, /* end of chain */
-		},
-		.param = {
-			.param = I915_CONTEXT_PARAM_RINGSIZE,
-			.value = 512 << 10,
-		}
-	};
-	struct drm_i915_gem_context_create_ext create = {
-		.flags = I915_CONTEXT_CREATE_FLAGS_USE_EXTENSIONS,
-		.extensions = to_user_pointer(&p),
-	};
-
-	/*
-	 * Check that the ringsize is copied across during context cloning.
-	 */
-
-	igt_assert_eq(create_ext_ioctl(i915, &create),  0);
-
-	p.param.ctx_id = gem_context_clone(i915, create.ctx_id,
-					   I915_CONTEXT_CLONE_ENGINES, 0);
-	igt_assert_neq(p.param.ctx_id, create.ctx_id);
-	gem_context_destroy(i915, create.ctx_id);
-
-	p.param.value = 0;
-	gem_context_get_param(i915, &p.param);
-	igt_assert_eq(p.param.value, 512 << 10);
-
-	gem_context_destroy(i915, p.param.ctx_id);
-}
-
-static int __execbuf(int i915, struct drm_i915_gem_execbuffer2 *execbuf)
-{
-	int err;
-
-	err = 0;
-	if (ioctl(i915, DRM_IOCTL_I915_GEM_EXECBUFFER2, execbuf)) {
-		err = -errno;
-		igt_assume(err);
-	}
-
-	errno = 0;
-	return err;
-}
-
-#define IDLE (1 << 0)
-#define PLUG (1 << 1)
-
-static void sighandler(int sig)
-{
-}
-
-static unsigned int
-measure_inflight(int i915, unsigned int engine, int timeout, unsigned int flags)
-{
-	IGT_CORK_FENCE(cork);
-	unsigned int count;
-	igt_spin_t *spin;
-	int fence;
-	int err;
-
-	fcntl(i915, F_SETFL, fcntl(i915, F_GETFL) | O_NONBLOCK);
-	signal(SIGALRM, sighandler);
-	alarm(timeout);
-
-	fence = igt_cork_plug(&cork, i915);
-	spin = igt_spin_new(i915,
-			    .engine = engine,
-			    .fence = fence,
-			    .flags = (flags & PLUG) ? IGT_SPIN_FENCE_IN : 0);
-	for (count = 1; (err = __execbuf(i915, &spin->execbuf)) == 0; count++)
-		;
-	igt_debugfs_dump(i915, "i915_engine_info");
-	igt_assert_eq(err, -EWOULDBLOCK);
-	close(fence);
-
-	alarm(0);
-	signal(SIGALRM, SIG_DFL);
-	fcntl(i915, F_SETFL, fcntl(i915, F_GETFL) & ~O_NONBLOCK);
-
-	igt_spin_free(i915, spin);
-	igt_cork_unplug(&cork);
-
-	return count;
-}
-
-static void test_resize(int i915,
-			const struct intel_execution_engine2 *e,
-			void *data)
-#define as_pointer(x) (void *)(uintptr_t)(x)
-{
-	struct drm_i915_gem_context_param p = {
-		.param = I915_CONTEXT_PARAM_RINGSIZE,
-	};
-	unsigned long flags = (uintptr_t)data;
-	unsigned int prev[2] = {};
-	uint64_t elapsed;
-	uint32_t saved;
-
-	/*
-	 * The ringsize directly affects the number of batches we can have
-	 * inflight -- when we run out of room in the ring, the client is
-	 * blocked (or if O_NONBLOCK is specified, -EWOULDBLOCK is reported).
-	 * The kernel throttles the client when they enter the last 4KiB page,
-	 * so as we double the size of the ring, we nearly double the number
-	 * of requests we can fit as 2^n-1: i.e 0, 1, 3, 7, 15, 31 pages.
-	 */
-
-	gem_context_get_param(i915, &p);
-	saved = p.value;
-
-	/* XXX disable hangchecking? */
-	elapsed = 0;
-	gem_quiescent_gpu(i915);
-	for (p.value = 1 << 12; p.value <= 128 << 12; p.value <<= 1) {
-		struct timespec tv = {};
-		unsigned int count;
-
-		gem_context_set_param(i915, &p);
-
-		igt_nsec_elapsed(&tv);
-		count = measure_inflight(i915,
-					 e->flags,
-					 1 + 4 * ceil(elapsed*1e-9),
-					 flags);
-		elapsed = igt_nsec_elapsed(&tv);
-
-		igt_info("%s: %6llx -> %'6d\n", e->name, p.value, count);
-		igt_assert(count > 3 * (prev[1] - prev[0]) / 4 + prev[1]);
-		if (flags & IDLE)
-			gem_quiescent_gpu(i915);
-
-		prev[0] = prev[1];
-		prev[1] = count;
-	}
-	gem_quiescent_gpu(i915);
-
-	p.value = saved;
-	gem_context_set_param(i915, &p);
-}
-
-static void gem_test_each_engine(int i915, const char *name,
-				 void (*fn)(int i915,
-					    const struct intel_execution_engine2 *e,
-					    void *data),
-				 void *data)
-{
-	const struct intel_execution_engine2 *e;
-
-	igt_subtest_with_dynamic(name) {
-		__for_each_physical_engine(i915, e) {
-			igt_dynamic_f("%s", e->name)
-				fn(i915, e, data);
-		}
-	}
-}
-
-igt_main
-{
-	int i915;
-
-	igt_fixture {
-		i915 = drm_open_driver(DRIVER_INTEL);
-		igt_require_gem(i915);
-
-		igt_require(has_ringsize(i915));
-	}
-
-	igt_subtest("idempotent")
-		test_idempotent(i915);
-
-	igt_subtest("invalid")
-		test_invalid(i915);
-
-	igt_subtest("create")
-		test_create(i915);
-	igt_subtest("clone")
-		test_clone(i915);
-
-	gem_test_each_engine(i915, "idle", test_resize, as_pointer(IDLE));
-	gem_test_each_engine(i915, "active", test_resize, 0);
-	gem_test_each_engine(i915, "plugged", test_resize, as_pointer(PLUG));
-
-	/* XXX ctx->engines[]? Clone (above) should be enough */
-
-	igt_fixture {
-		close(i915);
-	}
-}
diff --git a/tests/meson.build b/tests/meson.build
index 825e0183..c85768e1 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -134,7 +134,6 @@ i915_progs = [
 	'gem_ctx_isolation',
 	'gem_ctx_param',
 	'gem_ctx_persistence',
-	'gem_ctx_ringsize',
 	'gem_ctx_shared',
 	'gem_ctx_switch',
 	'gem_evict_alignment',
-- 
2.29.2

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

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [igt-dev] [PATCH i-g-t 2/9] tests/i915/gem_exec_balancer: Drop the ringsize subtest
  2021-03-23  3:51   ` [igt-dev] [PATCH i-g-t 0/9] Adjust IGT for upstream API clean-ups (v2) Jason Ekstrand
  2021-03-23  3:51     ` [igt-dev] [PATCH i-g-t 1/9] tests/i915: Drop gem_ctx_ringsize Jason Ekstrand
@ 2021-03-23  3:51     ` Jason Ekstrand
  2021-03-23  3:51     ` [igt-dev] [PATCH i-g-t 3/9] tests/i915/gem_exec_endless: Stop setting the ring size Jason Ekstrand
                       ` (6 subsequent siblings)
  8 siblings, 0 replies; 44+ messages in thread
From: Jason Ekstrand @ 2021-03-23  3:51 UTC (permalink / raw)
  To: igt-dev

I915_CONTEXT_PARAM_RINGSIZE is being removed from upstream i915 because
it's never been used by any userspace other than IGT.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 tests/i915/gem_exec_balancer.c | 81 ----------------------------------
 1 file changed, 81 deletions(-)

diff --git a/tests/i915/gem_exec_balancer.c b/tests/i915/gem_exec_balancer.c
index 01db0e11..bfd65b29 100644
--- a/tests/i915/gem_exec_balancer.c
+++ b/tests/i915/gem_exec_balancer.c
@@ -2551,84 +2551,6 @@ next:
 	gem_quiescent_gpu(i915);
 }
 
-static void sighandler(int sig)
-{
-}
-
-static unsigned int measure_inflight(int i915, uint32_t ctx, int timeout)
-{
-	igt_spin_t *spin = igt_spin_new(i915, ctx);
-	unsigned int count;
-	int err;
-
-	fcntl(i915, F_SETFL, fcntl(i915, F_GETFL) | O_NONBLOCK);
-	signal(SIGALRM, sighandler);
-	alarm(timeout);
-
-	for (count = 1; (err = __execbuf(i915, &spin->execbuf)) == 0; count++)
-		;
-	igt_assert_eq(err, -EWOULDBLOCK);
-
-	alarm(0);
-	signal(SIGALRM, SIG_DFL);
-	fcntl(i915, F_SETFL, fcntl(i915, F_GETFL) & ~O_NONBLOCK);
-
-	igt_spin_free(i915, spin);
-
-	return count;
-}
-
-static void __resize(int i915, uint32_t ctx)
-{
-	struct drm_i915_gem_context_param p = {
-		.ctx_id = ctx,
-		.param = I915_CONTEXT_PARAM_RINGSIZE,
-	};
-	unsigned int prev[2] = {};
-	uint64_t elapsed;
-
-	elapsed = 0;
-	gem_quiescent_gpu(i915);
-	for (p.value = 1 << 12; p.value <= 128 << 12; p.value <<= 1) {
-		struct timespec tv = {};
-		unsigned int count;
-
-		gem_context_set_param(i915, &p);
-
-		igt_nsec_elapsed(&tv);
-		count = measure_inflight(i915, ctx, 1 + 4 * ceil(elapsed*1e-9));
-		elapsed = igt_nsec_elapsed(&tv);
-
-		igt_info("%6llx -> %'6d\n", p.value, count);
-		igt_assert(count > 3 * (prev[1] - prev[0]) / 4 + prev[1]);
-
-		prev[0] = prev[1];
-		prev[1] = count;
-	}
-	gem_quiescent_gpu(i915);
-}
-
-static void ringsz(int i915)
-{
-	for (int class = 0; class < 32; class++) {
-		struct i915_engine_class_instance *ci;
-		unsigned int count;
-		uint32_t ctx;
-
-		ci = list_engines(i915, 1u << class, &count);
-		if (!ci || count < 2)
-			goto next;
-
-		ctx = load_balancer_create(i915, ci, count);
-		__resize(i915, ctx);
-		gem_context_destroy(i915, ctx);
-next:
-		free(ci);
-	}
-
-	gem_quiescent_gpu(i915);
-}
-
 static void ping(int i915, uint32_t ctx, unsigned int engine)
 {
 	struct drm_i915_gem_exec_object2 obj = {
@@ -3304,9 +3226,6 @@ igt_main
 	igt_subtest("fairslice")
 		fairslice(i915);
 
-	igt_subtest("ringsize")
-		ringsz(i915);
-
 	igt_subtest("nop")
 		nop(i915);
 
-- 
2.29.2

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

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [igt-dev] [PATCH i-g-t 3/9] tests/i915/gem_exec_endless: Stop setting the ring size
  2021-03-23  3:51   ` [igt-dev] [PATCH i-g-t 0/9] Adjust IGT for upstream API clean-ups (v2) Jason Ekstrand
  2021-03-23  3:51     ` [igt-dev] [PATCH i-g-t 1/9] tests/i915: Drop gem_ctx_ringsize Jason Ekstrand
  2021-03-23  3:51     ` [igt-dev] [PATCH i-g-t 2/9] tests/i915/gem_exec_balancer: Drop the ringsize subtest Jason Ekstrand
@ 2021-03-23  3:51     ` Jason Ekstrand
  2021-03-23  3:51     ` [igt-dev] [PATCH i-g-t 4/9] tests/i915/gem_ctx_param: Drop the zeromap subtests Jason Ekstrand
                       ` (5 subsequent siblings)
  8 siblings, 0 replies; 44+ messages in thread
From: Jason Ekstrand @ 2021-03-23  3:51 UTC (permalink / raw)
  To: igt-dev

I915_CONTEXT_PARAM_RINGSIZE is being removed from upstream i915 because
it's never been used by any userspace other than IGT.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 tests/i915/gem_exec_endless.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/tests/i915/gem_exec_endless.c b/tests/i915/gem_exec_endless.c
index 1b320d4c..a3e2fa49 100644
--- a/tests/i915/gem_exec_endless.c
+++ b/tests/i915/gem_exec_endless.c
@@ -67,16 +67,6 @@ static unsigned int offset_in_page(void *addr)
 static uint32_t __supervisor_create_context(int i915,
 					    const struct intel_execution_engine2 *e)
 {
-	struct drm_i915_gem_context_create_ext_setparam p_ring = {
-		{
-			.name = I915_CONTEXT_CREATE_EXT_SETPARAM,
-			.next_extension = 0
-		},
-		{
-			.param = I915_CONTEXT_PARAM_RINGSIZE,
-			.value = 4096,
-		},
-	};
 	I915_DEFINE_CONTEXT_PARAM_ENGINES(engines, 2) = {
 		.engines = {
 			{ e->class, e->instance },
@@ -86,7 +76,7 @@ static uint32_t __supervisor_create_context(int i915,
 	struct drm_i915_gem_context_create_ext_setparam p_engines = {
 		{
 			.name = I915_CONTEXT_CREATE_EXT_SETPARAM,
-			.next_extension = to_user_pointer(&p_ring)
+			.next_extension = 0,
 		},
 		{
 			.param = I915_CONTEXT_PARAM_ENGINES,
-- 
2.29.2

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

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [igt-dev] [PATCH i-g-t 4/9] tests/i915/gem_ctx_param: Drop the zeromap subtests
  2021-03-23  3:51   ` [igt-dev] [PATCH i-g-t 0/9] Adjust IGT for upstream API clean-ups (v2) Jason Ekstrand
                       ` (2 preceding siblings ...)
  2021-03-23  3:51     ` [igt-dev] [PATCH i-g-t 3/9] tests/i915/gem_exec_endless: Stop setting the ring size Jason Ekstrand
@ 2021-03-23  3:51     ` Jason Ekstrand
  2021-03-23  3:51     ` [igt-dev] [PATCH i-g-t 5/9] tests/i915: Drop gem_ctx_clone Jason Ekstrand
                       ` (4 subsequent siblings)
  8 siblings, 0 replies; 44+ messages in thread
From: Jason Ekstrand @ 2021-03-23  3:51 UTC (permalink / raw)
  To: igt-dev

The idea behind this param is to support OpenCL drivers with relocations
because OpenCL reserves 0x0 for NULL and, if we placed memory there, it
would confuse CL kernels.  It was originally sent out as part of a patch
series including libdrm [1] and Beignet [2] support.  However, the
libdrm and Beignet patches never landed in their respective upstream
projects so this API has never been used.  It's never been used in Mesa
or any other driver, either.

This means that these IGT tests are the only userspace for NO_ZEROMAP
which has ever really existed.  Let's drop them and drop support from
i915 as well.

[1]: https://lists.freedesktop.org/archives/intel-gfx/2015-May/067030.html
[2]: https://lists.freedesktop.org/archives/intel-gfx/2015-May/067031.html

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 tests/i915/gem_ctx_param.c | 33 ---------------------------------
 1 file changed, 33 deletions(-)

diff --git a/tests/i915/gem_ctx_param.c b/tests/i915/gem_ctx_param.c
index ab0e3007..47fea06d 100644
--- a/tests/i915/gem_ctx_param.c
+++ b/tests/i915/gem_ctx_param.c
@@ -335,39 +335,6 @@ igt_main
 		gem_context_set_param(fd, &arg);
 	}
 
-	arg.param = I915_CONTEXT_PARAM_NO_ZEROMAP;
-
-	igt_describe("Validates context set param ioctl in non root mode with param "
-	       "set to no zeromap");
-	igt_subtest("non-root-set-no-zeromap") {
-		igt_fork(child, 1) {
-			igt_drop_root();
-
-			arg.ctx_id = ctx;
-			gem_context_get_param(fd, &arg);
-			arg.value--;
-			gem_context_set_param(fd, &arg);
-		}
-
-		igt_waitchildren();
-	}
-
-	igt_describe("Tests the context set param ioctl with no zeromap enabled in root mode");
-	igt_subtest("root-set-no-zeromap-enabled") {
-		arg.ctx_id = ctx;
-		gem_context_get_param(fd, &arg);
-		arg.value = 1;
-		gem_context_set_param(fd, &arg);
-	}
-
-	igt_describe("Tests the context set param ioctl with no zeromap disabled in root mode");
-	igt_subtest("root-set-no-zeromap-disabled") {
-		arg.ctx_id = ctx;
-		gem_context_get_param(fd, &arg);
-		arg.value = 0;
-		gem_context_set_param(fd, &arg);
-	}
-
 	igt_describe("Tests that multiple contexts can share the same VMA");
 	igt_subtest("vm")
 		test_vm(fd);
-- 
2.29.2

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

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [igt-dev] [PATCH i-g-t 5/9] tests/i915: Drop gem_ctx_clone
  2021-03-23  3:51   ` [igt-dev] [PATCH i-g-t 0/9] Adjust IGT for upstream API clean-ups (v2) Jason Ekstrand
                       ` (3 preceding siblings ...)
  2021-03-23  3:51     ` [igt-dev] [PATCH i-g-t 4/9] tests/i915/gem_ctx_param: Drop the zeromap subtests Jason Ekstrand
@ 2021-03-23  3:51     ` Jason Ekstrand
  2021-03-23  3:51     ` [igt-dev] [PATCH i-g-t 6/9] tests/i915/gem_ctx_create: Stop cloning engines Jason Ekstrand
                       ` (3 subsequent siblings)
  8 siblings, 0 replies; 44+ messages in thread
From: Jason Ekstrand @ 2021-03-23  3:51 UTC (permalink / raw)
  To: igt-dev

We're going to be deleting the CONTEXT_CLONE API since IGT is the only
userspace to ever use it.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 tests/Makefile.sources     |   3 -
 tests/i915/gem_ctx_clone.c | 450 -------------------------------------
 tests/meson.build          |   1 -
 3 files changed, 454 deletions(-)
 delete mode 100644 tests/i915/gem_ctx_clone.c

diff --git a/tests/Makefile.sources b/tests/Makefile.sources
index bffa0db3..a0c23c1f 100644
--- a/tests/Makefile.sources
+++ b/tests/Makefile.sources
@@ -169,9 +169,6 @@ gem_cs_tlb_SOURCES = i915/gem_cs_tlb.c
 TESTS_progs += gem_ctx_bad_destroy
 gem_ctx_bad_destroy_SOURCES = i915/gem_ctx_bad_destroy.c
 
-TESTS_progs += gem_ctx_clone
-gem_ctx_clone_SOURCES = i915/gem_ctx_clone.c
-
 TESTS_progs += gem_ctx_create
 gem_ctx_create_SOURCES = i915/gem_ctx_create.c
 
diff --git a/tests/i915/gem_ctx_clone.c b/tests/i915/gem_ctx_clone.c
deleted file mode 100644
index b72269bc..00000000
--- a/tests/i915/gem_ctx_clone.c
+++ /dev/null
@@ -1,450 +0,0 @@
-/*
- * Copyright © 2019 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "i915/gem.h"
-#include "i915/gem_vm.h"
-#include "i915_drm.h"
-#include "igt.h"
-#include "igt_gt.h"
-
-static int ctx_create_ioctl(int i915, struct drm_i915_gem_context_create_ext *arg)
-{
-	int err;
-
-	err = 0;
-	if (igt_ioctl(i915, DRM_IOCTL_I915_GEM_CONTEXT_CREATE_EXT, arg)) {
-		err = -errno;
-		igt_assume(err);
-	}
-
-	errno = 0;
-	return err;
-}
-
-static void invalid_clone(int i915)
-{
-	struct drm_i915_gem_context_create_ext_clone ext = {
-		{ .name = I915_CONTEXT_CREATE_EXT_CLONE },
-	};
-	struct drm_i915_gem_context_create_ext create = {
-		.flags = I915_CONTEXT_CREATE_FLAGS_USE_EXTENSIONS,
-		.extensions = to_user_pointer(&ext),
-	};
-
-	igt_assert_eq(ctx_create_ioctl(i915, &create), 0);
-	gem_context_destroy(i915, create.ctx_id);
-
-	ext.flags = -1; /* Hopefully we won't run out of flags */
-	igt_assert_eq(ctx_create_ioctl(i915, &create), -EINVAL);
-	ext.flags = 0;
-
-	ext.base.next_extension = -1;
-	igt_assert_eq(ctx_create_ioctl(i915, &create), -EFAULT);
-	ext.base.next_extension = to_user_pointer(&ext);
-	igt_assert_eq(ctx_create_ioctl(i915, &create), -E2BIG);
-	ext.base.next_extension = 0;
-
-	ext.clone_id = -1;
-	igt_assert_eq(ctx_create_ioctl(i915, &create), -ENOENT);
-	ext.clone_id = 0;
-}
-
-static void clone_flags(int i915)
-{
-	struct drm_i915_gem_context_create_ext_setparam set = {
-		{ .name = I915_CONTEXT_CREATE_EXT_SETPARAM },
-		{ .param = I915_CONTEXT_PARAM_RECOVERABLE },
-	};
-	struct drm_i915_gem_context_create_ext_clone ext = {
-		{ .name = I915_CONTEXT_CREATE_EXT_CLONE },
-		.flags = I915_CONTEXT_CLONE_FLAGS,
-	};
-	struct drm_i915_gem_context_create_ext create = {
-		.flags = I915_CONTEXT_CREATE_FLAGS_USE_EXTENSIONS,
-		.extensions = to_user_pointer(&ext),
-	};
-	int expected;
-
-	set.param.value = 1; /* default is recoverable */
-	igt_require(__gem_context_set_param(i915, &set.param) == 0);
-
-	for (int pass = 0; pass < 2; pass++) { /* cloning default, then child */
-		igt_debug("Cloning %d\n", ext.clone_id);
-		igt_assert_eq(ctx_create_ioctl(i915, &create), 0);
-
-		set.param.ctx_id = ext.clone_id;
-		gem_context_get_param(i915, &set.param);
-		expected = set.param.value;
-
-		set.param.ctx_id = create.ctx_id;
-		gem_context_get_param(i915, &set.param);
-
-		igt_assert_eq_u64(set.param.param,
-				  I915_CONTEXT_PARAM_RECOVERABLE);
-		igt_assert_eq((int)set.param.value, expected);
-
-		gem_context_destroy(i915, create.ctx_id);
-
-		expected = set.param.value = 0;
-		set.param.ctx_id = ext.clone_id;
-		gem_context_set_param(i915, &set.param);
-
-		igt_assert_eq(ctx_create_ioctl(i915, &create), 0);
-
-		set.param.ctx_id = create.ctx_id;
-		gem_context_get_param(i915, &set.param);
-
-		igt_assert_eq_u64(set.param.param,
-				  I915_CONTEXT_PARAM_RECOVERABLE);
-		igt_assert_eq((int)set.param.value, expected);
-
-		gem_context_destroy(i915, create.ctx_id);
-
-		/* clone but then reset priority to default... */
-		set.param.ctx_id = 0;
-		set.param.value = 1;
-		ext.base.next_extension = to_user_pointer(&set);
-		igt_assert_eq(ctx_create_ioctl(i915, &create), 0);
-		ext.base.next_extension = 0;
-
-		/* then new context should have updated priority... */
-		set.param.ctx_id = create.ctx_id;
-		gem_context_get_param(i915, &set.param);
-		igt_assert_eq_u64(set.param.value, 1);
-
-		/* but original context should have default priority */
-		set.param.ctx_id = ext.clone_id;
-		gem_context_get_param(i915, &set.param);
-		igt_assert_eq_u64(set.param.value, 0);
-
-		gem_context_destroy(i915, create.ctx_id);
-		ext.clone_id = gem_context_create(i915);
-	}
-
-	gem_context_destroy(i915, ext.clone_id);
-}
-
-static void clone_engines(int i915)
-{
-	struct drm_i915_gem_context_create_ext_setparam set = {
-		{ .name = I915_CONTEXT_CREATE_EXT_SETPARAM },
-		{ .param = I915_CONTEXT_PARAM_ENGINES },
-	};
-	struct drm_i915_gem_context_create_ext_clone ext = {
-		{ .name = I915_CONTEXT_CREATE_EXT_CLONE },
-		.flags = I915_CONTEXT_CLONE_ENGINES,
-	};
-	struct drm_i915_gem_context_create_ext create = {
-		.flags = I915_CONTEXT_CREATE_FLAGS_USE_EXTENSIONS,
-		.extensions = to_user_pointer(&ext),
-	};
-	I915_DEFINE_CONTEXT_PARAM_ENGINES(expected, 64);
-	I915_DEFINE_CONTEXT_PARAM_ENGINES(engines, 64);
-	uint64_t ex_size;
-
-	memset(&expected, 0, sizeof(expected));
-	memset(&engines, 0, sizeof(engines));
-
-	igt_require(__gem_context_set_param(i915, &set.param) == 0);
-
-	for (int pass = 0; pass < 2; pass++) { /* cloning default, then child */
-		igt_debug("Cloning %d\n", ext.clone_id);
-		igt_assert_eq(ctx_create_ioctl(i915, &create), 0);
-
-		/* Check that we cloned the engine map */
-		set.param.ctx_id = ext.clone_id;
-		set.param.size = sizeof(expected);
-		set.param.value = to_user_pointer(&expected);
-		gem_context_get_param(i915, &set.param);
-		ex_size = set.param.size;
-
-		set.param.ctx_id = create.ctx_id;
-		set.param.size = sizeof(engines);
-		set.param.value = to_user_pointer(&engines);
-		gem_context_get_param(i915, &set.param);
-
-		igt_assert_eq_u64(set.param.param, I915_CONTEXT_PARAM_ENGINES);
-		igt_assert_eq_u64(set.param.size, ex_size);
-		igt_assert(!memcmp(&engines, &expected, ex_size));
-
-		gem_context_destroy(i915, create.ctx_id);
-
-		/* Check that the clone will replace an earlier set */
-		expected.engines[0].engine_class =
-			I915_ENGINE_CLASS_INVALID;
-		expected.engines[0].engine_instance =
-			I915_ENGINE_CLASS_INVALID_NONE;
-		ex_size = (sizeof(struct i915_context_param_engines) +
-			   sizeof(expected.engines[0]));
-
-		set.param.ctx_id = ext.clone_id;
-		set.param.size = ex_size;
-		set.param.value = to_user_pointer(&expected);
-		gem_context_set_param(i915, &set.param);
-
-		igt_assert_eq(ctx_create_ioctl(i915, &create), 0);
-
-		set.param.ctx_id = create.ctx_id;
-		set.param.size = sizeof(engines);
-		set.param.value = to_user_pointer(&engines);
-		gem_context_get_param(i915, &set.param);
-
-		igt_assert_eq_u64(set.param.size, ex_size);
-		igt_assert(!memcmp(&engines, &expected, ex_size));
-
-		gem_context_destroy(i915, create.ctx_id);
-
-		/* clone but then reset engines to default */
-		set.param.ctx_id = 0;
-		set.param.size = 0;
-		set.param.value = 0;
-		ext.base.next_extension = to_user_pointer(&set);
-
-		igt_assert_eq(ctx_create_ioctl(i915, &create), 0);
-		ext.base.next_extension = 0;
-
-		set.param.ctx_id = create.ctx_id;
-		set.param.size = sizeof(engines);
-		set.param.value = to_user_pointer(&engines);
-		gem_context_get_param(i915, &set.param);
-		igt_assert_eq_u64(set.param.size, 0);
-
-		gem_context_destroy(i915, create.ctx_id);
-
-		/* And check we ignore the flag */
-		ext.flags = 0;
-		igt_assert_eq(ctx_create_ioctl(i915, &create), 0);
-		ext.flags = I915_CONTEXT_CLONE_ENGINES;
-
-		set.param.ctx_id = create.ctx_id;
-		set.param.size = sizeof(engines);
-		set.param.value = to_user_pointer(&engines);
-		gem_context_get_param(i915, &set.param);
-		igt_assert_eq_u64(set.param.size, 0);
-
-		ext.clone_id = gem_context_create(i915);
-	}
-
-	gem_context_destroy(i915, ext.clone_id);
-}
-
-static void clone_scheduler(int i915)
-{
-	struct drm_i915_gem_context_create_ext_setparam set = {
-		{ .name = I915_CONTEXT_CREATE_EXT_SETPARAM },
-		{ .param = I915_CONTEXT_PARAM_PRIORITY },
-	};
-	struct drm_i915_gem_context_create_ext_clone ext = {
-		{ .name = I915_CONTEXT_CREATE_EXT_CLONE },
-		.flags = I915_CONTEXT_CLONE_SCHEDATTR,
-	};
-	struct drm_i915_gem_context_create_ext create = {
-		.flags = I915_CONTEXT_CREATE_FLAGS_USE_EXTENSIONS,
-		.extensions = to_user_pointer(&ext),
-	};
-	int expected;
-
-	igt_require(__gem_context_set_param(i915, &set.param) == 0);
-
-	for (int pass = 0; pass < 2; pass++) { /* cloning default, then child */
-		igt_debug("Cloning %d\n", ext.clone_id);
-		igt_assert_eq(ctx_create_ioctl(i915, &create), 0);
-
-		set.param.ctx_id = ext.clone_id;
-		gem_context_get_param(i915, &set.param);
-		expected = set.param.value;
-
-		set.param.ctx_id = create.ctx_id;
-		gem_context_get_param(i915, &set.param);
-
-		igt_assert_eq_u64(set.param.param, I915_CONTEXT_PARAM_PRIORITY);
-		igt_assert_eq((int)set.param.value, expected);
-
-		gem_context_destroy(i915, create.ctx_id);
-
-		expected = set.param.value = 1;
-		set.param.ctx_id = ext.clone_id;
-		gem_context_set_param(i915, &set.param);
-
-		igt_assert_eq(ctx_create_ioctl(i915, &create), 0);
-
-		set.param.ctx_id = create.ctx_id;
-		gem_context_get_param(i915, &set.param);
-
-		igt_assert_eq_u64(set.param.param, I915_CONTEXT_PARAM_PRIORITY);
-		igt_assert_eq((int)set.param.value, expected);
-
-		gem_context_destroy(i915, create.ctx_id);
-
-		/* clone but then reset priority to default */
-		set.param.ctx_id = 0;
-		set.param.value = 0;
-		ext.base.next_extension = to_user_pointer(&set);
-		igt_assert_eq(ctx_create_ioctl(i915, &create), 0);
-		ext.base.next_extension = 0;
-
-		set.param.ctx_id = create.ctx_id;
-		gem_context_get_param(i915, &set.param);
-		igt_assert_eq_u64(set.param.value, 0);
-
-		set.param.ctx_id = ext.clone_id;
-		gem_context_get_param(i915, &set.param);
-		igt_assert_eq_u64(set.param.value, 1);
-
-		gem_context_destroy(i915, create.ctx_id);
-		ext.clone_id = gem_context_create(i915);
-	}
-
-	gem_context_destroy(i915, ext.clone_id);
-}
-
-static uint32_t __batch_create(int i915, uint32_t offset)
-{
-	const uint32_t bbe = MI_BATCH_BUFFER_END;
-	uint32_t handle;
-
-	handle = gem_create(i915, ALIGN(offset + 4, 4096));
-	gem_write(i915, handle, offset, &bbe, sizeof(bbe));
-
-	return handle;
-}
-
-static uint32_t batch_create(int i915)
-{
-	return __batch_create(i915, 0);
-}
-
-static void check_same_vm(int i915, uint32_t ctx_a, uint32_t ctx_b)
-{
-	struct drm_i915_gem_exec_object2 batch = {
-		.handle = batch_create(i915),
-	};
-	struct drm_i915_gem_execbuffer2 eb = {
-		.buffers_ptr = to_user_pointer(&batch),
-		.buffer_count = 1,
-	};
-
-	/* First verify that we try to use "softpinning" by default */
-	batch.offset = 48 << 20;
-	eb.rsvd1 = ctx_a;
-	gem_execbuf(i915, &eb);
-	igt_assert_eq_u64(batch.offset, 48 << 20);
-
-	/* An already active VMA will try to keep its offset */
-	batch.offset = 0;
-	eb.rsvd1 = ctx_b;
-	gem_execbuf(i915, &eb);
-	igt_assert_eq_u64(batch.offset, 48 << 20);
-
-	gem_sync(i915, batch.handle);
-	gem_close(i915, batch.handle);
-
-	gem_quiescent_gpu(i915); /* evict the vma */
-}
-
-static void clone_vm(int i915)
-{
-	struct drm_i915_gem_context_param set = {
-		.param = I915_CONTEXT_PARAM_VM,
-	};
-	struct drm_i915_gem_context_create_ext_clone ext = {
-		{ .name = I915_CONTEXT_CREATE_EXT_CLONE },
-		.flags = I915_CONTEXT_CLONE_VM,
-	};
-	struct drm_i915_gem_context_create_ext create = {
-		.flags = I915_CONTEXT_CREATE_FLAGS_USE_EXTENSIONS,
-		.extensions = to_user_pointer(&ext),
-	};
-	uint32_t vm_id[2];
-
-	igt_require(__gem_context_set_param(i915, &set) == -ENOENT);
-
-	/* Scrub the VM for our tests */
-	i915 = gem_reopen_driver(i915);
-
-	set.ctx_id = gem_context_create(i915);
-	gem_context_get_param(i915, &set);
-	vm_id[0] = set.value;
-	gem_context_destroy(i915, set.ctx_id);
-
-	vm_id[1] = gem_vm_create(i915);
-
-	for (int pass = 0; pass < 2; pass++) { /* cloning default, then child */
-		igt_debug("Cloning %d\n", ext.clone_id);
-
-		igt_assert_eq(ctx_create_ioctl(i915, &create), 0);
-		check_same_vm(i915, ext.clone_id, create.ctx_id);
-		gem_context_destroy(i915, create.ctx_id);
-
-		set.value = vm_id[pass];
-		set.ctx_id = ext.clone_id;
-		gem_context_set_param(i915, &set);
-
-		igt_assert_eq(ctx_create_ioctl(i915, &create), 0);
-		check_same_vm(i915, ext.clone_id, create.ctx_id);
-		gem_context_destroy(i915, create.ctx_id);
-
-		ext.clone_id = gem_context_create(i915);
-	}
-
-	gem_context_destroy(i915, ext.clone_id);
-
-	for (int i = 0; i < ARRAY_SIZE(vm_id); i++)
-		gem_vm_destroy(i915, vm_id[i]);
-
-	close(i915);
-}
-
-igt_main
-{
-	int i915 = -1;
-
-	igt_fixture {
-		i915 = drm_open_driver(DRIVER_INTEL);
-		igt_require_gem(i915);
-		gem_require_contexts(i915);
-
-		igt_require(gem_has_context_clone(i915));
-		igt_fork_hang_detector(i915);
-	}
-
-	igt_subtest("invalid")
-		invalid_clone(i915);
-
-	igt_subtest("engines")
-		clone_engines(i915);
-
-	igt_subtest("flags")
-		clone_flags(i915);
-
-	igt_subtest("scheduler")
-		clone_scheduler(i915);
-
-	igt_subtest("vm")
-		clone_vm(i915);
-
-	igt_fixture {
-		igt_stop_hang_detector();
-		close(i915);
-	}
-}
diff --git a/tests/meson.build b/tests/meson.build
index c85768e1..45c07763 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -127,7 +127,6 @@ i915_progs = [
 	'gem_concurrent_blit',
 	'gem_cs_tlb',
 	'gem_ctx_bad_destroy',
-	'gem_ctx_clone',
 	'gem_ctx_create',
 	'gem_ctx_engines',
 	'gem_ctx_exec',
-- 
2.29.2

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

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [igt-dev] [PATCH i-g-t 6/9] tests/i915/gem_ctx_create: Stop cloning engines
  2021-03-23  3:51   ` [igt-dev] [PATCH i-g-t 0/9] Adjust IGT for upstream API clean-ups (v2) Jason Ekstrand
                       ` (4 preceding siblings ...)
  2021-03-23  3:51     ` [igt-dev] [PATCH i-g-t 5/9] tests/i915: Drop gem_ctx_clone Jason Ekstrand
@ 2021-03-23  3:51     ` Jason Ekstrand
  2021-03-23  3:51     ` [igt-dev] [PATCH i-g-t 7/9] tests/i915/gem_ctx_persistence: Drop the clone test Jason Ekstrand
                       ` (2 subsequent siblings)
  8 siblings, 0 replies; 44+ messages in thread
From: Jason Ekstrand @ 2021-03-23  3:51 UTC (permalink / raw)
  To: igt-dev

There's no reason to clone engines here, especially when context 0 is
just a default context so creating a new context will have the same
engines as context 0.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 tests/i915/gem_ctx_create.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/tests/i915/gem_ctx_create.c b/tests/i915/gem_ctx_create.c
index 9a512a03..7d2ee8fb 100644
--- a/tests/i915/gem_ctx_create.c
+++ b/tests/i915/gem_ctx_create.c
@@ -299,9 +299,7 @@ static void maximum(int fd, int ncpus, unsigned mode)
 
 		err = -ENOMEM;
 		if (avail_mem > (count + 1) * ctx_size)
-			err =  __gem_context_clone(fd, 0,
-						   I915_CONTEXT_CLONE_ENGINES,
-						   0, &ctx_id);
+			err =  __gem_context_create(fd, &ctx_id);
 		if (err) {
 			igt_info("Created %lu contexts, before failing with '%s' [%d]\n",
 				 count, strerror(-err), -err);
-- 
2.29.2

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

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [igt-dev] [PATCH i-g-t 7/9] tests/i915/gem_ctx_persistence: Drop the clone test
  2021-03-23  3:51   ` [igt-dev] [PATCH i-g-t 0/9] Adjust IGT for upstream API clean-ups (v2) Jason Ekstrand
                       ` (5 preceding siblings ...)
  2021-03-23  3:51     ` [igt-dev] [PATCH i-g-t 6/9] tests/i915/gem_ctx_create: Stop cloning engines Jason Ekstrand
@ 2021-03-23  3:51     ` Jason Ekstrand
  2021-03-23  3:51     ` [igt-dev] [PATCH i-g-t 8/9] tests/i915/gem_exec_balancer: Stop cloning engines Jason Ekstrand
  2021-03-23  3:51     ` [igt-dev] [PATCH i-g-t 9/9] lib/i915/gem_context: Implement VM and engine cloning manually (v3) Jason Ekstrand
  8 siblings, 0 replies; 44+ messages in thread
From: Jason Ekstrand @ 2021-03-23  3:51 UTC (permalink / raw)
  To: igt-dev

We're going to be deleting the CONTEXT_CLONE API since IGT is the only
userspace to ever use it.  Drop the tests for it.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 tests/i915/gem_ctx_persistence.c | 30 ------------------------------
 1 file changed, 30 deletions(-)

diff --git a/tests/i915/gem_ctx_persistence.c b/tests/i915/gem_ctx_persistence.c
index 10d057f1..91c30176 100644
--- a/tests/i915/gem_ctx_persistence.c
+++ b/tests/i915/gem_ctx_persistence.c
@@ -147,33 +147,6 @@ static void test_idempotent(int i915)
 	igt_assert_eq(p.value, expected);
 }
 
-static void test_clone(int i915)
-{
-	struct drm_i915_gem_context_param p = {
-		.param = I915_CONTEXT_PARAM_PERSISTENCE,
-	};
-	uint32_t ctx, clone;
-
-	/*
-	 * Check that persistence is inherited across a clone.
-	 */
-	igt_require( __gem_context_create(i915, &ctx) == 0);
-
-	p.ctx_id = ctx;
-	p.value = 0;
-	gem_context_set_param(i915, &p);
-
-	clone = gem_context_clone(i915, ctx, I915_CONTEXT_CLONE_FLAGS, 0);
-	gem_context_destroy(i915, ctx);
-
-	p.ctx_id = clone;
-	p.value = -1;
-	gem_context_get_param(i915, &p);
-	igt_assert_eq(p.value, 0);
-
-	gem_context_destroy(i915, clone);
-}
-
 static void test_persistence(int i915, unsigned int engine)
 {
 	igt_spin_t *spin;
@@ -1366,9 +1339,6 @@ igt_main
 	igt_subtest("idempotent")
 		test_idempotent(i915);
 
-	igt_subtest("clone")
-		test_clone(i915);
-
 	igt_subtest("file")
 		test_nonpersistent_file(i915);
 
-- 
2.29.2

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

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [igt-dev] [PATCH i-g-t 8/9] tests/i915/gem_exec_balancer: Stop cloning engines
  2021-03-23  3:51   ` [igt-dev] [PATCH i-g-t 0/9] Adjust IGT for upstream API clean-ups (v2) Jason Ekstrand
                       ` (6 preceding siblings ...)
  2021-03-23  3:51     ` [igt-dev] [PATCH i-g-t 7/9] tests/i915/gem_ctx_persistence: Drop the clone test Jason Ekstrand
@ 2021-03-23  3:51     ` Jason Ekstrand
  2021-03-23  3:51     ` [igt-dev] [PATCH i-g-t 9/9] lib/i915/gem_context: Implement VM and engine cloning manually (v3) Jason Ekstrand
  8 siblings, 0 replies; 44+ messages in thread
From: Jason Ekstrand @ 2021-03-23  3:51 UTC (permalink / raw)
  To: igt-dev

We've got the parameters to setup the balancer right there; we may as
well use them directly.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
---
 tests/i915/gem_exec_balancer.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/tests/i915/gem_exec_balancer.c b/tests/i915/gem_exec_balancer.c
index bfd65b29..19948ecb 100644
--- a/tests/i915/gem_exec_balancer.c
+++ b/tests/i915/gem_exec_balancer.c
@@ -826,8 +826,8 @@ static void bonded_slice(int i915)
 		igt_fork(child, count + 1) { /* C: arbitrary background load */
 			igt_list_del(&spin->link);
 
-			ctx = gem_context_clone(i915, ctx,
-						I915_CONTEXT_CLONE_ENGINES, 0);
+			ctx = gem_context_create(i915);
+			set_load_balancer(i915, ctx, siblings, count, NULL);
 
 			while (!READ_ONCE(*stop)) {
 				spin = igt_spin_new(i915,
@@ -2442,8 +2442,7 @@ static void nop(int i915)
 				.buffers_ptr = to_user_pointer(&batch),
 				.buffer_count = 1,
 				.flags = child + 1,
-				.rsvd1 = gem_context_clone(i915, ctx,
-							   I915_CONTEXT_CLONE_ENGINES, 0),
+				.rsvd1 = load_balancer_create(i915, ci, count),
 			};
 			struct timespec tv = {};
 			unsigned long nops;
-- 
2.29.2

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

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [igt-dev] [PATCH i-g-t 9/9] lib/i915/gem_context: Implement VM and engine cloning manually (v3)
  2021-03-23  3:51   ` [igt-dev] [PATCH i-g-t 0/9] Adjust IGT for upstream API clean-ups (v2) Jason Ekstrand
                       ` (7 preceding siblings ...)
  2021-03-23  3:51     ` [igt-dev] [PATCH i-g-t 8/9] tests/i915/gem_exec_balancer: Stop cloning engines Jason Ekstrand
@ 2021-03-23  3:51     ` Jason Ekstrand
  8 siblings, 0 replies; 44+ messages in thread
From: Jason Ekstrand @ 2021-03-23  3:51 UTC (permalink / raw)
  To: igt-dev

We're going to be deleting the CONTEXT_CLONE API since IGT is the only
userspace to ever use it.  There are only two bits of this API that IGT
uses in interesting ways so implement them as create params instead of
cloning.

v2 (Jason Ekstrand):
 - Fix our usage of the param struct for VM cloning
 - Handle the case of zero user engines properly
 - Assert that all cloned engines are physical, not virtual

v3 (Jason Ekstrand):
 - Drop gem_has_context_clone()
 - Add docs for [__]gem_context_clone()

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
---
 lib/i915/gem_context.c         | 157 +++++++++++++++++++++++++--------
 lib/i915/gem_context.h         |   9 +-
 tests/i915/gem_ctx_shared.c    |  10 +--
 tests/i915/gem_exec_balancer.c |   2 +-
 tests/i915/gem_exec_schedule.c |   8 +-
 5 files changed, 133 insertions(+), 53 deletions(-)

diff --git a/lib/i915/gem_context.c b/lib/i915/gem_context.c
index 79411e10..d0eb3159 100644
--- a/lib/i915/gem_context.c
+++ b/lib/i915/gem_context.c
@@ -334,28 +334,110 @@ bool gem_context_has_persistence(int i915)
 	return __gem_context_get_param(i915, &param) == 0;
 }
 
+static void
+add_ctx_create_ext(struct drm_i915_gem_context_create_ext *ctx,
+		   struct i915_user_extension *ext)
+{
+	ext->next_extension = ctx->extensions;
+	ctx->extensions = to_user_pointer(ext);
+}
+
+/**
+ * __gem_context_clone:
+ * @i915: open i915 drm file descriptor
+ * @src: i915 context id from which to clone parameters
+ * @clone: bitfield of parameters to clone
+ * @flags: context creation flags
+ * @out: resulting context
+ *
+ * Special purpose wrapper to create a new context by cloning params from @src.
+ *
+ * Currently, we support cloning the VM and the engine set.  Engine set
+ * cloning is only supported if they're all "real" engines.  Virtual bonded
+ * or balanced are not supported.
+ */
 int
 __gem_context_clone(int i915,
-		    uint32_t src, unsigned int share,
+		    uint32_t src, unsigned int clone,
 		    unsigned int flags,
 		    uint32_t *out)
 {
-	struct drm_i915_gem_context_create_ext_clone clone = {
-		{ .name = I915_CONTEXT_CREATE_EXT_CLONE },
-		.clone_id = src,
-		.flags = share,
-	};
-	struct drm_i915_gem_context_create_ext arg = {
+	I915_DEFINE_CONTEXT_PARAM_ENGINES(engines, I915_EXEC_RING_MASK + 1);
+	struct drm_i915_gem_context_create_ext_setparam engines_param, vm_param;
+	unsigned i, count;
+	int err;
+
+	struct drm_i915_gem_context_create_ext ctx_create = {
 		.flags = flags | I915_CONTEXT_CREATE_FLAGS_USE_EXTENSIONS,
-		.extensions = to_user_pointer(&clone),
+		.extensions = 0,
 	};
-	int err;
 
-	err = create_ext_ioctl(i915, &arg);
+	if (clone & GEM_CONTEXT_CLONE_ENGINES) {
+		engines_param = (struct drm_i915_gem_context_create_ext_setparam) {
+			.base = {
+				.name = I915_CONTEXT_CREATE_EXT_SETPARAM,
+			},
+			.param = {
+				.param = I915_CONTEXT_PARAM_ENGINES,
+				.size = sizeof(engines),
+				.value = to_user_pointer(&engines),
+			},
+		};
+
+		engines_param.param.ctx_id = src;
+		err = __gem_context_get_param(i915, &engines_param.param);
+		igt_assert_eq(err, 0);
+		if (err)
+			return err;
+
+		if (engines_param.param.size > 0) {
+			igt_assert(engines_param.param.size > sizeof(uint64_t));
+			count = (engines_param.param.size - sizeof(uint64_t)) /
+				sizeof(struct i915_engine_class_instance);
+
+			igt_debug("Cloning context with %u engines:\n", count);
+			for (i = 0; i < count; i++) {
+				igt_debug("    %d, %d\n",
+					  (int)(int16_t)engines.engines[i].engine_class,
+					  (int)(int16_t)engines.engines[i].engine_instance);
+				/* We can't clone virtual engines */
+				igt_assert((int16_t)engines.engines[i].engine_class >= 0);
+				igt_assert((int16_t)engines.engines[i].engine_instance >= 0);
+			}
+
+			engines_param.param.ctx_id = 0;
+			add_ctx_create_ext(&ctx_create, &engines_param.base);
+		}
+	}
+
+	if (clone & GEM_CONTEXT_CLONE_VM) {
+		vm_param = (struct drm_i915_gem_context_create_ext_setparam) {
+			.base = {
+				.name = I915_CONTEXT_CREATE_EXT_SETPARAM,
+			},
+			.param = {
+				.param = I915_CONTEXT_PARAM_VM,
+			},
+		};
+
+		vm_param.param.ctx_id = src;
+		err = __gem_context_get_param(i915, &vm_param.param);
+		igt_assert_eq(err, 0);
+		if (err)
+			return err;
+
+		igt_debug("vm: %d\n", (int)vm_param.param.value);
+
+		vm_param.param.ctx_id = 0;
+		add_ctx_create_ext(&ctx_create, &vm_param.base);
+	}
+
+	err = create_ext_ioctl(i915, &ctx_create);
+	igt_assert_eq(err, 0);
 	if (err)
 		return err;
 
-	*out = arg.ctx_id;
+	*out = ctx_create.ctx_id;
 	return 0;
 }
 
@@ -373,41 +455,35 @@ static bool __gem_context_has(int i915, uint32_t share, unsigned int flags)
 
 bool gem_contexts_has_shared_gtt(int i915)
 {
-	return __gem_context_has(i915, I915_CONTEXT_CLONE_VM, 0);
+	return __gem_context_has(i915, GEM_CONTEXT_CLONE_VM, 0);
 }
 
 bool gem_has_queues(int i915)
 {
-	return __gem_context_has(i915,
-				 I915_CONTEXT_CLONE_VM,
+	return __gem_context_has(i915, GEM_CONTEXT_CLONE_VM,
 				 I915_CONTEXT_CREATE_FLAGS_SINGLE_TIMELINE);
 }
 
+/**
+ * gem_context_clone: Create a new context, cloning some params from another
+ * @i915: open i915 drm file descriptor
+ * @src: i915 context id from which to clone parameters
+ * @clone: bitfield of parameters to clone
+ * @flags: context creation flags
+ *
+ * Like __gem_context_clone, only asserts on failure.
+ */
 uint32_t gem_context_clone(int i915,
-			   uint32_t src, unsigned int share,
+			   uint32_t src, unsigned int clone,
 			   unsigned int flags)
 {
 	uint32_t ctx;
 
-	igt_assert_eq(__gem_context_clone(i915, src, share, flags, &ctx), 0);
+	igt_assert_eq(__gem_context_clone(i915, src, clone, flags, &ctx), 0);
 
 	return ctx;
 }
 
-bool gem_has_context_clone(int i915)
-{
-	struct drm_i915_gem_context_create_ext_clone ext = {
-		{ .name = I915_CONTEXT_CREATE_EXT_CLONE },
-		.clone_id = -1,
-	};
-	struct drm_i915_gem_context_create_ext create = {
-		.flags = I915_CONTEXT_CREATE_FLAGS_USE_EXTENSIONS,
-		.extensions = to_user_pointer(&ext),
-	};
-
-	return create_ext_ioctl(i915, &create) == -ENOENT;
-}
-
 /**
  * gem_context_clone_with_engines:
  * @i915: open i915 drm file descriptor
@@ -423,18 +499,21 @@ bool gem_has_context_clone(int i915)
  */
 uint32_t gem_context_clone_with_engines(int i915, uint32_t src)
 {
-	if (!gem_has_context_clone(i915))
-		return gem_context_create(i915);
-	else
-		return gem_context_clone(i915, src, I915_CONTEXT_CLONE_ENGINES,
-					 0);
+	uint32_t ctx;
+	int ret;
+
+	ret = __gem_context_clone(i915, src, GEM_CONTEXT_CLONE_ENGINES, 0, &ctx);
+	if (!ret)
+		return ctx;
+
+	return gem_context_create(i915);
 }
 
 uint32_t gem_queue_create(int i915)
 {
 	return gem_context_clone(i915, 0,
-				 I915_CONTEXT_CLONE_VM |
-				 I915_CONTEXT_CLONE_ENGINES,
+				 GEM_CONTEXT_CLONE_VM |
+				 GEM_CONTEXT_CLONE_ENGINES,
 				 I915_CONTEXT_CREATE_FLAGS_SINGLE_TIMELINE);
 }
 
@@ -448,8 +527,8 @@ uint32_t gem_queue_create(int i915)
 uint32_t gem_queue_clone_with_engines(int i915, uint32_t src)
 {
 	return gem_context_clone(i915, src,
-				 I915_CONTEXT_CLONE_ENGINES |
-				 I915_CONTEXT_CLONE_VM,
+				 GEM_CONTEXT_CLONE_ENGINES |
+				 GEM_CONTEXT_CLONE_VM,
 				 I915_CONTEXT_CREATE_FLAGS_SINGLE_TIMELINE);
 }
 
diff --git a/lib/i915/gem_context.h b/lib/i915/gem_context.h
index c2c2b827..a82f0325 100644
--- a/lib/i915/gem_context.h
+++ b/lib/i915/gem_context.h
@@ -37,12 +37,15 @@ int __gem_context_destroy(int fd, uint32_t ctx_id);
 uint32_t gem_context_create_for_engine(int fd, unsigned int class, unsigned int inst);
 uint32_t gem_context_create_for_class(int i915, unsigned int class, unsigned int *count);
 
+#define GEM_CONTEXT_CLONE_ENGINES (1 << 4)
+#define GEM_CONTEXT_CLONE_VM (1 << 5)
+
 int __gem_context_clone(int i915,
-			uint32_t src, unsigned int share,
+			uint32_t src, unsigned int clone,
 			unsigned int flags,
 			uint32_t *out);
 uint32_t gem_context_clone(int i915,
-			   uint32_t src, unsigned int share,
+			   uint32_t src, unsigned int clone,
 			   unsigned int flags);
 uint32_t gem_context_clone_with_engines(int i915, uint32_t src);
 void gem_context_copy_engines(int src_fd, uint32_t src,
@@ -59,8 +62,6 @@ void gem_require_contexts(int fd);
 void gem_context_require_bannable(int fd);
 void gem_context_require_param(int fd, uint64_t param);
 
-bool gem_has_context_clone(int i915);
-
 void gem_context_get_param(int fd, struct drm_i915_gem_context_param *p);
 void gem_context_set_param(int fd, struct drm_i915_gem_context_param *p);
 int __gem_context_set_param(int fd, struct drm_i915_gem_context_param *p);
diff --git a/tests/i915/gem_ctx_shared.c b/tests/i915/gem_ctx_shared.c
index 6b21994d..21b07083 100644
--- a/tests/i915/gem_ctx_shared.c
+++ b/tests/i915/gem_ctx_shared.c
@@ -82,7 +82,7 @@ static void create_shared_gtt(int i915, unsigned int flags)
 	igt_until_timeout(2) {
 		parent = flags & DETACHED ? child : 0;
 		child = gem_context_clone(i915,
-					  parent, I915_CONTEXT_CLONE_VM,
+					  parent, GEM_CONTEXT_CLONE_VM,
 					  0);
 		execbuf.rsvd1 = child;
 		gem_execbuf(i915, &execbuf);
@@ -98,7 +98,7 @@ static void create_shared_gtt(int i915, unsigned int flags)
 		execbuf.rsvd1 = parent;
 		igt_assert_eq(__gem_execbuf(i915, &execbuf), -ENOENT);
 		igt_assert_eq(__gem_context_clone(i915,
-						  parent, I915_CONTEXT_CLONE_VM,
+						  parent, GEM_CONTEXT_CLONE_VM,
 						  0, &parent), -ENOENT);
 	}
 	if (flags & DETACHED)
@@ -121,7 +121,7 @@ static void disjoint_timelines(int i915)
 	 * distinct timelines. A request queued to one context should be
 	 * independent of any shared contexts.
 	 */
-	child = gem_context_clone(i915, 0, I915_CONTEXT_CLONE_VM, 0);
+	child = gem_context_clone(i915, 0, GEM_CONTEXT_CLONE_VM, 0);
 	plug = igt_cork_plug(&cork, i915);
 
 	spin[0] = __igt_spin_new(i915, .ctx = 0, .dependency = plug);
@@ -161,7 +161,7 @@ static void exhaust_shared_gtt(int i915, unsigned int flags)
 		for (;;) {
 			parent = child;
 			err = __gem_context_clone(i915,
-						  parent, I915_CONTEXT_CLONE_VM,
+						  parent, GEM_CONTEXT_CLONE_VM,
 						  0, &child);
 			if (err)
 				break;
@@ -201,7 +201,7 @@ static void exec_shared_gtt(int i915, unsigned int ring)
 	int timeline;
 	int i;
 
-	clone = gem_context_clone(i915, 0, I915_CONTEXT_CLONE_VM, 0);
+	clone = gem_context_clone(i915, 0, GEM_CONTEXT_CLONE_VM, 0);
 
 	/* Find a hole big enough for both objects later */
 	scratch = gem_create(i915, 16384);
diff --git a/tests/i915/gem_exec_balancer.c b/tests/i915/gem_exec_balancer.c
index 19948ecb..5c0f52a6 100644
--- a/tests/i915/gem_exec_balancer.c
+++ b/tests/i915/gem_exec_balancer.c
@@ -627,7 +627,7 @@ static void bonded(int i915, unsigned int flags)
 		}
 
 		ctx = gem_context_clone(i915,
-					master, I915_CONTEXT_CLONE_VM,
+					master, GEM_CONTEXT_CLONE_VM,
 					I915_CONTEXT_CREATE_FLAGS_SINGLE_TIMELINE);
 		set_load_balancer(i915, ctx, siblings, count, &bonds[limit - 1]);
 
diff --git a/tests/i915/gem_exec_schedule.c b/tests/i915/gem_exec_schedule.c
index 9585059d..aedcdf33 100644
--- a/tests/i915/gem_exec_schedule.c
+++ b/tests/i915/gem_exec_schedule.c
@@ -1183,8 +1183,8 @@ noreorder(int i915, unsigned int engine, int prio, unsigned int flags)
 		fence = igt_cork_plug(&cork, i915);
 
 	ctx = gem_context_clone(i915, execbuf.rsvd1,
-			      I915_CONTEXT_CLONE_ENGINES |
-			      I915_CONTEXT_CLONE_VM,
+			      GEM_CONTEXT_CLONE_ENGINES |
+			      GEM_CONTEXT_CLONE_VM,
 			      0);
 	spin = igt_spin_new(i915, ctx,
 			    .engine = engine,
@@ -2428,9 +2428,9 @@ static void *iova_thread(struct ufd_thread *t, int prio)
 	unsigned int clone;
 	uint32_t ctx;
 
-	clone = I915_CONTEXT_CLONE_ENGINES;
+	clone = GEM_CONTEXT_CLONE_ENGINES;
 	if (t->flags & SHARED)
-		clone |= I915_CONTEXT_CLONE_VM;
+		clone |= GEM_CONTEXT_CLONE_VM;
 
 	ctx = gem_context_clone(t->i915, 0, clone, 0);
 	gem_context_set_priority(t->i915, ctx, prio);
-- 
2.29.2

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

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/9] tests/i915: Drop gem_ctx_ringsize
  2021-03-22 20:41 ` [igt-dev] [PATCH i-g-t 0/9] Adjust IGT for upstream API clean-ups (v2) Jason Ekstrand
                     ` (10 preceding siblings ...)
  2021-03-23  3:51   ` [igt-dev] [PATCH i-g-t 0/9] Adjust IGT for upstream API clean-ups (v2) Jason Ekstrand
@ 2021-03-23  4:33   ` Patchwork
  2021-03-23 23:40   ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
  12 siblings, 0 replies; 44+ messages in thread
From: Patchwork @ 2021-03-23  4:33 UTC (permalink / raw)
  To: Jason Ekstrand; +Cc: igt-dev


[-- Attachment #1.1: Type: text/plain, Size: 3917 bytes --]

== Series Details ==

Series: series starting with [i-g-t,1/9] tests/i915: Drop gem_ctx_ringsize
URL   : https://patchwork.freedesktop.org/series/88313/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_9882 -> IGTPW_5640
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/index.html

Known issues
------------

  Here are the changes found in IGTPW_5640 that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@gem_huc_copy@huc-copy:
    - fi-byt-j1900:       NOTRUN -> [SKIP][1] ([fdo#109271]) +27 similar issues
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/fi-byt-j1900/igt@gem_huc_copy@huc-copy.html

  * igt@gem_linear_blits@basic:
    - fi-kbl-8809g:       [PASS][2] -> [TIMEOUT][3] ([i915#2502] / [i915#3145])
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9882/fi-kbl-8809g/igt@gem_linear_blits@basic.html
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/fi-kbl-8809g/igt@gem_linear_blits@basic.html

  * igt@kms_chamelium@hdmi-crc-fast:
    - fi-byt-j1900:       NOTRUN -> [SKIP][4] ([fdo#109271] / [fdo#111827]) +8 similar issues
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/fi-byt-j1900/igt@kms_chamelium@hdmi-crc-fast.html

  * igt@prime_vgem@basic-fence-flip:
    - fi-tgl-y:           [PASS][5] -> [DMESG-WARN][6] ([i915#402]) +1 similar issue
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9882/fi-tgl-y/igt@prime_vgem@basic-fence-flip.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/fi-tgl-y/igt@prime_vgem@basic-fence-flip.html

  
#### Possible fixes ####

  * igt@gem_mmap_gtt@basic:
    - fi-tgl-y:           [DMESG-WARN][7] ([i915#402]) -> [PASS][8] +1 similar issue
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9882/fi-tgl-y/igt@gem_mmap_gtt@basic.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/fi-tgl-y/igt@gem_mmap_gtt@basic.html

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
  [i915#1222]: https://gitlab.freedesktop.org/drm/intel/issues/1222
  [i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982
  [i915#2502]: https://gitlab.freedesktop.org/drm/intel/issues/2502
  [i915#3145]: https://gitlab.freedesktop.org/drm/intel/issues/3145
  [i915#402]: https://gitlab.freedesktop.org/drm/intel/issues/402


Participating hosts (47 -> 41)
------------------------------

  Additional (1): fi-byt-j1900 
  Missing    (7): fi-ilk-m540 fi-hsw-4200u fi-bsw-cyan fi-ctg-p8600 fi-dg1-1 fi-icl-y fi-bdw-samus 


Build changes
-------------

  * CI: CI-20190529 -> None
  * IGT: IGT_6040 -> IGTPW_5640

  CI-20190529: 20190529
  CI_DRM_9882: 34f82d5853a3c6467ccf71e055e3432d2b12ecb9 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_5640: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/index.html
  IGT_6040: 69b578b6ab0a36750f0d23c223a3487fc88fb6a7 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools



== Testlist changes ==

-igt@gem_ctx_clone@engines
-igt@gem_ctx_clone@flags
-igt@gem_ctx_clone@invalid
-igt@gem_ctx_clone@scheduler
-igt@gem_ctx_clone@vm
-igt@gem_ctx_param@non-root-set-no-zeromap
-igt@gem_ctx_param@root-set-no-zeromap-disabled
-igt@gem_ctx_param@root-set-no-zeromap-enabled
-igt@gem_ctx_persistence@clone
-igt@gem_ctx_ringsize@active
-igt@gem_ctx_ringsize@clone
-igt@gem_ctx_ringsize@create
-igt@gem_ctx_ringsize@idempotent
-igt@gem_ctx_ringsize@idle
-igt@gem_ctx_ringsize@invalid
-igt@gem_ctx_ringsize@plugged
-igt@gem_exec_balancer@ringsize

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/index.html

[-- Attachment #1.2: Type: text/html, Size: 4734 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

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

^ permalink raw reply	[flat|nested] 44+ messages in thread

* [igt-dev] ✗ Fi.CI.IGT: failure for series starting with [i-g-t,1/9] tests/i915: Drop gem_ctx_ringsize
  2021-03-22 20:41 ` [igt-dev] [PATCH i-g-t 0/9] Adjust IGT for upstream API clean-ups (v2) Jason Ekstrand
                     ` (11 preceding siblings ...)
  2021-03-23  4:33   ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/9] tests/i915: Drop gem_ctx_ringsize Patchwork
@ 2021-03-23 23:40   ` Patchwork
  12 siblings, 0 replies; 44+ messages in thread
From: Patchwork @ 2021-03-23 23:40 UTC (permalink / raw)
  To: Jason Ekstrand; +Cc: igt-dev


[-- Attachment #1.1: Type: text/plain, Size: 30284 bytes --]

== Series Details ==

Series: series starting with [i-g-t,1/9] tests/i915: Drop gem_ctx_ringsize
URL   : https://patchwork.freedesktop.org/series/88313/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_9882_full -> IGTPW_5640_full
====================================================

Summary
-------

  **FAILURE**

  Serious unknown changes coming with IGTPW_5640_full absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in IGTPW_5640_full, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/index.html

Possible new issues
-------------------

  Here are the unknown changes that may have been introduced in IGTPW_5640_full:

### IGT changes ###

#### Possible regressions ####

  * igt@gem_ctx_shared@create-shared-gtt:
    - shard-iclb:         [PASS][1] -> [FAIL][2] +1 similar issue
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9882/shard-iclb8/igt@gem_ctx_shared@create-shared-gtt.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-iclb5/igt@gem_ctx_shared@create-shared-gtt.html
    - shard-kbl:          [PASS][3] -> [FAIL][4] +1 similar issue
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9882/shard-kbl1/igt@gem_ctx_shared@create-shared-gtt.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-kbl1/igt@gem_ctx_shared@create-shared-gtt.html

  * igt@gem_ctx_shared@detached-shared-gtt:
    - shard-tglb:         [PASS][5] -> [FAIL][6] +2 similar issues
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9882/shard-tglb6/igt@gem_ctx_shared@detached-shared-gtt.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-tglb1/igt@gem_ctx_shared@detached-shared-gtt.html
    - shard-kbl:          NOTRUN -> [FAIL][7]
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-kbl6/igt@gem_ctx_shared@detached-shared-gtt.html
    - shard-glk:          [PASS][8] -> [FAIL][9] +1 similar issue
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9882/shard-glk5/igt@gem_ctx_shared@detached-shared-gtt.html
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-glk8/igt@gem_ctx_shared@detached-shared-gtt.html
    - shard-snb:          [PASS][10] -> [FAIL][11]
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9882/shard-snb2/igt@gem_ctx_shared@detached-shared-gtt.html
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-snb6/igt@gem_ctx_shared@detached-shared-gtt.html

  * igt@gem_ctx_shared@q-smoketest:
    - shard-snb:          NOTRUN -> [FAIL][12] +4 similar issues
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-snb2/igt@gem_ctx_shared@q-smoketest.html

  * igt@gem_workarounds@suspend-resume-context:
    - shard-snb:          NOTRUN -> [TIMEOUT][13]
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-snb7/igt@gem_workarounds@suspend-resume-context.html

  
#### Warnings ####

  * igt@gem_ctx_shared@q-in-order:
    - shard-snb:          [SKIP][14] ([fdo#109271]) -> [FAIL][15] +4 similar issues
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9882/shard-snb7/igt@gem_ctx_shared@q-in-order.html
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-snb7/igt@gem_ctx_shared@q-in-order.html

  
Known issues
------------

  Here are the changes found in IGTPW_5640_full that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@feature_discovery@psr2:
    - shard-iclb:         NOTRUN -> [SKIP][16] ([i915#658]) +2 similar issues
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-iclb7/igt@feature_discovery@psr2.html

  * igt@gem_create@create-massive:
    - shard-snb:          NOTRUN -> [DMESG-WARN][17] ([i915#3002])
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-snb5/igt@gem_create@create-massive.html

  * igt@gem_ctx_persistence@engines-cleanup:
    - shard-snb:          NOTRUN -> [SKIP][18] ([fdo#109271] / [i915#1099]) +3 similar issues
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-snb7/igt@gem_ctx_persistence@engines-cleanup.html

  * igt@gem_exec_balancer@hang:
    - shard-iclb:         [PASS][19] -> [INCOMPLETE][20] ([i915#1895] / [i915#3031])
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9882/shard-iclb7/igt@gem_exec_balancer@hang.html
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-iclb4/igt@gem_exec_balancer@hang.html

  * igt@gem_exec_fair@basic-deadline:
    - shard-kbl:          [PASS][21] -> [FAIL][22] ([i915#2846])
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9882/shard-kbl3/igt@gem_exec_fair@basic-deadline.html
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-kbl4/igt@gem_exec_fair@basic-deadline.html

  * igt@gem_exec_fair@basic-flow@rcs0:
    - shard-tglb:         [PASS][23] -> [FAIL][24] ([i915#2842]) +3 similar issues
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9882/shard-tglb6/igt@gem_exec_fair@basic-flow@rcs0.html
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-tglb5/igt@gem_exec_fair@basic-flow@rcs0.html

  * igt@gem_exec_fair@basic-none-vip@rcs0:
    - shard-tglb:         NOTRUN -> [FAIL][25] ([i915#2842])
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-tglb5/igt@gem_exec_fair@basic-none-vip@rcs0.html
    - shard-glk:          NOTRUN -> [FAIL][26] ([i915#2842])
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-glk1/igt@gem_exec_fair@basic-none-vip@rcs0.html

  * igt@gem_exec_fair@basic-none@vcs0:
    - shard-kbl:          [PASS][27] -> [FAIL][28] ([i915#2842]) +3 similar issues
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9882/shard-kbl1/igt@gem_exec_fair@basic-none@vcs0.html
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-kbl1/igt@gem_exec_fair@basic-none@vcs0.html

  * igt@gem_exec_fair@basic-pace-solo@rcs0:
    - shard-glk:          [PASS][29] -> [FAIL][30] ([i915#2842]) +2 similar issues
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9882/shard-glk4/igt@gem_exec_fair@basic-pace-solo@rcs0.html
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-glk4/igt@gem_exec_fair@basic-pace-solo@rcs0.html

  * igt@gem_exec_params@rsvd2-dirt:
    - shard-tglb:         NOTRUN -> [SKIP][31] ([fdo#109283])
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-tglb2/igt@gem_exec_params@rsvd2-dirt.html
    - shard-iclb:         NOTRUN -> [SKIP][32] ([fdo#109283])
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-iclb3/igt@gem_exec_params@rsvd2-dirt.html

  * igt@gem_exec_reloc@basic-many-active@rcs0:
    - shard-apl:          NOTRUN -> [FAIL][33] ([i915#2389])
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-apl3/igt@gem_exec_reloc@basic-many-active@rcs0.html
    - shard-tglb:         NOTRUN -> [FAIL][34] ([i915#2389]) +4 similar issues
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-tglb5/igt@gem_exec_reloc@basic-many-active@rcs0.html
    - shard-glk:          NOTRUN -> [FAIL][35] ([i915#2389])
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-glk9/igt@gem_exec_reloc@basic-many-active@rcs0.html
    - shard-iclb:         NOTRUN -> [FAIL][36] ([i915#2389]) +3 similar issues
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-iclb6/igt@gem_exec_reloc@basic-many-active@rcs0.html

  * igt@gem_exec_reloc@basic-many-active@vcs0:
    - shard-kbl:          NOTRUN -> [FAIL][37] ([i915#2389]) +4 similar issues
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-kbl6/igt@gem_exec_reloc@basic-many-active@vcs0.html

  * igt@gem_exec_reloc@basic-parallel:
    - shard-kbl:          NOTRUN -> [TIMEOUT][38] ([i915#3183])
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-kbl4/igt@gem_exec_reloc@basic-parallel.html
    - shard-apl:          NOTRUN -> [TIMEOUT][39] ([i915#3183])
   [39]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-apl3/igt@gem_exec_reloc@basic-parallel.html

  * igt@gem_exec_reloc@basic-wide-active@rcs0:
    - shard-snb:          NOTRUN -> [FAIL][40] ([i915#2389]) +5 similar issues
   [40]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-snb2/igt@gem_exec_reloc@basic-wide-active@rcs0.html

  * igt@gem_exec_whisper@basic-contexts-priority:
    - shard-iclb:         [PASS][41] -> [INCOMPLETE][42] ([i915#1895])
   [41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9882/shard-iclb6/igt@gem_exec_whisper@basic-contexts-priority.html
   [42]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-iclb7/igt@gem_exec_whisper@basic-contexts-priority.html

  * igt@gem_ppgtt@flink-and-close-vma-leak:
    - shard-apl:          NOTRUN -> [FAIL][43] ([i915#644])
   [43]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-apl1/igt@gem_ppgtt@flink-and-close-vma-leak.html

  * igt@gem_pwrite@basic-exhaustion:
    - shard-snb:          NOTRUN -> [WARN][44] ([i915#2658])
   [44]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-snb2/igt@gem_pwrite@basic-exhaustion.html

  * igt@gem_render_copy@y-tiled-mc-ccs-to-vebox-y-tiled:
    - shard-iclb:         NOTRUN -> [SKIP][45] ([i915#768])
   [45]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-iclb1/igt@gem_render_copy@y-tiled-mc-ccs-to-vebox-y-tiled.html

  * igt@gem_userptr_blits@input-checking:
    - shard-glk:          NOTRUN -> [DMESG-WARN][46] ([i915#3002])
   [46]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-glk9/igt@gem_userptr_blits@input-checking.html

  * igt@gem_userptr_blits@mmap-offset-invalidate-active@wb:
    - shard-snb:          NOTRUN -> [SKIP][47] ([fdo#109271]) +323 similar issues
   [47]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-snb7/igt@gem_userptr_blits@mmap-offset-invalidate-active@wb.html
    - shard-kbl:          NOTRUN -> [SKIP][48] ([fdo#109271]) +74 similar issues
   [48]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-kbl7/igt@gem_userptr_blits@mmap-offset-invalidate-active@wb.html

  * igt@gem_userptr_blits@mmap-offset-invalidate-active@wc:
    - shard-tglb:         NOTRUN -> [SKIP][49] ([i915#1317]) +3 similar issues
   [49]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-tglb2/igt@gem_userptr_blits@mmap-offset-invalidate-active@wc.html

  * igt@gen9_exec_parse@allowed-single:
    - shard-tglb:         NOTRUN -> [SKIP][50] ([fdo#112306]) +1 similar issue
   [50]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-tglb2/igt@gen9_exec_parse@allowed-single.html

  * igt@gen9_exec_parse@batch-zero-length:
    - shard-iclb:         NOTRUN -> [SKIP][51] ([fdo#112306])
   [51]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-iclb8/igt@gen9_exec_parse@batch-zero-length.html

  * igt@i915_pm_lpsp@screens-disabled:
    - shard-tglb:         NOTRUN -> [SKIP][52] ([i915#1902])
   [52]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-tglb5/igt@i915_pm_lpsp@screens-disabled.html

  * igt@kms_big_fb@linear-8bpp-rotate-90:
    - shard-tglb:         NOTRUN -> [SKIP][53] ([fdo#111614]) +1 similar issue
   [53]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-tglb2/igt@kms_big_fb@linear-8bpp-rotate-90.html
    - shard-iclb:         NOTRUN -> [SKIP][54] ([fdo#110725] / [fdo#111614])
   [54]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-iclb3/igt@kms_big_fb@linear-8bpp-rotate-90.html

  * igt@kms_big_joiner@invalid-modeset:
    - shard-apl:          NOTRUN -> [SKIP][55] ([fdo#109271] / [i915#2705])
   [55]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-apl3/igt@kms_big_joiner@invalid-modeset.html

  * igt@kms_chamelium@hdmi-crc-single:
    - shard-glk:          NOTRUN -> [SKIP][56] ([fdo#109271] / [fdo#111827]) +6 similar issues
   [56]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-glk5/igt@kms_chamelium@hdmi-crc-single.html

  * igt@kms_chamelium@hdmi-mode-timings:
    - shard-iclb:         NOTRUN -> [SKIP][57] ([fdo#109284] / [fdo#111827]) +2 similar issues
   [57]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-iclb7/igt@kms_chamelium@hdmi-mode-timings.html

  * igt@kms_color_chamelium@pipe-a-ctm-blue-to-red:
    - shard-snb:          NOTRUN -> [SKIP][58] ([fdo#109271] / [fdo#111827]) +17 similar issues
   [58]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-snb7/igt@kms_color_chamelium@pipe-a-ctm-blue-to-red.html

  * igt@kms_color_chamelium@pipe-a-degamma:
    - shard-kbl:          NOTRUN -> [SKIP][59] ([fdo#109271] / [fdo#111827]) +9 similar issues
   [59]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-kbl4/igt@kms_color_chamelium@pipe-a-degamma.html

  * igt@kms_color_chamelium@pipe-c-ctm-0-25:
    - shard-apl:          NOTRUN -> [SKIP][60] ([fdo#109271] / [fdo#111827]) +19 similar issues
   [60]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-apl2/igt@kms_color_chamelium@pipe-c-ctm-0-25.html

  * igt@kms_color_chamelium@pipe-d-ctm-limited-range:
    - shard-tglb:         NOTRUN -> [SKIP][61] ([fdo#109284] / [fdo#111827]) +9 similar issues
   [61]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-tglb2/igt@kms_color_chamelium@pipe-d-ctm-limited-range.html

  * igt@kms_content_protection@content_type_change:
    - shard-iclb:         NOTRUN -> [SKIP][62] ([fdo#109300] / [fdo#111066])
   [62]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-iclb8/igt@kms_content_protection@content_type_change.html

  * igt@kms_content_protection@lic:
    - shard-apl:          NOTRUN -> [TIMEOUT][63] ([i915#1319])
   [63]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-apl3/igt@kms_content_protection@lic.html
    - shard-kbl:          NOTRUN -> [TIMEOUT][64] ([i915#1319])
   [64]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-kbl6/igt@kms_content_protection@lic.html

  * igt@kms_content_protection@uevent:
    - shard-tglb:         NOTRUN -> [SKIP][65] ([fdo#111828])
   [65]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-tglb3/igt@kms_content_protection@uevent.html

  * igt@kms_cursor_crc@pipe-b-cursor-512x512-sliding:
    - shard-iclb:         NOTRUN -> [SKIP][66] ([fdo#109278] / [fdo#109279])
   [66]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-iclb3/igt@kms_cursor_crc@pipe-b-cursor-512x512-sliding.html

  * igt@kms_cursor_crc@pipe-c-cursor-suspend:
    - shard-apl:          [PASS][67] -> [DMESG-WARN][68] ([i915#180]) +1 similar issue
   [67]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9882/shard-apl3/igt@kms_cursor_crc@pipe-c-cursor-suspend.html
   [68]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-apl8/igt@kms_cursor_crc@pipe-c-cursor-suspend.html

  * igt@kms_cursor_crc@pipe-d-cursor-512x512-onscreen:
    - shard-tglb:         NOTRUN -> [SKIP][69] ([fdo#109279]) +3 similar issues
   [69]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-tglb3/igt@kms_cursor_crc@pipe-d-cursor-512x512-onscreen.html

  * igt@kms_flip@2x-blocking-wf_vblank:
    - shard-iclb:         NOTRUN -> [SKIP][70] ([fdo#109274])
   [70]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-iclb2/igt@kms_flip@2x-blocking-wf_vblank.html

  * igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-64bpp-ytile:
    - shard-apl:          NOTRUN -> [SKIP][71] ([fdo#109271] / [i915#2642]) +1 similar issue
   [71]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-apl8/igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-64bpp-ytile.html
    - shard-glk:          NOTRUN -> [SKIP][72] ([fdo#109271] / [i915#2642])
   [72]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-glk9/igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-64bpp-ytile.html
    - shard-kbl:          NOTRUN -> [SKIP][73] ([fdo#109271] / [i915#2642])
   [73]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-kbl2/igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-64bpp-ytile.html

  * igt@kms_frontbuffer_tracking@fbc-2p-primscrn-pri-indfb-draw-render:
    - shard-iclb:         NOTRUN -> [SKIP][74] ([fdo#109280]) +12 similar issues
   [74]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-iclb2/igt@kms_frontbuffer_tracking@fbc-2p-primscrn-pri-indfb-draw-render.html

  * igt@kms_frontbuffer_tracking@fbc-2p-primscrn-shrfb-plflip-blt:
    - shard-tglb:         NOTRUN -> [SKIP][75] ([fdo#111825]) +20 similar issues
   [75]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-tglb8/igt@kms_frontbuffer_tracking@fbc-2p-primscrn-shrfb-plflip-blt.html

  * igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-spr-indfb-draw-mmap-wc:
    - shard-apl:          NOTRUN -> [SKIP][76] ([fdo#109271]) +203 similar issues
   [76]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-apl8/igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-spr-indfb-draw-mmap-wc.html

  * igt@kms_frontbuffer_tracking@fbc-suspend:
    - shard-kbl:          [PASS][77] -> [DMESG-WARN][78] ([i915#180]) +2 similar issues
   [77]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9882/shard-kbl3/igt@kms_frontbuffer_tracking@fbc-suspend.html
   [78]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-kbl7/igt@kms_frontbuffer_tracking@fbc-suspend.html

  * igt@kms_frontbuffer_tracking@psr-2p-scndscrn-spr-indfb-draw-render:
    - shard-glk:          NOTRUN -> [SKIP][79] ([fdo#109271]) +44 similar issues
   [79]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-glk2/igt@kms_frontbuffer_tracking@psr-2p-scndscrn-spr-indfb-draw-render.html

  * igt@kms_multipipe_modeset@basic-max-pipe-crc-check:
    - shard-tglb:         NOTRUN -> [SKIP][80] ([i915#1839])
   [80]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-tglb3/igt@kms_multipipe_modeset@basic-max-pipe-crc-check.html

  * igt@kms_plane_alpha_blend@pipe-a-alpha-transparent-fb:
    - shard-apl:          NOTRUN -> [FAIL][81] ([i915#265])
   [81]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-apl1/igt@kms_plane_alpha_blend@pipe-a-alpha-transparent-fb.html

  * igt@kms_plane_alpha_blend@pipe-c-alpha-7efc:
    - shard-kbl:          NOTRUN -> [FAIL][82] ([fdo#108145] / [i915#265]) +1 similar issue
   [82]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-kbl2/igt@kms_plane_alpha_blend@pipe-c-alpha-7efc.html

  * igt@kms_plane_alpha_blend@pipe-d-constant-alpha-max:
    - shard-iclb:         NOTRUN -> [SKIP][83] ([fdo#109278]) +2 similar issues
   [83]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-iclb8/igt@kms_plane_alpha_blend@pipe-d-constant-alpha-max.html

  * igt@kms_plane_multiple@atomic-pipe-b-tiling-yf:
    - shard-tglb:         NOTRUN -> [SKIP][84] ([fdo#111615]) +3 similar issues
   [84]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-tglb6/igt@kms_plane_multiple@atomic-pipe-b-tiling-yf.html

  * igt@kms_psr2_sf@overlay-plane-update-sf-dmg-area-1:
    - shard-glk:          NOTRUN -> [SKIP][85] ([fdo#109271] / [i915#658]) +1 similar issue
   [85]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-glk8/igt@kms_psr2_sf@overlay-plane-update-sf-dmg-area-1.html

  * igt@kms_psr2_sf@overlay-plane-update-sf-dmg-area-3:
    - shard-kbl:          NOTRUN -> [SKIP][86] ([fdo#109271] / [i915#658]) +2 similar issues
   [86]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-kbl7/igt@kms_psr2_sf@overlay-plane-update-sf-dmg-area-3.html

  * igt@kms_psr2_sf@plane-move-sf-dmg-area-2:
    - shard-apl:          NOTRUN -> [SKIP][87] ([fdo#109271] / [i915#658]) +3 similar issues
   [87]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-apl2/igt@kms_psr2_sf@plane-move-sf-dmg-area-2.html

  * igt@kms_psr@psr2_cursor_plane_move:
    - shard-iclb:         NOTRUN -> [SKIP][88] ([fdo#109441])
   [88]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-iclb4/igt@kms_psr@psr2_cursor_plane_move.html

  * igt@kms_psr@psr2_sprite_mmap_gtt:
    - shard-iclb:         [PASS][89] -> [SKIP][90] ([fdo#109441]) +2 similar issues
   [89]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9882/shard-iclb2/igt@kms_psr@psr2_sprite_mmap_gtt.html
   [90]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-iclb3/igt@kms_psr@psr2_sprite_mmap_gtt.html

  * igt@kms_setmode@basic:
    - shard-snb:          NOTRUN -> [FAIL][91] ([i915#31])
   [91]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-snb7/igt@kms_setmode@basic.html

  * igt@kms_sysfs_edid_timing:
    - shard-kbl:          NOTRUN -> [FAIL][92] ([IGT#2])
   [92]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-kbl3/igt@kms_sysfs_edid_timing.html

  * igt@kms_vblank@pipe-d-wait-idle:
    - shard-apl:          NOTRUN -> [SKIP][93] ([fdo#109271] / [i915#533]) +3 similar issues
   [93]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-apl8/igt@kms_vblank@pipe-d-wait-idle.html

  * igt@kms_writeback@writeback-fb-id:
    - shard-kbl:          NOTRUN -> [SKIP][94] ([fdo#109271] / [i915#2437])
   [94]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-kbl6/igt@kms_writeback@writeback-fb-id.html

  * igt@kms_writeback@writeback-invalid-parameters:
    - shard-apl:          NOTRUN -> [SKIP][95] ([fdo#109271] / [i915#2437]) +1 similar issue
   [95]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-apl3/igt@kms_writeback@writeback-invalid-parameters.html

  * igt@perf@per-context-mode-unprivileged:
    - shard-tglb:         NOTRUN -> [SKIP][96] ([fdo#109289])
   [96]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-tglb6/igt@perf@per-context-mode-unprivileged.html

  * igt@prime_nv_api@nv_i915_reimport_twice_check_flink_name:
    - shard-tglb:         NOTRUN -> [SKIP][97] ([fdo#109291])
   [97]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-tglb5/igt@prime_nv_api@nv_i915_reimport_twice_check_flink_name.html

  * igt@sysfs_clients@recycle-many:
    - shard-iclb:         [PASS][98] -> [FAIL][99] ([i915#3028])
   [98]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9882/shard-iclb8/igt@sysfs_clients@recycle-many.html
   [99]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-iclb2/igt@sysfs_clients@recycle-many.html
    - shard-kbl:          [PASS][100] -> [FAIL][101] ([i915#3028])
   [100]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9882/shard-kbl1/igt@sysfs_clients@recycle-many.html
   [101]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-kbl3/igt@sysfs_clients@recycle-many.html
    - shard-snb:          NOTRUN -> [FAIL][102] ([i915#3028])
   [102]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-snb6/igt@sysfs_clients@recycle-many.html

  * igt@sysfs_clients@sema-10@rcs0:
    - shard-glk:          NOTRUN -> [SKIP][103] ([fdo#109271] / [i915#3026]) +2 similar issues
   [103]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-glk1/igt@sysfs_clients@sema-10@rcs0.html

  * igt@sysfs_clients@split-10@bcs0:
    - shard-glk:          [PASS][104] -> [SKIP][105] ([fdo#109271] / [i915#3026])
   [104]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9882/shard-glk7/igt@sysfs_clients@split-10@bcs0.html
   [105]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-glk4/igt@sysfs_clients@split-10@bcs0.html
    - shard-apl:          NOTRUN -> [SKIP][106] ([fdo#109271] / [i915#3026])
   [106]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-apl3/igt@sysfs_clients@split-10@bcs0.html

  
#### Possible fixes ####

  * igt@gem_ctx_persistence@many-contexts:
    - shard-iclb:         [INCOMPLETE][107] ([i915#3057]) -> [PASS][108]
   [107]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9882/shard-iclb6/igt@gem_ctx_persistence@many-contexts.html
   [108]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-iclb3/igt@gem_ctx_persistence@many-contexts.html

  * igt@gem_ctx_persistence@replace@vcs1:
    - shard-tglb:         [INCOMPLETE][109] -> [PASS][110]
   [109]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9882/shard-tglb6/igt@gem_ctx_persistence@replace@vcs1.html
   [110]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-tglb5/igt@gem_ctx_persistence@replace@vcs1.html

  * igt@gem_exec_fair@basic-none-vip@rcs0:
    - shard-kbl:          [FAIL][111] ([i915#2842]) -> [PASS][112]
   [111]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9882/shard-kbl6/igt@gem_exec_fair@basic-none-vip@rcs0.html
   [112]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-kbl4/igt@gem_exec_fair@basic-none-vip@rcs0.html

  * igt@gem_exec_fair@basic-pace@vecs0:
    - shard-kbl:          [SKIP][113] ([fdo#109271]) -> [PASS][114]
   [113]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9882/shard-kbl1/igt@gem_exec_fair@basic-pace@vecs0.html
   [114]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-kbl3/igt@gem_exec_fair@basic-pace@vecs0.html

  * igt@gem_exec_fair@basic-throttle@rcs0:
    - shard-glk:          [FAIL][115] ([i915#2842]) -> [PASS][116] +1 similar issue
   [115]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9882/shard-glk1/igt@gem_exec_fair@basic-throttle@rcs0.html
   [116]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-glk5/igt@gem_exec_fair@basic-throttle@rcs0.html

  * igt@gem_exec_whisper@basic-queues-all:
    - shard-glk:          [DMESG-WARN][117] ([i915#118] / [i915#95]) -> [PASS][118]
   [117]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9882/shard-glk6/igt@gem_exec_whisper@basic-queues-all.html
   [118]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-glk9/igt@gem_exec_whisper@basic-queues-all.html

  * igt@gem_vm_create@destroy-race:
    - shard-tglb:         [TIMEOUT][119] ([i915#2795]) -> [PASS][120]
   [119]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9882/shard-tglb5/igt@gem_vm_create@destroy-race.html
   [120]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-tglb6/igt@gem_vm_create@destroy-race.html

  * igt@i915_selftest@live@client:
    - shard-glk:          [DMESG-FAIL][121] ([i915#3047]) -> [PASS][122]
   [121]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9882/shard-glk9/igt@i915_selftest@live@client.html
   [122]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-glk4/igt@i915_selftest@live@client.html

  * igt@kms_big_fb@linear-64bpp-rotate-180:
    - shard-glk:          [FAIL][123] -> [PASS][124]
   [123]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9882/shard-glk5/igt@kms_big_fb@linear-64bpp-rotate-180.html
   [124]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-glk6/igt@kms_big_fb@linear-64bpp-rotate-180.html

  * igt@kms_color@pipe-c-legacy-gamma:
    - shard-apl:          [FAIL][125] ([i915#71]) -> [PASS][126]
   [125]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9882/shard-apl3/igt@kms_color@pipe-c-legacy-gamma.html
   [126]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-apl6/igt@kms_color@pipe-c-legacy-gamma.html

  * igt@kms_cursor_crc@pipe-a-cursor-dpms:
    - shard-kbl:          [FAIL][127] ([i915#54]) -> [PASS][128]
   [127]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9882/shard-kbl2/igt@kms_cursor_crc@pipe-a-cursor-dpms.html
   [128]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-kbl3/igt@kms_cursor_crc@pipe-a-cursor-dpms.html

  * igt@kms_flip@flip-vs-suspend-interruptible@a-dp1:
    - shard-kbl:          [DMESG-WARN][129] ([i915#180]) -> [PASS][130] +4 similar issues
   [129]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9882/shard-kbl7/igt@kms_flip@flip-vs-suspend-interruptible@a-dp1.html
   [130]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-kbl2/igt@kms_flip@flip-vs-suspend-interruptible@a-dp1.html

  * igt@kms_flip@flip-vs-suspend@a-dp1:
    - shard-apl:          [DMESG-WARN][131] ([i915#180]) -> [PASS][132] +1 similar issue
   [131]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9882/shard-apl3/igt@kms_flip@flip-vs-suspend@a-dp1.html
   [132]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-apl8/igt@kms_flip@flip-vs-suspend@a-dp1.html

  * igt@kms_psr@psr2_cursor_render:
    - shard-iclb:         [SKIP][133] ([fdo#109441]) -> [PASS][134] +2 similar issues
   [133]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9882/shard-iclb3/igt@kms_psr@psr2_cursor_render.html
   [134]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-iclb2/igt@kms_psr@psr2_cursor_render.html

  * igt@sysfs_clients@recycle:
    - shard-snb:          [FAIL][135] ([i915#3028]) -> [PASS][136]
   [135]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9882/shard-snb7/igt@sysfs_clients@recycle.html
   [136]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-snb2/igt@sysfs_clients@recycle.html

  * igt@sysfs_clients@sema-10@vcs0:
    - shard-apl:          [SKIP][137] ([fdo#109271] / [i915#3026]) -> [PASS][138]
   [137]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9882/shard-apl6/igt@sysfs_clients@sema-10@vcs0.html
   [138]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-apl1/igt@sysfs_clients@sema-10@vcs0.html

  
#### Warnings ####

  * igt@gem_exec_fair@basic-pace@vcs1:
    - shard-kbl:          [SKIP][139] ([fdo#109271]) -> [FAIL][140] ([i915#2842])
   [139]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9882/shard-kbl1/igt@gem_exec_fair@basic-pace@vcs1.html
   [140]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-kbl3/igt@gem_exec_fair@basic-pace@vcs1.html

  * igt@i915_pm_dc@dc3co-vpb-simulation:
    - shard-iclb:         [SKIP][141] ([i915#658]) -> [SKIP][142] ([i915#588])
   [141]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9882/shard-iclb3/igt@i915_pm_dc@dc3co-vpb-simulation.html
   [142]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-iclb2/igt@i915_pm_dc@dc3co-vpb-simulation.html

  * igt@kms_dp_dsc@basic-dsc-enable-edp:
    - shard-iclb:         [DMESG-WARN][143] ([i915#1226]) -> [SKIP][144] ([fdo#109349])
   [143]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9882/shard-iclb2/igt@kms_dp_dsc@basic-dsc-enable-edp.html
   [144]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/shard-iclb3/igt@kms_dp_dsc@basic-dsc-enable-edp.html

  * igt@kms_psr2_sf@cursor-plane-update-sf:
    - shard-iclb:         [SKIP][145] ([i915#658]) -> [SKIP][146] ([i915#2920]) +1 similar issue
   [145]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5640/index.html

[-- Attachment #1.2: Type: text/html, Size: 33714 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

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

^ permalink raw reply	[flat|nested] 44+ messages in thread

end of thread, other threads:[~2021-03-23 23:40 UTC | newest]

Thread overview: 44+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-19 22:32 [igt-dev] [PATCH i-g-t 0/8] Adjust IGT for upstream API clean-ups Jason Ekstrand
2021-03-19 22:32 ` [igt-dev] [PATCH i-g-t 1/8] tests/i915: Drop gem_ctx_ringsize Jason Ekstrand
2021-03-22 19:11   ` Daniel Vetter
2021-03-22 19:15     ` Daniel Vetter
2021-03-19 22:32 ` [igt-dev] [PATCH i-g-t 2/8] tests/i915/gem_exec_balancer: Drop the ringsize subtest Jason Ekstrand
2021-03-19 22:32 ` [igt-dev] [PATCH i-g-t 3/8] tests/i915/gem_exec_endless: Stop setting the ring size Jason Ekstrand
2021-03-22 19:14   ` Daniel Vetter
2021-03-19 22:32 ` [igt-dev] [PATCH i-g-t 4/8] tests/i915/gem_ctx_param: Drop the zeromap subtests Jason Ekstrand
2021-03-22 19:16   ` Daniel Vetter
2021-03-19 22:32 ` [igt-dev] [PATCH i-g-t 5/8] tests/i915: Drop gem_ctx_clone Jason Ekstrand
2021-03-19 22:32 ` [igt-dev] [PATCH i-g-t 6/8] tests/i915/gem_ctx_create: Stop cloning engines Jason Ekstrand
2021-03-19 22:32 ` [igt-dev] [PATCH i-g-t 7/8] tests/i915/gem_ctx_persistence: Drop the clone test Jason Ekstrand
2021-03-22 19:17   ` Daniel Vetter
2021-03-19 22:32 ` [igt-dev] [PATCH i-g-t 8/8] lib/i915/gem_context: Implement VM and engine cloning manually Jason Ekstrand
2021-03-22 19:25   ` Daniel Vetter
2021-03-22 20:42     ` Jason Ekstrand
2021-03-19 23:17 ` [igt-dev] ✓ Fi.CI.BAT: success for Adjust IGT for upstream API clean-ups Patchwork
2021-03-20  0:22 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2021-03-22 18:20 ` [igt-dev] [PATCH i-g-t 0/8] " Daniel Vetter
2021-03-22 20:41 ` [igt-dev] [PATCH i-g-t 0/9] Adjust IGT for upstream API clean-ups (v2) Jason Ekstrand
2021-03-22 20:41   ` [igt-dev] [PATCH i-g-t 1/9] tests/i915: Drop gem_ctx_ringsize Jason Ekstrand
2021-03-22 20:41   ` [igt-dev] [PATCH i-g-t 2/9] tests/i915/gem_exec_balancer: Drop the ringsize subtest Jason Ekstrand
2021-03-22 20:41   ` [igt-dev] [PATCH i-g-t 3/9] tests/i915/gem_exec_endless: Stop setting the ring size Jason Ekstrand
2021-03-22 20:41   ` [igt-dev] [PATCH i-g-t 4/9] tests/i915/gem_ctx_param: Drop the zeromap subtests Jason Ekstrand
2021-03-22 20:41   ` [igt-dev] [PATCH i-g-t 5/9] tests/i915: Drop gem_ctx_clone Jason Ekstrand
2021-03-22 20:41   ` [igt-dev] [PATCH i-g-t 6/9] tests/i915/gem_ctx_create: Stop cloning engines Jason Ekstrand
2021-03-22 20:41   ` [igt-dev] [PATCH i-g-t 7/9] tests/i915/gem_ctx_persistence: Drop the clone test Jason Ekstrand
2021-03-22 20:41   ` [igt-dev] [PATCH i-g-t 8/9] tests/i915/gem_exec_balancer: Stop cloning engines Jason Ekstrand
2021-03-22 20:41   ` [igt-dev] [PATCH i-g-t 9/9] lib/i915/gem_context: Implement VM and engine cloning manually (v2) Jason Ekstrand
2021-03-22 21:48     ` [igt-dev] [PATCH i-g-t 9/9] lib/i915/gem_context: Implement VM and engine cloning manually (v3) Jason Ekstrand
2021-03-23  3:51   ` Jason Ekstrand
2021-03-23  3:51   ` [igt-dev] [PATCH i-g-t 0/9] Adjust IGT for upstream API clean-ups (v2) Jason Ekstrand
2021-03-23  3:51     ` [igt-dev] [PATCH i-g-t 1/9] tests/i915: Drop gem_ctx_ringsize Jason Ekstrand
2021-03-23  3:51     ` [igt-dev] [PATCH i-g-t 2/9] tests/i915/gem_exec_balancer: Drop the ringsize subtest Jason Ekstrand
2021-03-23  3:51     ` [igt-dev] [PATCH i-g-t 3/9] tests/i915/gem_exec_endless: Stop setting the ring size Jason Ekstrand
2021-03-23  3:51     ` [igt-dev] [PATCH i-g-t 4/9] tests/i915/gem_ctx_param: Drop the zeromap subtests Jason Ekstrand
2021-03-23  3:51     ` [igt-dev] [PATCH i-g-t 5/9] tests/i915: Drop gem_ctx_clone Jason Ekstrand
2021-03-23  3:51     ` [igt-dev] [PATCH i-g-t 6/9] tests/i915/gem_ctx_create: Stop cloning engines Jason Ekstrand
2021-03-23  3:51     ` [igt-dev] [PATCH i-g-t 7/9] tests/i915/gem_ctx_persistence: Drop the clone test Jason Ekstrand
2021-03-23  3:51     ` [igt-dev] [PATCH i-g-t 8/9] tests/i915/gem_exec_balancer: Stop cloning engines Jason Ekstrand
2021-03-23  3:51     ` [igt-dev] [PATCH i-g-t 9/9] lib/i915/gem_context: Implement VM and engine cloning manually (v3) Jason Ekstrand
2021-03-23  4:33   ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/9] tests/i915: Drop gem_ctx_ringsize Patchwork
2021-03-23 23:40   ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2021-03-22 22:05 ` [igt-dev] ✗ Fi.CI.BUILD: failure for Adjust IGT for upstream API clean-ups (rev2) Patchwork

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.