diff options
author | Anshuman Gupta <anshuman.gupta@intel.com> | 2022-02-11 21:43:14 +0530 |
---|---|---|
committer | Ashutosh Dixit <ashutosh.dixit@intel.com> | 2022-02-11 17:27:10 -0800 |
commit | 59c59f45b8433300b1b45cc9abc4b86dd0f81084 (patch) | |
tree | 7cf8290e4a83d3a68abd37e81bd39a879c04ef71 /tests/i915/i915_pm_rpm.c | |
parent | 1bd167a3af9e8f6168ac89c64c64b929694d9be7 (diff) |
tests: i915_pm_rpm : Dump i915_runtime_pm_status
Dump i915_runtime_pm_status conditionally whenever runtime pm status
got active and it was expected to be suspended.
Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com>
Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
Diffstat (limited to 'tests/i915/i915_pm_rpm.c')
-rw-r--r-- | tests/i915/i915_pm_rpm.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/tests/i915/i915_pm_rpm.c b/tests/i915/i915_pm_rpm.c index 648b0cff..6c8ffbd5 100644 --- a/tests/i915/i915_pm_rpm.c +++ b/tests/i915/i915_pm_rpm.c @@ -201,10 +201,16 @@ static bool wait_for_pc8_status(enum pc8_status status) static bool wait_for_suspended(void) { - if (has_pc8 && !has_runtime_pm) + if (has_pc8 && !has_runtime_pm) { return wait_for_pc8_status(PC8_ENABLED); - else - return igt_wait_for_pm_status(IGT_RUNTIME_PM_STATUS_SUSPENDED); + } else { + bool suspended = igt_wait_for_pm_status(IGT_RUNTIME_PM_STATUS_SUSPENDED); + + if (!suspended) + igt_debugfs_dump(drm_fd, "i915_runtime_pm_status"); + + return suspended; + } } static bool wait_for_active(void) |