summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2018-12-05 10:45:56 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2018-12-05 21:01:02 +0000
commitedb2db2cf2b6665d7ba3fa9117263302f6307a4f (patch)
tree7f0acbde5705337e6ad31bd9ad70ec1318f388eb /tests
parentb55279bdb765933eb29e52b4805c817ceed5776a (diff)
igt/pm_rpm: Show the contents of i915_runtime_pm_status on setup
To try and help debug situations where the driver has leaked a runtime reference before executing the pm_rpm tests, show the contents of i915_runtime_pm_status at startup, which will include all currently held wakerefs. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Antonio Argenziano <antonio.argenziano@intel.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/pm_rpm.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/pm_rpm.c b/tests/pm_rpm.c
index f0d6db525..7dcb5586d 100644
--- a/tests/pm_rpm.c
+++ b/tests/pm_rpm.c
@@ -725,6 +725,18 @@ static bool dmc_loaded(void)
return strstr(buf, "fw loaded: yes");
}
+static void dump_file(int dir, const char *filename)
+{
+ char *contents;
+
+ contents = igt_sysfs_get(dir, filename);
+ if (!contents)
+ return;
+
+ igt_info("%s:\n%s\n", filename, contents);
+ free(contents);
+}
+
static bool setup_environment(void)
{
if (has_runtime_pm)
@@ -744,6 +756,8 @@ static bool setup_environment(void)
has_runtime_pm = igt_setup_runtime_pm();
setup_pc8();
+ dump_file(debugfs, "i915_runtime_pm_status");
+
igt_info("Runtime PM support: %d\n", has_runtime_pm);
igt_info("PC8 residency support: %d\n", has_pc8);
igt_require(has_runtime_pm);