Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [v4 0/5] Add multi-gt support for RC6 residency test
@ 2023-11-14  7:31 Sujaritha Sundaresan
  2023-11-14  7:31 ` [igt-dev] [v4 1/5] tests/intel: Add multi-gt support for rc6-idle test Sujaritha Sundaresan
                   ` (6 more replies)
  0 siblings, 7 replies; 9+ messages in thread
From: Sujaritha Sundaresan @ 2023-11-14  7:31 UTC (permalink / raw)
  To: igt-dev

Add multi-gt support for the i915_pm_rc6_residency test

Sujaritha Sundaresan (5):
  tests/intel: Add multi-gt support for rc6-idle test
  tests/intel: Add multi-gt support for rc6-fence test
  tests/intel: Add multi-gt support for rc6-accuracy test
  tests/intel: Print drpc info for rc6_residency test
  HAX: Add rc6 residency to fast-feedback.testlist

 tests/intel-ci/fast-feedback.testlist |   1 +
 tests/intel/i915_pm_rc6_residency.c   | 161 ++++++++++++++++----------
 2 files changed, 104 insertions(+), 58 deletions(-)

-- 
2.25.1

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

* [igt-dev] [v4 1/5] tests/intel: Add multi-gt support for rc6-idle test
  2023-11-14  7:31 [igt-dev] [v4 0/5] Add multi-gt support for RC6 residency test Sujaritha Sundaresan
@ 2023-11-14  7:31 ` Sujaritha Sundaresan
  2023-11-14  7:31 ` [igt-dev] [v4 2/5] tests/intel: Add multi-gt support for rc6-fence test Sujaritha Sundaresan
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: Sujaritha Sundaresan @ 2023-11-14  7:31 UTC (permalink / raw)
  To: igt-dev

Add multi-gt support for rc_idle subtest

v3: Remove intel_ctx_create_all_physical call (Riana)

Reviewed-by: Riana Tauro <riana.tauro@intel.com>
Signed-off-by: Sujaritha Sundaresan <sujaritha.sundaresan@intel.com>
---
 tests/intel/i915_pm_rc6_residency.c | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/tests/intel/i915_pm_rc6_residency.c b/tests/intel/i915_pm_rc6_residency.c
index b266680ac..34619b79c 100644
--- a/tests/intel/i915_pm_rc6_residency.c
+++ b/tests/intel/i915_pm_rc6_residency.c
@@ -376,7 +376,7 @@ static void kill_children(int sig)
 	signal(sig, old);
 }
 
