[igt-dev] [PATCH i-g-t 2/6] i915/i915_pm_rpm.c: create PC state subtest group
Anshuman Gupta
anshuman.gupta at intel.com
Wed Dec 9 16:06:38 UTC 2020
Create a separate igt test group and move package C
state in to this subgroup.
Run powertop --auto-tune to tune SOC power configuration
for package C state tests.
Signed-off-by: Anshuman Gupta <anshuman.gupta at intel.com>
---
tests/i915/i915_pm_rpm.c | 35 +++++++++++++++++++++++++++++++----
1 file changed, 31 insertions(+), 4 deletions(-)
diff --git a/tests/i915/i915_pm_rpm.c b/tests/i915/i915_pm_rpm.c
index af55b569..42bc44d9 100644
--- a/tests/i915/i915_pm_rpm.c
+++ b/tests/i915/i915_pm_rpm.c
@@ -832,6 +832,25 @@ static void basic_subtest(void)
/* XXX Also we can test wake up via exec nop */
}
+static bool setup_powertop(void)
+{
+ FILE *fp;
+ char tmp[512];
+
+ fp = popen("powertop --auto-tune", "r");
+ if (fp == NULL) {
+ igt_info("Failed to run powertop\n");
+ perror("popen");
+ return false;
+ }
+
+ while (fgets(tmp, sizeof(tmp), fp) != NULL)
+ igt_info("%s\n", tmp);
+
+ pclose(fp);
+ return true;
+}
+
static void pc8_residency_subtest(bool display_on)
{
igt_require(has_pc8);
@@ -2082,15 +2101,23 @@ igt_main_args("", long_options, help_str, opt_handler, NULL)
igt_subtest_with_dynamic("universal-planes-dpms")
planes_subtest(true, true);
+ igt_describe("package C state residency test");
+ igt_subtest_group {
+ igt_fixture {
+ igt_require(setup_powertop());
+ }
+
+ igt_subtest("pc8-residency-display-on")
+ pc8_residency_subtest(true);
+ igt_subtest("pc8-residency-display-off")
+ pc8_residency_subtest(false);
+ }
+
/* Misc */
igt_subtest("reg-read-ioctl")
reg_read_ioctl_subtest();
igt_subtest("i2c")
i2c_subtest();
- igt_subtest("pc8-residency-display-on")
- pc8_residency_subtest(true);
- igt_subtest("pc8-residency-display-off")
- pc8_residency_subtest(false);
igt_subtest("debugfs-read")
debugfs_read_subtest();
igt_subtest("debugfs-forcewake-user")
--
2.26.2
More information about the igt-dev
mailing list