[PATCH i-g-t 1/2] tests/i915/i915_suspend: Add s2idle and s3 subtests without i915
Riana Tauro
riana.tauro at intel.com
Fri Apr 29 07:05:59 UTC 2022
From: "Tauro, Riana" <riana.tauro at intel.com>
Add new tests basic-s2idle-without-i915 and basic-s3-without-i915
to exercise s2idle and s3 cycles to know the system wide
health of suspend/resume
Signed-off-by: Tauro, Riana <riana.tauro at intel.com>
Reviewed-by: Anshuman Gupta <anshuman.gupta at intel.com>
---
lib/igt_aux.c | 2 ++
tests/i915/i915_suspend.c | 14 +++++++++-----
2 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/lib/igt_aux.c b/lib/igt_aux.c
index 03cc38c9..981ec745 100644
--- a/lib/igt_aux.c
+++ b/lib/igt_aux.c
@@ -766,6 +766,8 @@ static void suspend_via_rtcwake(enum igt_suspend_state state)
delay = igt_get_autoresume_delay(state);
+ igt_kmsg(KMSG_INFO "auto resume delay %d\n",delay);
+ igt_info("auto resume delay %d\n",delay);
/*
* Skip if rtcwake would fail for a reason not related to the kernel's
* suspend functionality.
diff --git a/tests/i915/i915_suspend.c b/tests/i915/i915_suspend.c
index d34b7a5d..8203b806 100644
--- a/tests/i915/i915_suspend.c
+++ b/tests/i915/i915_suspend.c
@@ -204,12 +204,12 @@ test_forcewake(int fd, bool hibernate)
}
static void
-test_suspend_without_i915(void)
+test_suspend_without_i915(int state)
{
igt_kmsg(KMSG_INFO "Unloading i915\n");
igt_assert_eq(igt_i915_driver_unload(),0);
- igt_system_suspend_autoresume(SUSPEND_STATE_MEM, SUSPEND_TEST_NONE);
+ igt_system_suspend_autoresume(state, SUSPEND_TEST_NONE);
igt_kmsg(KMSG_INFO "Re-loading i915 \n");
igt_assert_eq(igt_i915_driver_load(NULL), 0);
@@ -219,9 +219,13 @@ int fd;
igt_main
{
- igt_describe("Validate system suspend cycle without i915 module");
- igt_subtest("system-suspend-without-i915")
- test_suspend_without_i915();
+ igt_describe("Validate suspend-to-idle without i915 module");
+ igt_subtest("basic-s2idle-without-i915")
+ test_suspend_without_i915(SUSPEND_STATE_FREEZE);
+
+ igt_describe("Validate S3 without i915 module");
+ igt_subtest("basic-s3-without-i915")
+ test_suspend_without_i915(SUSPEND_STATE_MEM);
igt_fixture
fd = drm_open_driver(DRIVER_INTEL);
--
2.25.1
More information about the Intel-gfx-trybot
mailing list