From 022e6f8ae7c853e221eb9d8344cf1aa27c5fbe57 Mon Sep 17 00:00:00 2001 From: Imre Deak Date: Fri, 30 Sep 2016 17:28:53 +0300 Subject: 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 --- lib/igt_aux.h | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) (limited to 'lib/igt_aux.h') diff --git a/lib/igt_aux.h b/lib/igt_aux.h index 7f5a7cfd..39fd8ea6 100644 --- a/lib/igt_aux.h +++ b/lib/igt_aux.h @@ -115,8 +115,29 @@ void igt_trash_aperture(void); void igt_cleanup_aperture_trashers(void); /* suspend/hibernate and auto-resume system */ -void igt_system_suspend_autoresume(void); -void igt_system_hibernate_autoresume(void); + +enum igt_suspend_state { + SUSPEND_STATE_FREEZE, + SUSPEND_STATE_MEM, + SUSPEND_STATE_STANDBY, + SUSPEND_STATE_DISK, + + SUSPEND_STATE_NUM, +}; + +enum igt_suspend_test { + SUSPEND_TEST_NONE, + SUSPEND_TEST_FREEZER, + SUSPEND_TEST_DEVICES, + SUSPEND_TEST_PLATFORM, + SUSPEND_TEST_PROCESSORS, + SUSPEND_TEST_CORE, + + SUSPEND_TEST_NUM, +}; + +void igt_system_suspend_autoresume(enum igt_suspend_state state, + enum igt_suspend_test test); /* dropping priviledges */ void igt_drop_root(void); -- cgit v1.2.3