diff options
author | Imre Deak <imre.deak@intel.com> | 2016-09-30 17:28:53 +0300 |
---|---|---|
committer | Imre Deak <imre.deak@intel.com> | 2016-10-13 15:08:55 +0300 |
commit | 022e6f8ae7c853e221eb9d8344cf1aa27c5fbe57 (patch) | |
tree | ea9d7a00ee3e675c3ae5fbd5063572bc816dc352 /tests/drv_suspend.c | |
parent | e442481c9cf35a1c509b836cf076bae597296200 (diff) |
lib/igt_aux: Add support for various system suspend/resume options
To have a more accurate idea about any suspend/resume issues we can
perform the s/r until various phases in the s/r sequence. This way we
can isolate the given problem as being a device driver, kernel core or
BIOS related issue. Actual subtests using these new s/r phases will be
added as follow-up.
While at it also add the freeze suspend target, it's something we also
would need to test.
Signed-off-by: Imre Deak <imre.deak@intel.com>
Diffstat (limited to 'tests/drv_suspend.c')
-rw-r--r-- | tests/drv_suspend.c | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/tests/drv_suspend.c b/tests/drv_suspend.c index 601a32ea..0a459e30 100644 --- a/tests/drv_suspend.c +++ b/tests/drv_suspend.c @@ -77,9 +77,11 @@ test_fence_restore(int fd, bool tiled2untiled, bool hibernate) gem_set_tiling(fd, handle_tiled, I915_TILING_X, 2048); if (hibernate) - igt_system_hibernate_autoresume(); + igt_system_suspend_autoresume(SUSPEND_STATE_DISK, + SUSPEND_TEST_NONE); else - igt_system_suspend_autoresume(); + igt_system_suspend_autoresume(SUSPEND_STATE_MEM, + SUSPEND_TEST_NONE); igt_info("checking the first canary object\n"); for (i = 0; i < OBJECT_SIZE/sizeof(uint32_t); i++) @@ -117,9 +119,11 @@ test_debugfs_reader(bool hibernate) sleep(1); if (hibernate) - igt_system_hibernate_autoresume(); + igt_system_suspend_autoresume(SUSPEND_STATE_DISK, + SUSPEND_TEST_NONE); else - igt_system_suspend_autoresume(); + igt_system_suspend_autoresume(SUSPEND_STATE_MEM, + SUSPEND_TEST_NONE); sleep(1); @@ -145,9 +149,11 @@ test_sysfs_reader(bool hibernate) sleep(1); if (hibernate) - igt_system_hibernate_autoresume(); + igt_system_suspend_autoresume(SUSPEND_STATE_DISK, + SUSPEND_TEST_NONE); else - igt_system_suspend_autoresume(); + igt_system_suspend_autoresume(SUSPEND_STATE_MEM, + SUSPEND_TEST_NONE); sleep(1); @@ -163,9 +169,11 @@ test_forcewake(bool hibernate) igt_assert_lte(0, fw_fd); if (hibernate) - igt_system_hibernate_autoresume(); + igt_system_suspend_autoresume(SUSPEND_STATE_DISK, + SUSPEND_TEST_NONE); else - igt_system_suspend_autoresume(); + igt_system_suspend_autoresume(SUSPEND_STATE_MEM, + SUSPEND_TEST_NONE); close (fw_fd); } |