All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t v2] tests/i915/gem_ctx_persistence: modified test_saturated_hostile subtest
@ 2021-09-04 17:09 Arjun Melkaveri
  2021-09-04 18:09 ` [igt-dev] ✗ Fi.CI.BAT: failure for tests/i915/gem_ctx_persistence: modified test_saturated_hostile subtest (rev2) Patchwork
  2021-09-09  3:44 ` [igt-dev] [PATCH i-g-t v2] tests/i915/gem_ctx_persistence: modified test_saturated_hostile subtest Dixit, Ashutosh
  0 siblings, 2 replies; 3+ messages in thread
From: Arjun Melkaveri @ 2021-09-04 17:09 UTC (permalink / raw)
  To: arjun.melkaveri, zbigniew.kempczynski, ashutosh.dixit, igt-dev

Applying saturated_hostile to support for twiddling the
scheduling parameters via sysfs to tune timeouts.

New Context is created in for_each_ctx_cfg_engine and
passed to get_reloc_ahnd.

v2 : Added DRM issue id.

Fixes: https://gitlab.freedesktop.org/drm/intel/-/issues/1551

Signed-off-by: Arjun Melkaveri <arjun.melkaveri@intel.com>
Cc: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Cc: Ashutosh Dixit <ashutosh.dixit@intel.com>
---
 tests/i915/gem_ctx_persistence.c | 21 ++++++++++++---------
 1 file changed, 12 insertions(+), 9 deletions(-)

diff --git a/tests/i915/gem_ctx_persistence.c b/tests/i915/gem_ctx_persistence.c
index fafd8bb2..251c0037 100644
--- a/tests/i915/gem_ctx_persistence.c
+++ b/tests/i915/gem_ctx_persistence.c
@@ -876,13 +876,13 @@ static void test_process_mixed(int pfd, const intel_ctx_cfg_t *cfg,
 }
 
 static void
-test_saturated_hostile(int i915, const intel_ctx_t *base_ctx,
-		       const struct intel_execution_engine2 *engine)
+test_saturated_hostile(int i915, const intel_ctx_cfg_t *cfg,
+		       unsigned int engine_flags)
 {
 	const struct intel_execution_engine2 *other;
 	igt_spin_t *spin;
 	const intel_ctx_t *ctx;
-	uint64_t ahnd = get_reloc_ahnd(i915, base_ctx->id);
+	uint64_t ahnd;
 	int fence = -1;
 
 	cleanup(i915);
@@ -899,11 +899,13 @@ test_saturated_hostile(int i915, const intel_ctx_t *base_ctx,
 	 * reset other users whenever they chose.]
 	 */
 
-	for_each_ctx_engine(i915, base_ctx, other) {
-		if (other->flags == engine->flags)
+	for_each_ctx_cfg_engine(i915, cfg, other) {
+		if (other->flags == engine_flags)
 			continue;
 
-		spin = igt_spin_new(i915, .ahnd = ahnd, .ctx = base_ctx,
+		ctx = intel_ctx_create(i915, cfg);
+		ahnd = get_reloc_ahnd(i915, ctx->id);
+		spin = igt_spin_new(i915, .ahnd = ahnd, .ctx = ctx,
 				   .engine = other->flags,
 				   .flags = (IGT_SPIN_NO_PREEMPTION |
 					     IGT_SPIN_FENCE_OUT));
@@ -924,10 +926,10 @@ test_saturated_hostile(int i915, const intel_ctx_t *base_ctx,
 	put_ahnd(ahnd);
 	igt_require(fence != -1);
 
-	ctx = ctx_create_persistence(i915, &base_ctx->cfg, false);
+	ctx = ctx_create_persistence(i915, cfg, false);
 	ahnd = get_reloc_ahnd(i915, ctx->id);
 	spin = igt_spin_new(i915, .ahnd = ahnd, .ctx = ctx,
-			    .engine = engine->flags,
+			    .engine = engine_flags,
 			    .flags = (IGT_SPIN_NO_PREEMPTION |
 				      IGT_SPIN_POLL_RUN |
 				      IGT_SPIN_FENCE_OUT));
@@ -1310,7 +1312,8 @@ igt_main
 		igt_subtest_with_dynamic_f("saturated-hostile") {
 			for_each_ctx_engine(i915, ctx, e) {
 				igt_dynamic_f("%s", e->name)
-					test_saturated_hostile(i915, ctx, e);
+					do_test(test_saturated_hostile, i915,
+						&ctx->cfg, e->flags, e->name);
 			}
 		}
 
-- 
2.25.1

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

end of thread, other threads:[~2021-09-09  3:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-09-04 17:09 [igt-dev] [PATCH i-g-t v2] tests/i915/gem_ctx_persistence: modified test_saturated_hostile subtest Arjun Melkaveri
2021-09-04 18:09 ` [igt-dev] ✗ Fi.CI.BAT: failure for tests/i915/gem_ctx_persistence: modified test_saturated_hostile subtest (rev2) Patchwork
2021-09-09  3:44 ` [igt-dev] [PATCH i-g-t v2] tests/i915/gem_ctx_persistence: modified test_saturated_hostile subtest Dixit, Ashutosh

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.