-static void rc6_idle(int i915, uint32_t ctx_id, uint64_t flags)
+static void rc6_idle(int i915, uint32_t ctx_id, uint64_t flags, unsigned int gt)
 {
 	const int64_t duration_ns = SLEEP_DURATION * (int64_t)NSEC_PER_SEC;
 	const int tolerance = 20; /* Some RC6 is better than none! */
@@ -397,7 +397,7 @@ static void rc6_idle(int i915, uint32_t ctx_id, uint64_t flags)
 	struct igt_power gpu;
 	int fd;
 
-	fd = open_pmu(i915, I915_PMU_RC6_RESIDENCY);
+	fd = open_pmu(i915, __I915_PMU_RC6_RESIDENCY(gt));
 	igt_drop_caches_set(i915, DROP_IDLE);
 	igt_require(__pmu_wait_for_rc6(fd));
 	igt_power_open(i915, &gpu, "gpu");
@@ -558,12 +558,12 @@ static void rc6_fence(int i915, const intel_ctx_t *ctx)
 igt_main
 {
 	int i915 = -1;
+	unsigned int dirfd, gt;
 	const intel_ctx_t *ctx;
 
 	/* Use drm_open_driver to verify device existence */
 	igt_fixture {
 		i915 = drm_open_driver(DRIVER_INTEL);
-		ctx = intel_ctx_create_all_physical(i915);
 	}
 
 	igt_subtest_with_dynamic("rc6-idle") {
@@ -572,11 +572,15 @@ igt_main
 		igt_require_gem(i915);
 		gem_quiescent_gpu(i915);
 
-		for_each_ctx_engine(i915, ctx, e) {
-			if (e->instance == 0) {
-				igt_dynamic_f("%s", e->name)
-					rc6_idle(i915, ctx->id, e->flags);
+		i915_for_each_gt(i915, dirfd, gt) {
+			ctx = intel_ctx_create_for_gt(i915, gt);
+			for_each_ctx_engine(i915, ctx, e) {
+				if (e->instance == 0) {
+					igt_dynamic_f("gt%u-%s", gt, e->name)
+						rc6_idle(i915, ctx->id, e->flags, gt);
+				}
 			}
+			intel_ctx_destroy(i915, ctx);
 		}
 	}
 
@@ -626,7 +630,6 @@ igt_main
 	}
 
 	igt_fixture {
-		intel_ctx_destroy(i915, ctx);
 		drm_close_driver(i915);
 	}
 }
-- 
2.25.1

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

* [igt-dev] [v4 2/5] tests/intel: Add multi-gt support for rc6-fence test
  2023-11-14  7:31 [igt-dev] [v4 0/5] Add multi-gt support for RC6 residency test Sujaritha Sundaresan
  2023-11-14  7:31 ` [igt-dev] [v4 1/5] tests/intel: Add multi-gt support for rc6-idle test Sujaritha Sundaresan
@ 2023-11-14  7:31 ` Sujaritha Sundaresan
  2023-11-14  7:31 ` [igt-dev] [v4 3/5] tests/intel: Add multi-gt support for rc6-accuracy test Sujaritha Sundaresan
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: Sujaritha Sundaresan @ 2023-11-14  7:31 UTC (permalink / raw)
  To: igt-dev

Add multi-gt support for the rc6_fence subtest

Reviewed-by: Riana Tauro <riana.tauro@intel.com>
Signed-off-by: Sujaritha Sundaresan <sujaritha.sundaresan@intel.com>
---
 tests/intel/i915_pm_rc6_residency.c | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/tests/intel/i915_pm_rc6_residency.c b/tests/intel/i915_pm_rc6_residency.c
index 34619b79c..e84e8ea96 100644
--- a/tests/intel/i915_pm_rc6_residency.c
+++ b/tests/intel/i915_pm_rc6_residency.c
@@ -471,12 +471,13 @@ static void rc6_idle(int i915, uint32_t ctx_id, uint64_t flags, unsigned int gt)
 	}
 }
 
-static void rc6_fence(int i915, const intel_ctx_t *ctx)
+static void rc6_fence(int i915, unsigned int gt)
 {
 	const int64_t duration_ns = SLEEP_DURATION * (int64_t)NSEC_PER_SEC;
 	const int tolerance = 20; /* Some RC6 is better than none! */
 	const unsigned int gen = intel_gen(intel_get_drm_devid(i915));
 	const struct intel_execution_engine2 *e;
+	const intel_ctx_t *ctx;
 	struct power_sample sample[2];
 	unsigned long slept;
 	uint64_t rc6, ts[2], ahnd;
@@ -485,7 +486,7 @@ static void rc6_fence(int i915, const intel_ctx_t *ctx)
 
 	igt_require_sw_sync();
 
-	fd = open_pmu(i915, I915_PMU_RC6_RESIDENCY);
+	fd = open_pmu(i915, __I915_PMU_RC6_RESIDENCY(gt));
 	igt_drop_caches_set(i915, DROP_IDLE);
 	igt_require(__pmu_wait_for_rc6(fd));
 	igt_power_open(i915, &gpu, "gpu");
@@ -509,6 +510,7 @@ static void rc6_fence(int i915, const intel_ctx_t *ctx)
 	assert_within_epsilon(rc6, ts[1] - ts[0], 5);
 
 	/* Submit but delay execution, we should be idle and conserving power */
+	ctx = intel_ctx_create_for_gt(i915, gt);
 	ahnd = get_reloc_ahnd(i915, ctx->id);
 	for_each_ctx_engine(i915, ctx, e) {
 		igt_spin_t *spin;
@@ -550,6 +552,7 @@ static void rc6_fence(int i915, const intel_ctx_t *ctx)
 		gem_quiescent_gpu(i915);
 	}
 	put_ahnd(ahnd);
+	intel_ctx_destroy(i915, ctx);
 
 	igt_power_close(&gpu);
 	close(fd);
@@ -584,11 +587,13 @@ igt_main
 		}
 	}
 
-	igt_subtest("rc6-fence") {
+	igt_subtest_with_dynamic("rc6-fence") {
 		igt_require_gem(i915);
 		gem_quiescent_gpu(i915);
 
-		rc6_fence(i915, ctx);
+		i915_for_each_gt(i915, dirfd, gt)
+			igt_dynamic_f("gt%u", gt)
+				rc6_fence(i915, gt);
 	}
 
 	igt_subtest_group {
-- 
2.25.1

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

* [igt-dev] [v4 3/5] tests/intel: Add multi-gt support for rc6-accuracy test
  2023-11-14  7:31 [igt-dev] [v4 0/5] Add multi-gt support for RC6 residency test Sujaritha Sundaresan
  2023-11-14  7:31 ` [igt-dev] [v4 1/5] tests/intel: Add multi-gt support for rc6-idle test Sujaritha Sundaresan
  2023-11-14  7:31 ` [igt-dev] [v4 2/5] tests/intel: Add multi-gt support for rc6-fence test Sujaritha Sundaresan
@ 2023-11-14  7:31 ` Sujaritha Sundaresan
  2023-11-14  8:54   ` Riana Tauro
  2023-11-14  7:31 ` [igt-dev] [v4 4/5] tests/intel: Print drpc info for rc6_residency test Sujaritha Sundaresan
                   ` (3 subsequent siblings)
  6 siblings, 1 reply; 9+ messages in thread
From: Sujaritha Sundaresan @ 2023-11-14  7:31 UTC (permalink / raw)
  To: igt-dev

Add multi-gt support for the rc6_accuracy subtest

v3: Align get_rc6_enabled_mask with other changes
    Introduce rc6_enabled_mask

v4: Make test dynamic (Riana)

Signed-off-by: Sujaritha Sundaresan <sujaritha.sundaresan@intel.com>
---
 tests/intel/i915_pm_rc6_residency.c | 78 ++++++++++++++++-------------
 1 file changed, 43 insertions(+), 35 deletions(-)

diff --git a/tests/intel/i915_pm_rc6_residency.c b/tests/intel/i915_pm_rc6_residency.c
index e84e8ea96..be5722662 100644
--- a/tests/intel/i915_pm_rc6_residency.c
+++ b/tests/intel/i915_pm_rc6_residency.c
@@ -73,32 +73,28 @@ struct residencies {
 	int duration;
 };
 
-static unsigned long get_rc6_enabled_mask(void)
+static unsigned long get_rc6_enabled_mask(int dirfd)
 {
 	unsigned long enabled;
 
 	enabled = 0;
-	igt_sysfs_scanf(sysfs, "power/rc6_enable", "%lu", &enabled);
+	igt_sysfs_rps_scanf(dirfd, RC6_ENABLE, "%lu", &enabled);
 	return enabled;
 }
 
-static bool has_rc6_residency(const char *name)
+static bool has_rc6_residency(int dirfd, enum i915_attr_id id)
 {
 	unsigned long residency;
-	char path[128];
 
-	sprintf(path, "power/%s_residency_ms", name);
-	return igt_sysfs_scanf(sysfs, path, "%lu", &residency) == 1;
+	return igt_sysfs_rps_scanf(dirfd, id, "%lu", &residency) == 1;
 }
 
-static unsigned long read_rc6_residency(const char *name)
+static unsigned long read_rc6_residency(int dirfd, enum i915_attr_id id)
 {
 	unsigned long residency;
-	char path[128];
 
 	residency = 0;
-	sprintf(path, "power/%s_residency_ms", name);
-	igt_assert(igt_sysfs_scanf(sysfs, path, "%lu", &residency) == 1);
+	igt_assert(igt_sysfs_rps_scanf(dirfd, id, "%lu", &residency) == 1);
 	return residency;
 }
 
@@ -125,28 +121,28 @@ static unsigned long gettime_ms(void)
 	return ts.tv_sec * 1000 + ts.tv_nsec / 1000000;
 }
 
-static void read_residencies(int devid, unsigned int mask,
+static void read_residencies(int devid, int dirfd, unsigned int mask,
 			     struct residencies *res)
 {
 	res->duration = gettime_ms();
 
 	if (mask & RC6_ENABLED)
-		res->rc6 = read_rc6_residency("rc6");
+		res->rc6 = read_rc6_residency(dirfd, RC6_RESIDENCY_MS);
 
 	if ((mask & RC6_ENABLED) &&
 	    (IS_VALLEYVIEW(devid) || IS_CHERRYVIEW(devid)))
-		res->media_rc6 = read_rc6_residency("media_rc6");
+		res->media_rc6 = read_rc6_residency(dirfd, MEDIA_RC6_RESIDENCY_MS);
 
 	if (mask & RC6P_ENABLED)
-		res->rc6p = read_rc6_residency("rc6p");
+		res->rc6p = read_rc6_residency(dirfd, RC6P_RESIDENCY_MS);
 
 	if (mask & RC6PP_ENABLED)
-		res->rc6pp = read_rc6_residency("rc6pp");
+		res->rc6pp = read_rc6_residency(dirfd, RC6PP_RESIDENCY_MS);
 
 	res->duration += (gettime_ms() - res->duration) / 2;
 }
 
-static void measure_residencies(int devid, unsigned int mask,
+static void measure_residencies(int devid, int dirfd, unsigned int mask,
 				struct residencies *res)
 {
 	struct residencies start = { };
@@ -158,13 +154,13 @@ static void measure_residencies(int devid, unsigned int mask,
 	 * measurement, since the valid counter range is different on
 	 * different platforms and so fixing it up would be non-trivial.
 	 */
-	read_residencies(devid, mask, &end);
+	read_residencies(devid, dirfd, mask, &end);
 	igt_debug("time=%d: rc6=(%d, %d), rc6p=%d, rc6pp=%d\n",
 		  end.duration, end.rc6, end.media_rc6, end.rc6p, end.rc6pp);
 	for (retry = 0; retry < 2; retry++) {
 		start = end;
 		sleep(SLEEP_DURATION);
-		read_residencies(devid, mask, &end);
+		read_residencies(devid, dirfd, mask, &end);
 
 		igt_debug("time=%d: rc6=(%d, %d), rc6p=%d, rc6pp=%d\n",
 			  end.duration,
@@ -196,7 +192,7 @@ static void measure_residencies(int devid, unsigned int mask,
 	res->rc6 += res->rc6p;
 }
 
-static bool wait_for_rc6(void)
+static bool wait_for_rc6(int dirfd)
 {
 	struct timespec tv = {};
 	unsigned long start, now;
@@ -205,11 +201,11 @@ static bool wait_for_rc6(void)
 	usleep(160 * 1000);
 
 	/* Then poll for RC6 to start ticking */
-	now = read_rc6_residency("rc6");
+	now = read_rc6_residency(dirfd, RC6_RESIDENCY_MS);
 	do {
 		start = now;
 		usleep(5000);
-		now = read_rc6_residency("rc6");
+		now = read_rc6_residency(dirfd, RC6_RESIDENCY_MS);
 		if (now - start > 1)
 			return true;
 	} while (!igt_seconds_elapsed(&tv));
@@ -558,6 +554,17 @@ static void rc6_fence(int i915, unsigned int gt)
 	close(fd);
 }
 
+static unsigned int rc6_enabled_mask(int i915, int dirfd)
+{
+	igt_require(has_rc6_residency(dirfd, RC6_RESIDENCY_MS));
+
+	/* Make sure rc6 counters are running */
+	igt_drop_caches_set(i915, DROP_IDLE);
+	igt_require(wait_for_rc6(dirfd));
+
+	return get_rc6_enabled_mask(dirfd);
+}
+
 igt_main
 {
 	int i915 = -1;
@@ -603,22 +610,20 @@ igt_main
 		igt_fixture {
 			devid = intel_get_drm_devid(i915);
 			sysfs = igt_sysfs_open(i915);
-
-			igt_require(has_rc6_residency("rc6"));
-
-			/* Make sure rc6 counters are running */
-			igt_drop_caches_set(i915, DROP_IDLE);
-			igt_require(wait_for_rc6());
-
-			rc6_enabled = get_rc6_enabled_mask();
-			igt_require(rc6_enabled & RC6_ENABLED);
+			igt_assert(sysfs != 1);
 		}
 
-		igt_subtest("rc6-accuracy") {
-			struct residencies res;
+		igt_subtest_with_dynamic("rc6-accuracy") {
+			i915_for_each_gt(i915, dirfd, gt) {
+				struct residencies res;
 
-			measure_residencies(devid, rc6_enabled, &res);
-			residency_accuracy(res.rc6, res.duration, "rc6");
+				rc6_enabled = rc6_enabled_mask(i915, dirfd);
+				igt_require(rc6_enabled & RC6_ENABLED);
+
+				igt_dynamic_f("gt%u", gt)
+				measure_residencies(devid, dirfd, rc6_enabled, &res);
+				residency_accuracy(res.rc6, res.duration, "rc6");
+			}
 		}
 
 		igt_subtest("media-rc6-accuracy") {
@@ -626,7 +631,10 @@ igt_main
 
 			igt_require(IS_VALLEYVIEW(devid) || IS_CHERRYVIEW(devid));
 
-			measure_residencies(devid, rc6_enabled, &res);
+			rc6_enabled = rc6_enabled_mask(i915, sysfs);
+			igt_require(rc6_enabled & RC6_ENABLED);
+
+			measure_residencies(devid, sysfs, rc6_enabled, &res);
 			residency_accuracy(res.media_rc6, res.duration, "media_rc6");
 		}
 
-- 
2.25.1

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

* [igt-dev] [v4 4/5] tests/intel: Print drpc info for rc6_residency test
  2023-11-14  7:31 [igt-dev] [v4 0/5] Add multi-gt support for RC6 residency test Sujaritha Sundaresan
                   ` (2 preceding siblings ...)
  2023-11-14  7:31 ` [igt-dev] [v4 3/5] tests/intel: Add multi-gt support for rc6-accuracy test Sujaritha Sundaresan
@ 2023-11-14  7:31 ` Sujaritha Sundaresan
  2023-11-14  7:31 ` [igt-dev] [v4 5/5] HAX: Add rc6 residency to fast-feedback.testlist Sujaritha Sundaresan
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: Sujaritha Sundaresan @ 2023-11-14  7:31 UTC (permalink / raw)
  To: igt-dev

Add dprc debug dump to help assertain if we are hitting
genuine rc6 failures.

v3: Fix review comments (Riana)

Reviewed-by: Riana Tauro <riana.tauro@intel.com>
Signed-off-by: Sujaritha Sundaresan <sujaritha.sundaresan@intel.com>
---
 tests/intel/i915_pm_rc6_residency.c | 51 ++++++++++++++++++++++-------
 1 file changed, 40 insertions(+), 11 deletions(-)

diff --git a/tests/intel/i915_pm_rc6_residency.c b/tests/intel/i915_pm_rc6_residency.c
index be5722662..be474b786 100644
--- a/tests/intel/i915_pm_rc6_residency.c
+++ b/tests/intel/i915_pm_rc6_residency.c
@@ -36,6 +36,7 @@
 #include "i915/gem.h"
 #include "i915/gem_create.h"
 #include "igt.h"
+#include "igt_debugfs.h"
 #include "igt_perf.h"
 #include "igt_power.h"
 #include "igt_sysfs.h"
@@ -63,6 +64,8 @@
 #define RC6P_ENABLED	2
 #define RC6PP_ENABLED	4
 
+char *drpc;
+
 static int sysfs;
 
 struct residencies {
@@ -230,14 +233,25 @@ static uint64_t pmu_read_single(int fd)
 	return __pmu_read_single(fd, NULL);
 }
 
-#define __assert_within_epsilon(x, ref, tol_up, tol_down) \
-	igt_assert_f((x) <= (ref) * (1.0 + (tol_up)/100.) && \
-		     (x) >= (ref) * (1.0 - (tol_down)/100.), \
-		     "'%s' != '%s' (%.3g not within +%d%%/-%d%% tolerance of %.3g)\n",\
-		     #x, #ref, (double)(x), (tol_up), (tol_down), (double)(ref))
+#define __assert_within_epsilon(x, ref, tol_up, tol_down, debug_data) \
+	igt_assert_f((double)(x) <= (1.0 + (tol_up)) * (double)(ref) && \
+		     (double)(x) >= (1.0 - (tol_down)) * (double)(ref), \
+		     "'%s' != '%s' (%f not within +%.1f%%/-%.1f%% tolerance of %f)\n %s\n",\
+		     #x, #ref, (double)(x), \
+		     (tol_up) * 100.0, (tol_down) * 100.0, \
+		     (double)(ref), debug_data)
+
+#define assert_within_epsilon(x, ref, tolerance, debug_data) \
+	__assert_within_epsilon(x, ref, tolerance, tolerance, debug_data)
+
+static char *get_drpc(int i915, int gt_id)
+{
+	int gt_dir;
 
-#define assert_within_epsilon(x, ref, tolerance) \
-	__assert_within_epsilon(x, ref, tolerance, tolerance)
+	gt_dir = igt_debugfs_gt_dir(i915, gt_id);
+	igt_assert(gt_dir != -1);
+	return igt_sysfs_get(gt_dir, "drpc");
+}
 
 static bool __pmu_wait_for_rc6(int fd)
 {
@@ -414,7 +428,9 @@ static void rc6_idle(int i915, uint32_t ctx_id, uint64_t flags, unsigned int gt)
 			"Total energy used while idle: %.1fmJ (%.1fmW)\n",
 			idle, (idle * 1e9) / slept);
 	}
-	assert_within_epsilon(rc6, ts[1] - ts[0], 5);
+	drpc = get_drpc(i915, gt);
+
+	assert_within_epsilon(rc6, ts[1] - ts[0], 5, drpc);
 
 	done = mmap(0, 4096, PROT_WRITE, MAP_SHARED | MAP_ANON, -1, 0);
 
@@ -450,7 +466,12 @@ static void rc6_idle(int i915, uint32_t ctx_id, uint64_t flags, unsigned int gt)
 		igt_assert(cycles >= SLEEP_DURATION);
 
 		/* While very nearly idle, expect full RC6 */
-		assert_within_epsilon(rc6, ts[1] - ts[0], tolerance);
+		drpc = get_drpc(i915, gt);
+
+		assert_within_epsilon(rc6, ts[1] - ts[0], tolerance, drpc);
+
+		free(drpc);
+		drpc = NULL;
 	}
 
 	munmap(done, 4096);
@@ -503,7 +524,9 @@ static void rc6_fence(int i915, unsigned int gt)
 			"Total energy used while idle: %.1fmJ (%.1fmW)\n",
 			idle, (idle * 1e9) / slept);
 	}
-	assert_within_epsilon(rc6, ts[1] - ts[0], 5);
+	drpc = get_drpc(i915, gt);
+
+	assert_within_epsilon(rc6, ts[1] - ts[0], 5, drpc);
 
 	/* Submit but delay execution, we should be idle and conserving power */
 	ctx = intel_ctx_create_for_gt(i915, gt);
@@ -544,8 +567,13 @@ static void rc6_fence(int i915, unsigned int gt)
 
 		close(timeline);
 
-		assert_within_epsilon(rc6, ts[1] - ts[0], tolerance);
+		drpc = get_drpc(i915, gt);
+
+		assert_within_epsilon(rc6, ts[1] - ts[0], tolerance, drpc);
 		gem_quiescent_gpu(i915);
+
+		free(drpc);
+		drpc = NULL;
 	}
 	put_ahnd(ahnd);
 	intel_ctx_destroy(i915, ctx);
@@ -643,6 +671,7 @@ igt_main
 	}
 
 	igt_fixture {
+		free(drpc);
 		drm_close_driver(i915);
 	}
 }
-- 
2.25.1

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

* [igt-dev] [v4 5/5] HAX: Add rc6 residency to fast-feedback.testlist
  2023-11-14  7:31 [igt-dev] [v4 0/5] Add multi-gt support for RC6 residency test Sujaritha Sundaresan
                   ` (3 preceding siblings ...)
  2023-11-14  7:31 ` [igt-dev] [v4 4/5] tests/intel: Print drpc info for rc6_residency test Sujaritha Sundaresan
@ 2023-11-14  7:31 ` Sujaritha Sundaresan
  2023-11-14  8:10 ` [igt-dev] ✓ CI.xeBAT: success for Add multi-gt support for RC6 residency test (rev7) Patchwork
  2023-11-14  8:23 ` [igt-dev] ✗ Fi.CI.BAT: failure " Patchwork
  6 siblings, 0 replies; 9+ messages in thread
From: Sujaritha Sundaresan @ 2023-11-14  7:31 UTC (permalink / raw)
  To: igt-dev

Add rc6 residency to CI fast-feedback.

Signed-off-by: Sujaritha Sundaresan <sujaritha.sundaresan@intel.com>
---
 tests/intel-ci/fast-feedback.testlist | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/intel-ci/fast-feedback.testlist b/tests/intel-ci/fast-feedback.testlist
index c252e2cf0..35194ea1d 100644
--- a/tests/intel-ci/fast-feedback.testlist
+++ b/tests/intel-ci/fast-feedback.testlist
@@ -54,6 +54,7 @@ igt@i915_getparams_basic@basic-eu-total
 igt@i915_getparams_basic@basic-subslice-total
 igt@i915_hangman@error-state-basic
 igt@i915_pciid
+igt@i915_pm_rc6_residency@rc6-accuracy
 igt@kms_addfb_basic@addfb25-4-tiled
 igt@kms_addfb_basic@addfb25-bad-modifier
 igt@kms_addfb_basic@addfb25-framebuffer-vs-set-tiling
-- 
2.25.1

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

* [igt-dev] ✓ CI.xeBAT: success for Add multi-gt support for RC6 residency test (rev7)
  2023-11-14  7:31 [igt-dev] [v4 0/5] Add multi-gt support for RC6 residency test Sujaritha Sundaresan
                   ` (4 preceding siblings ...)
  2023-11-14  7:31 ` [igt-dev] [v4 5/5] HAX: Add rc6 residency to fast-feedback.testlist Sujaritha Sundaresan
@ 2023-11-14  8:10 ` Patchwork
  2023-11-14  8:23 ` [igt-dev] ✗ Fi.CI.BAT: failure " Patchwork
  6 siblings, 0 replies; 9+ messages in thread
From: Patchwork @ 2023-11-14  8:10 UTC (permalink / raw)
  To: Sujaritha Sundaresan; +Cc: igt-dev

[-- Attachment #1: Type: text/plain, Size: 3492 bytes --]

== Series Details ==

Series: Add multi-gt support for RC6 residency test (rev7)
URL   : https://patchwork.freedesktop.org/series/126169/
State : success

== Summary ==

CI Bug Log - changes from XEIGT_7585_BAT -> XEIGTPW_10180_BAT
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  

Participating hosts (3 -> 3)
------------------------------

  No changes in participating hosts

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

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

### IGT changes ###

#### Issues hit ####

  * igt@kms_cursor_legacy@basic-flip-after-cursor-legacy:
    - bat-dg2-oem2:       [PASS][1] -> [FAIL][2] ([i915#2346])
   [1]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_7585/bat-dg2-oem2/igt@kms_cursor_legacy@basic-flip-after-cursor-legacy.html
   [2]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10180/bat-dg2-oem2/igt@kms_cursor_legacy@basic-flip-after-cursor-legacy.html

  * igt@kms_flip@basic-flip-vs-wf_vblank@a-edp1:
    - bat-adlp-7:         [PASS][3] -> [FAIL][4] ([Intel XE#480])
   [3]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_7585/bat-adlp-7/igt@kms_flip@basic-flip-vs-wf_vblank@a-edp1.html
   [4]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10180/bat-adlp-7/igt@kms_flip@basic-flip-vs-wf_vblank@a-edp1.html

  
#### Possible fixes ####

  * igt@kms_cursor_legacy@basic-flip-before-cursor-varying-size:
    - bat-dg2-oem2:       [FAIL][5] ([i915#2346]) -> [PASS][6]
   [5]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_7585/bat-dg2-oem2/igt@kms_cursor_legacy@basic-flip-before-cursor-varying-size.html
   [6]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10180/bat-dg2-oem2/igt@kms_cursor_legacy@basic-flip-before-cursor-varying-size.html

  * igt@kms_flip@basic-flip-vs-wf_vblank@b-edp1:
    - bat-adlp-7:         [FAIL][7] ([Intel XE#480]) -> [PASS][8]
   [7]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_7585/bat-adlp-7/igt@kms_flip@basic-flip-vs-wf_vblank@b-edp1.html
   [8]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10180/bat-adlp-7/igt@kms_flip@basic-flip-vs-wf_vblank@b-edp1.html

  
#### Warnings ####

  * igt@kms_frontbuffer_tracking@basic:
    - bat-adlp-7:         [FAIL][9] ([Intel XE#616] / [Intel XE#750]) -> [DMESG-FAIL][10] ([Intel XE#282] / [i915#2017])
   [9]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_7585/bat-adlp-7/igt@kms_frontbuffer_tracking@basic.html
   [10]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10180/bat-adlp-7/igt@kms_frontbuffer_tracking@basic.html

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

  [Intel XE#282]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/282
  [Intel XE#480]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/480
  [Intel XE#524]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/524
  [Intel XE#616]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/616
  [Intel XE#750]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/750
  [i915#2017]: https://gitlab.freedesktop.org/drm/intel/issues/2017
  [i915#2346]: https://gitlab.freedesktop.org/drm/intel/issues/2346


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

  * IGT: IGT_7585 -> IGTPW_10180

  IGTPW_10180: 10180
  IGT_7585: 7585
  xe-488-7dc3dda9b2df5a5c8949532f254a0689de70f093: 7dc3dda9b2df5a5c8949532f254a0689de70f093

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10180/index.html

[-- Attachment #2: Type: text/html, Size: 4238 bytes --]

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

* [igt-dev] ✗ Fi.CI.BAT: failure for Add multi-gt support for RC6 residency test (rev7)
  2023-11-14  7:31 [igt-dev] [v4 0/5] Add multi-gt support for RC6 residency test Sujaritha Sundaresan
                   ` (5 preceding siblings ...)
  2023-11-14  8:10 ` [igt-dev] ✓ CI.xeBAT: success for Add multi-gt support for RC6 residency test (rev7) Patchwork
@ 2023-11-14  8:23 ` Patchwork
  6 siblings, 0 replies; 9+ messages in thread
From: Patchwork @ 2023-11-14  8:23 UTC (permalink / raw)
  To: Sujaritha Sundaresan; +Cc: igt-dev

[-- Attachment #1: Type: text/plain, Size: 10291 bytes --]

== Series Details ==

Series: Add multi-gt support for RC6 residency test (rev7)
URL   : https://patchwork.freedesktop.org/series/126169/
State : failure

== Summary ==

CI Bug Log - changes from IGT_7585 -> IGTPW_10180
====================================================

Summary
-------

  **FAILURE**

  Serious unknown changes coming with IGTPW_10180 absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in IGTPW_10180, please notify your bug team (lgci.bug.filing@intel.com) 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_10180/index.html

Participating hosts (34 -> 33)
------------------------------

  Additional (2): bat-kbl-2 bat-dg2-9 
  Missing    (3): bat-mtlp-8 fi-snb-2520m bat-dg1-5 

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

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

### IGT changes ###

#### Possible regressions ####

  * igt@i915_selftest@live@gt_heartbeat:
    - fi-hsw-4770:        [PASS][1] -> [INCOMPLETE][2]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_7585/fi-hsw-4770/igt@i915_selftest@live@gt_heartbeat.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10180/fi-hsw-4770/igt@i915_selftest@live@gt_heartbeat.html

  
#### Suppressed ####

  The following results come from untrusted machines, tests, or statuses.
  They do not affect the overall result.

  * {igt@kms_dsc@dsc-basic@pipe-c-dp-1}:
    - bat-dg2-9:          NOTRUN -> [DMESG-WARN][3]
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10180/bat-dg2-9/igt@kms_dsc@dsc-basic@pipe-c-dp-1.html

  
New tests
---------

  New tests have been introduced between IGT_7585 and IGTPW_10180:

### New IGT tests (2) ###

  * igt@i915_pm_rc6_residency@rc6-accuracy@gt0:
    - Statuses : 27 pass(s)
    - Exec time: [0.0] s

  * igt@i915_pm_rc6_residency@rc6-accuracy@gt1:
    - Statuses : 1 pass(s)
    - Exec time: [0.0] s

  

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

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

### IGT changes ###

#### Issues hit ####

  * igt@fbdev@info:
    - bat-kbl-2:          NOTRUN -> [SKIP][4] ([fdo#109271] / [i915#1849])
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10180/bat-kbl-2/igt@fbdev@info.html

  * igt@gem_exec_suspend@basic-s0@smem:
    - bat-dg2-9:          NOTRUN -> [INCOMPLETE][5] ([i915#9275])
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10180/bat-dg2-9/igt@gem_exec_suspend@basic-s0@smem.html

  * igt@gem_lmem_swapping@parallel-random-engines:
    - bat-kbl-2:          NOTRUN -> [SKIP][6] ([fdo#109271]) +24 other tests skip
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10180/bat-kbl-2/igt@gem_lmem_swapping@parallel-random-engines.html

  * igt@gem_mmap@basic:
    - bat-dg2-9:          NOTRUN -> [SKIP][7] ([i915#4083])
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10180/bat-dg2-9/igt@gem_mmap@basic.html

  * igt@gem_mmap_gtt@basic:
    - bat-dg2-9:          NOTRUN -> [SKIP][8] ([i915#4077]) +2 other tests skip
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10180/bat-dg2-9/igt@gem_mmap_gtt@basic.html

  * igt@gem_render_tiled_blits@basic:
    - bat-dg2-9:          NOTRUN -> [SKIP][9] ([i915#4079]) +1 other test skip
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10180/bat-dg2-9/igt@gem_render_tiled_blits@basic.html

  * igt@i915_pm_rc6_residency@rc6-accuracy:
    - fi-blb-e6850:       NOTRUN -> [SKIP][10] ([fdo#109271])
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10180/fi-blb-e6850/igt@i915_pm_rc6_residency@rc6-accuracy.html
    - fi-pnv-d510:        NOTRUN -> [SKIP][11] ([fdo#109271])
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10180/fi-pnv-d510/igt@i915_pm_rc6_residency@rc6-accuracy.html
    - fi-ivb-3770:        NOTRUN -> [SKIP][12] ([fdo#109271])
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10180/fi-ivb-3770/igt@i915_pm_rc6_residency@rc6-accuracy.html
    - fi-elk-e7500:       NOTRUN -> [SKIP][13] ([fdo#109271])
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10180/fi-elk-e7500/igt@i915_pm_rc6_residency@rc6-accuracy.html
    - fi-ilk-650:         NOTRUN -> [SKIP][14] ([fdo#109271])
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10180/fi-ilk-650/igt@i915_pm_rc6_residency@rc6-accuracy.html

  * igt@i915_pm_rps@basic-api:
    - bat-dg2-9:          NOTRUN -> [SKIP][15] ([i915#6621])
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10180/bat-dg2-9/igt@i915_pm_rps@basic-api.html

  * igt@kms_addfb_basic@addfb25-y-tiled-small-legacy:
    - bat-dg2-9:          NOTRUN -> [SKIP][16] ([i915#5190])
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10180/bat-dg2-9/igt@kms_addfb_basic@addfb25-y-tiled-small-legacy.html

  * igt@kms_addfb_basic@basic-y-tiled-legacy:
    - bat-dg2-9:          NOTRUN -> [SKIP][17] ([i915#4215] / [i915#5190])
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10180/bat-dg2-9/igt@kms_addfb_basic@basic-y-tiled-legacy.html

  * igt@kms_addfb_basic@framebuffer-vs-set-tiling:
    - bat-dg2-9:          NOTRUN -> [SKIP][18] ([i915#4212]) +6 other tests skip
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10180/bat-dg2-9/igt@kms_addfb_basic@framebuffer-vs-set-tiling.html

  * igt@kms_addfb_basic@tile-pitch-mismatch:
    - bat-dg2-9:          NOTRUN -> [SKIP][19] ([i915#4212] / [i915#5608])
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10180/bat-dg2-9/igt@kms_addfb_basic@tile-pitch-mismatch.html

  * igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy:
    - bat-dg2-9:          NOTRUN -> [SKIP][20] ([i915#4103] / [i915#4213] / [i915#5608]) +1 other test skip
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10180/bat-dg2-9/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy.html

  * igt@kms_force_connector_basic@force-load-detect:
    - bat-dg2-9:          NOTRUN -> [SKIP][21] ([fdo#109285])
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10180/bat-dg2-9/igt@kms_force_connector_basic@force-load-detect.html

  * igt@kms_force_connector_basic@prune-stale-modes:
    - bat-dg2-9:          NOTRUN -> [SKIP][22] ([i915#5274])
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10180/bat-dg2-9/igt@kms_force_connector_basic@prune-stale-modes.html

  * igt@kms_pipe_crc_basic@nonblocking-crc-frame-sequence:
    - bat-adlp-9:         NOTRUN -> [SKIP][23] ([i915#1845] / [i915#3546]) +2 other tests skip
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10180/bat-adlp-9/igt@kms_pipe_crc_basic@nonblocking-crc-frame-sequence.html

  * igt@kms_pipe_crc_basic@read-crc-frame-sequence:
    - bat-kbl-2:          NOTRUN -> [SKIP][24] ([fdo#109271] / [i915#1845]) +14 other tests skip
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10180/bat-kbl-2/igt@kms_pipe_crc_basic@read-crc-frame-sequence.html

  * igt@kms_psr@sprite_plane_onoff:
    - bat-dg2-9:          NOTRUN -> [SKIP][25] ([i915#1072]) +3 other tests skip
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10180/bat-dg2-9/igt@kms_psr@sprite_plane_onoff.html

  * igt@kms_setmode@basic-clone-single-crtc:
    - bat-dg2-9:          NOTRUN -> [SKIP][26] ([i915#3555] / [i915#4098])
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10180/bat-dg2-9/igt@kms_setmode@basic-clone-single-crtc.html

  * igt@prime_vgem@basic-fence-flip:
    - bat-dg2-9:          NOTRUN -> [SKIP][27] ([i915#3708])
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10180/bat-dg2-9/igt@prime_vgem@basic-fence-flip.html

  * igt@prime_vgem@basic-fence-mmap:
    - bat-dg2-9:          NOTRUN -> [SKIP][28] ([i915#3708] / [i915#4077]) +1 other test skip
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10180/bat-dg2-9/igt@prime_vgem@basic-fence-mmap.html

  * igt@prime_vgem@basic-write:
    - bat-dg2-9:          NOTRUN -> [SKIP][29] ([i915#3291] / [i915#3708]) +2 other tests skip
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10180/bat-dg2-9/igt@prime_vgem@basic-write.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#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
  [i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
  [i915#1845]: https://gitlab.freedesktop.org/drm/intel/issues/1845
  [i915#1849]: https://gitlab.freedesktop.org/drm/intel/issues/1849
  [i915#3291]: https://gitlab.freedesktop.org/drm/intel/issues/3291
  [i915#3546]: https://gitlab.freedesktop.org/drm/intel/issues/3546
  [i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
  [i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
  [i915#4077]: https://gitlab.freedesktop.org/drm/intel/issues/4077
  [i915#4079]: https://gitlab.freedesktop.org/drm/intel/issues/4079
  [i915#4083]: https://gitlab.freedesktop.org/drm/intel/issues/4083
  [i915#4098]: https://gitlab.freedesktop.org/drm/intel/issues/4098
  [i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
  [i915#4212]: https://gitlab.freedesktop.org/drm/intel/issues/4212
  [i915#4213]: https://gitlab.freedesktop.org/drm/intel/issues/4213
  [i915#4215]: https://gitlab.freedesktop.org/drm/intel/issues/4215
  [i915#5190]: https://gitlab.freedesktop.org/drm/intel/issues/5190
  [i915#5274]: https://gitlab.freedesktop.org/drm/intel/issues/5274
  [i915#5354]: https://gitlab.freedesktop.org/drm/intel/issues/5354
  [i915#5608]: https://gitlab.freedesktop.org/drm/intel/issues/5608
  [i915#6621]: https://gitlab.freedesktop.org/drm/intel/issues/6621
  [i915#9275]: https://gitlab.freedesktop.org/drm/intel/issues/9275


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

  * CI: CI-20190529 -> None
  * IGT: IGT_7585 -> IGTPW_10180

  CI-20190529: 20190529
  CI_DRM_13871: 811507c09ec3722450601b3642c47ab63830112b @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_10180: 10180
  IGT_7585: 7585


Testlist changes
----------------

-igt@xe_exec_queue_property@invalid-exec-queue
-igt@xe_exec_queue_property@non-zero-reserved

== Logs ==

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

[-- Attachment #2: Type: text/html, Size: 12506 bytes --]

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

* Re: [igt-dev] [v4 3/5] tests/intel: Add multi-gt support for rc6-accuracy test
  2023-11-14  7:31 ` [igt-dev] [v4 3/5] tests/intel: Add multi-gt support for rc6-accuracy test Sujaritha Sundaresan
@ 2023-11-14  8:54   ` Riana Tauro
  0 siblings, 0 replies; 9+ messages in thread
From: Riana Tauro @ 2023-11-14  8:54 UTC (permalink / raw)
  To: Sujaritha Sundaresan, igt-dev



On 11/14/2023 1:01 PM, Sujaritha Sundaresan wrote:
> Add multi-gt support for the rc6_accuracy subtest
> 
> v3: Align get_rc6_enabled_mask with other changes
>      Introduce rc6_enabled_mask
> 
> v4: Make test dynamic (Riana)
> 
> Signed-off-by: Sujaritha Sundaresan <sujaritha.sundaresan@intel.com>
> ---
>   tests/intel/i915_pm_rc6_residency.c | 78 ++++++++++++++++-------------
>   1 file changed, 43 insertions(+), 35 deletions(-)
> 
> diff --git a/tests/intel/i915_pm_rc6_residency.c b/tests/intel/i915_pm_rc6_residency.c
> index e84e8ea96..be5722662 100644
> --- a/tests/intel/i915_pm_rc6_residency.c
> +++ b/tests/intel/i915_pm_rc6_residency.c
> @@ -73,32 +73,28 @@ struct residencies {
>   	int duration;
>   };
>   
> -static unsigned long get_rc6_enabled_mask(void)
> +static unsigned long get_rc6_enabled_mask(int dirfd)
>   {
>   	unsigned long enabled;
>   
>   	enabled = 0;
> -	igt_sysfs_scanf(sysfs, "power/rc6_enable", "%lu", &enabled);
> +	igt_sysfs_rps_scanf(dirfd, RC6_ENABLE, "%lu", &enabled);
>   	return enabled;
>   }
>   
> -static bool has_rc6_residency(const char *name)
> +static bool has_rc6_residency(int dirfd, enum i915_attr_id id)
>   {
>   	unsigned long residency;
> -	char path[128];
>   
> -	sprintf(path, "power/%s_residency_ms", name);
> -	return igt_sysfs_scanf(sysfs, path, "%lu", &residency) == 1;
> +	return igt_sysfs_rps_scanf(dirfd, id, "%lu", &residency) == 1;
>   }
>   
> -static unsigned long read_rc6_residency(const char *name)
> +static unsigned long read_rc6_residency(int dirfd, enum i915_attr_id id)
>   {
>   	unsigned long residency;
> -	char path[128];
>   
>   	residency = 0;
> -	sprintf(path, "power/%s_residency_ms", name);
> -	igt_assert(igt_sysfs_scanf(sysfs, path, "%lu", &residency) == 1);
> +	igt_assert(igt_sysfs_rps_scanf(dirfd, id, "%lu", &residency) == 1);
>   	return residency;
>   }
>   
> @@ -125,28 +121,28 @@ static unsigned long gettime_ms(void)
>   	return ts.tv_sec * 1000 + ts.tv_nsec / 1000000;
>   }
>   
> -static void read_residencies(int devid, unsigned int mask,
> +static void read_residencies(int devid, int dirfd, unsigned int mask,
>   			     struct residencies *res)
>   {
>   	res->duration = gettime_ms();
>   
>   	if (mask & RC6_ENABLED)
> -		res->rc6 = read_rc6_residency("rc6");
> +		res->rc6 = read_rc6_residency(dirfd, RC6_RESIDENCY_MS);
>   
>   	if ((mask & RC6_ENABLED) &&
>   	    (IS_VALLEYVIEW(devid) || IS_CHERRYVIEW(devid)))
> -		res->media_rc6 = read_rc6_residency("media_rc6");
> +		res->media_rc6 = read_rc6_residency(dirfd, MEDIA_RC6_RESIDENCY_MS);
>   
>   	if (mask & RC6P_ENABLED)
> -		res->rc6p = read_rc6_residency("rc6p");
> +		res->rc6p = read_rc6_residency(dirfd, RC6P_RESIDENCY_MS);
>   
>   	if (mask & RC6PP_ENABLED)
> -		res->rc6pp = read_rc6_residency("rc6pp");
> +		res->rc6pp = read_rc6_residency(dirfd, RC6PP_RESIDENCY_MS);
>   
>   	res->duration += (gettime_ms() - res->duration) / 2;
>   }
>   
> -static void measure_residencies(int devid, unsigned int mask,
> +static void measure_residencies(int devid, int dirfd, unsigned int mask,
>   				struct residencies *res)
>   {
>   	struct residencies start = { };
> @@ -158,13 +154,13 @@ static void measure_residencies(int devid, unsigned int mask,
>   	 * measurement, since the valid counter range is different on
>   	 * different platforms and so fixing it up would be non-trivial.
>   	 */
> -	read_residencies(devid, mask, &end);
> +	read_residencies(devid, dirfd, mask, &end);
>   	igt_debug("time=%d: rc6=(%d, %d), rc6p=%d, rc6pp=%d\n",
>   		  end.duration, end.rc6, end.media_rc6, end.rc6p, end.rc6pp);
>   	for (retry = 0; retry < 2; retry++) {
>   		start = end;
>   		sleep(SLEEP_DURATION);
> -		read_residencies(devid, mask, &end);
> +		read_residencies(devid, dirfd, mask, &end);
>   
>   		igt_debug("time=%d: rc6=(%d, %d), rc6p=%d, rc6pp=%d\n",
>   			  end.duration,
> @@ -196,7 +192,7 @@ static void measure_residencies(int devid, unsigned int mask,
>   	res->rc6 += res->rc6p;
>   }
>   
> -static bool wait_for_rc6(void)
> +static bool wait_for_rc6(int dirfd)
>   {
>   	struct timespec tv = {};
>   	unsigned long start, now;
> @@ -205,11 +201,11 @@ static bool wait_for_rc6(void)
>   	usleep(160 * 1000);
>   
>   	/* Then poll for RC6 to start ticking */
> -	now = read_rc6_residency("rc6");
> +	now = read_rc6_residency(dirfd, RC6_RESIDENCY_MS);
>   	do {
>   		start = now;
>   		usleep(5000);
> -		now = read_rc6_residency("rc6");
> +		now = read_rc6_residency(dirfd, RC6_RESIDENCY_MS);
>   		if (now - start > 1)
>   			return true;
>   	} while (!igt_seconds_elapsed(&tv));
> @@ -558,6 +554,17 @@ static void rc6_fence(int i915, unsigned int gt)
>   	close(fd);
>   }
>   
> +static unsigned int rc6_enabled_mask(int i915, int dirfd)
> +{
> +	igt_require(has_rc6_residency(dirfd, RC6_RESIDENCY_MS));
> +
> +	/* Make sure rc6 counters are running */
> +	igt_drop_caches_set(i915, DROP_IDLE);
> +	igt_require(wait_for_rc6(dirfd));
> +
> +	return get_rc6_enabled_mask(dirfd);
> +}
> +
>   igt_main
>   {
>   	int i915 = -1;
> @@ -603,22 +610,20 @@ igt_main
>   		igt_fixture {
>   			devid = intel_get_drm_devid(i915);
>   			sysfs = igt_sysfs_open(i915);
> -
> -			igt_require(has_rc6_residency("rc6"));
> -
> -			/* Make sure rc6 counters are running */
> -			igt_drop_caches_set(i915, DROP_IDLE);
> -			igt_require(wait_for_rc6());
> -
> -			rc6_enabled = get_rc6_enabled_mask();
> -			igt_require(rc6_enabled & RC6_ENABLED);
> +			igt_assert(sysfs != 1);
>   		}
>   
> -		igt_subtest("rc6-accuracy") {
> -			struct residencies res;
> +		igt_subtest_with_dynamic("rc6-accuracy") {
> +			i915_for_each_gt(i915, dirfd, gt) {
> +				struct residencies res;
>   
> -			measure_residencies(devid, rc6_enabled, &res);
> -			residency_accuracy(res.rc6, res.duration, "rc6");
> +				rc6_enabled = rc6_enabled_mask(i915, dirfd);
> +				igt_require(rc6_enabled & RC6_ENABLED);
> +
> +				igt_dynamic_f("gt%u", gt)
> +				measure_residencies(devid, dirfd, rc6_enabled, &res);
indentation

Also keep all the calls under igt_dynamic_f. Right now its only 
measure_residencies
Otherwise logs are displayed after test

Dynamic subtest gt0: SUCCESS (3.001s)
Residency in rc6 or deeper state: 3000 ms (sleep duration 3000 ms) 
(100.0% of expected duration)

With all the above fixed

Reviewed-by: Riana Tauro <riana.tauro@intel.com>
> +				residency_accuracy(res.rc6, res.duration, "rc6");
> +			}
>   		}
>   
>   		igt_subtest("media-rc6-accuracy") {
> @@ -626,7 +631,10 @@ igt_main
>   
>   			igt_require(IS_VALLEYVIEW(devid) || IS_CHERRYVIEW(devid));
>   
> -			measure_residencies(devid, rc6_enabled, &res);
> +			rc6_enabled = rc6_enabled_mask(i915, sysfs);
> +			igt_require(rc6_enabled & RC6_ENABLED);
> +
> +			measure_residencies(devid, sysfs, rc6_enabled, &res);
>   			residency_accuracy(res.media_rc6, res.duration, "media_rc6");
>   		}
>   

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

end of thread, other threads:[~2023-11-14  8:54 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-14  7:31 [igt-dev] [v4 0/5] Add multi-gt support for RC6 residency test Sujaritha Sundaresan
2023-11-14  7:31 ` [igt-dev] [v4 1/5] tests/intel: Add multi-gt support for rc6-idle test Sujaritha Sundaresan
2023-11-14  7:31 ` [igt-dev] [v4 2/5] tests/intel: Add multi-gt support for rc6-fence test Sujaritha Sundaresan
2023-11-14  7:31 ` [igt-dev] [v4 3/5] tests/intel: Add multi-gt support for rc6-accuracy test Sujaritha Sundaresan
2023-11-14  8:54   ` Riana Tauro
2023-11-14  7:31 ` [igt-dev] [v4 4/5] tests/intel: Print drpc info for rc6_residency test Sujaritha Sundaresan
2023-11-14  7:31 ` [igt-dev] [v4 5/5] HAX: Add rc6 residency to fast-feedback.testlist Sujaritha Sundaresan
2023-11-14  8:10 ` [igt-dev] ✓ CI.xeBAT: success for Add multi-gt support for RC6 residency test (rev7) Patchwork
2023-11-14  8:23 ` [igt-dev] ✗ Fi.CI.BAT: failure " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox