summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorImre Deak <imre.deak@intel.com>2016-10-04 18:09:57 +0300
committerImre Deak <imre.deak@intel.com>2016-10-13 15:08:55 +0300
commitbbb950302f7c8405faa9c8018541501ee7bd335f (patch)
tree3d43f6b94616dab18b943c00f364907b3489928d
parent022e6f8ae7c853e221eb9d8344cf1aa27c5fbe57 (diff)
tests/gem_exec_suspend: Add basic S3/S4-devices subtests
Add a new subtest that performs suspend-to-mem and -disk, but instead of doing the full sequence it suspends/resumes only devices. A failed S3/4 subtest and a successful S3/4-devices subtest would indicate a kernel core or BIOS problem as opposed to some issue in the driver. v2: - Add a new basic-S3-devices subtest too. (Chris) Signed-off-by: Imre Deak <imre.deak@intel.com>
-rw-r--r--tests/gem_exec_suspend.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/tests/gem_exec_suspend.c b/tests/gem_exec_suspend.c
index b953afb4..a5be365a 100644
--- a/tests/gem_exec_suspend.c
+++ b/tests/gem_exec_suspend.c
@@ -31,8 +31,10 @@
#include "igt_gt.h"
#define NOSLEEP 0
-#define SUSPEND 1
-#define HIBERNATE 2
+#define SUSPEND_DEVICES 1
+#define SUSPEND 2
+#define HIBERNATE_DEVICES 3
+#define HIBERNATE 4
#define mode(x) ((x) & 0xff)
#define LOCAL_I915_EXEC_BSD_SHIFT (13)
@@ -205,11 +207,21 @@ static void run_test(int fd, unsigned engine, unsigned flags)
case NOSLEEP:
break;
+ case SUSPEND_DEVICES:
+ igt_system_suspend_autoresume(SUSPEND_STATE_MEM,
+ SUSPEND_TEST_DEVICES);
+ break;
+
case SUSPEND:
igt_system_suspend_autoresume(SUSPEND_STATE_MEM,
SUSPEND_TEST_NONE);
break;
+ case HIBERNATE_DEVICES:
+ igt_system_suspend_autoresume(SUSPEND_STATE_DISK,
+ SUSPEND_TEST_DEVICES);
+ break;
+
case HIBERNATE:
igt_system_suspend_autoresume(SUSPEND_STATE_DISK,
SUSPEND_TEST_NONE);
@@ -248,8 +260,12 @@ igt_main
igt_subtest("basic")
run_test(fd, -1, NOSLEEP);
+ igt_subtest("basic-S3-devices")
+ run_test(fd, -1, SUSPEND_DEVICES);
igt_subtest("basic-S3")
run_test(fd, -1, SUSPEND);
+ igt_subtest("basic-S4-devices")
+ run_test(fd, -1, HIBERNATE_DEVICES);
igt_subtest("basic-S4")
run_test(fd, -1, HIBERNATE);