[igt-dev] [PATCH i-g-t v2] perf_pmu: Dump i915_runtime_pm_status
Anshuman Gupta
anshuman.gupta at intel.com
Fri Mar 3 15:49:41 UTC 2023
Dump i915_pm_runtime_status in case of i915 device failed to runtime
suspend, it will dump the rpm wakeref tracking information which
will useful to debug the runtime pm issues.
v2:
- Use wait_for_suspended(). [Ashutosh]
Signed-off-by: Anshuman Gupta <anshuman.gupta at intel.com>
Reviewed-by: Ashutosh Dixit <ashutosh.dixit at intel.com>
---
tests/i915/perf_pmu.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/tests/i915/perf_pmu.c b/tests/i915/perf_pmu.c
index c1779fc9d..df194c8ad 100644
--- a/tests/i915/perf_pmu.c
+++ b/tests/i915/perf_pmu.c
@@ -1703,6 +1703,16 @@ static bool wait_for_rc6(int fd, int timeout)
return false;
}
+static bool wait_for_suspended(int gem_fd)
+{
+ bool suspended = igt_wait_for_pm_status(IGT_RUNTIME_PM_STATUS_SUSPENDED);
+
+ if (!suspended)
+ __igt_debugfs_dump(gem_fd, "i915_runtime_pm_status", IGT_LOG_INFO);
+
+ return suspended;
+}
+
static void
test_rc6(int gem_fd, unsigned int flags)
{
@@ -1727,7 +1737,7 @@ test_rc6(int gem_fd, unsigned int flags)
drmModeFreeResources(res);
igt_require(igt_setup_runtime_pm(gem_fd));
- igt_require(igt_wait_for_pm_status(IGT_RUNTIME_PM_STATUS_SUSPENDED));
+ igt_require(wait_for_suspended(gem_fd));
/*
* Sleep for a bit to see if once woken up estimated RC6 hasn't
--
2.25.1
More information about the igt-dev
mailing list