[PATCH i-g-t] tests/intel: Add multi gt support for rc6_accuracy test
Sujaritha Sundaresan
sujaritha.sundaresan at intel.com
Tue Sep 19 10:02:43 UTC 2023
Signed-off-by: Sujaritha Sundaresan <sujaritha.sundaresan at intel.com>
---
tests/intel/i915_pm_rc6_residency.c | 26 ++++++++++++++++----------
1 file changed, 16 insertions(+), 10 deletions(-)
diff --git a/tests/intel/i915_pm_rc6_residency.c b/tests/intel/i915_pm_rc6_residency.c
index b266680ac..b3aa2aba5 100644
--- a/tests/intel/i915_pm_rc6_residency.c
+++ b/tests/intel/i915_pm_rc6_residency.c
@@ -87,7 +87,7 @@ static bool has_rc6_residency(const char *name)
unsigned long residency;
char path[128];
- sprintf(path, "power/%s_residency_ms", name);
+ sprintf(path, "gt/%s_residency_ms", name);
return igt_sysfs_scanf(sysfs, path, "%lu", &residency) == 1;
}
@@ -97,14 +97,15 @@ static unsigned long read_rc6_residency(const char *name)
char path[128];
residency = 0;
- sprintf(path, "power/%s_residency_ms", name);
+ sprintf(path, "gt/%s_residency_ms", name);
igt_assert(igt_sysfs_scanf(sysfs, path, "%lu", &residency) == 1);
return residency;
}
static void residency_accuracy(unsigned int diff,
unsigned int duration,
- const char *name_of_rc6_residency)
+ const char *name_of_rc6_residency,
+ unsigned int gt)
{
double ratio;
@@ -147,7 +148,8 @@ static void read_residencies(int devid, unsigned int mask,
}
static void measure_residencies(int devid, unsigned int mask,
- struct residencies *res)
+ struct residencies *res,
+ unsigned int gt)
{
struct residencies start = { };
struct residencies end = { };
@@ -590,6 +592,7 @@ igt_main
igt_subtest_group {
unsigned int rc6_enabled = 0;
unsigned int devid = 0;
+ unsigned int dir, gt;
igt_fixture {
devid = intel_get_drm_devid(i915);
@@ -605,11 +608,14 @@ igt_main
igt_require(rc6_enabled & RC6_ENABLED);
}
- igt_subtest("rc6-accuracy") {
- struct residencies res;
+ igt_subtest_with_dynamic("rc6-accuracy") {
+ i915_for_each_gt(i915, dir, gt) {
+ struct residencies res;
- measure_residencies(devid, rc6_enabled, &res);
- residency_accuracy(res.rc6, res.duration, "rc6");
+ igt_dynamic_f("gt%u", gt)
+ measure_residencies(devid, rc6_enabled, &res, gt);
+ residency_accuracy(res.rc6, res.duration, "rc6", gt);
+ }
}
igt_subtest("media-rc6-accuracy") {
@@ -617,8 +623,8 @@ igt_main
igt_require(IS_VALLEYVIEW(devid) || IS_CHERRYVIEW(devid));
- measure_residencies(devid, rc6_enabled, &res);
- residency_accuracy(res.media_rc6, res.duration, "media_rc6");
+ measure_residencies(devid, rc6_enabled, &res, gt);
+ residency_accuracy(res.media_rc6, res.duration, "media_rc6", gt);
}
igt_fixture
--
2.25.1
More information about the Intel-gfx-trybot
mailing list