summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2017-09-29 10:03:37 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2017-10-05 13:06:17 +0100
commit0a323605814c3584cdaf7e13ef7a3fe3909e4e83 (patch)
treee52e63f55a7e14ca701c9fe998255588d42f31de
parent0af43d5e5932aaa3b65df17de723d4770677144e (diff)
igt/gem_workarounds: Add hibernation coverage
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
-rw-r--r--tests/gem_workarounds.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/tests/gem_workarounds.c b/tests/gem_workarounds.c
index 41b58d5b..7b999612 100644
--- a/tests/gem_workarounds.c
+++ b/tests/gem_workarounds.c
@@ -37,6 +37,7 @@ static int gen;
enum operation {
GPU_RESET,
SUSPEND_RESUME,
+ HIBERNATE_RESUME,
SIMPLE_READ,
};
@@ -64,12 +65,6 @@ static struct write_only_list {
static struct intel_wa_reg *wa_regs;
static int num_wa_regs;
-static void test_suspend_resume(void)
-{
- igt_info("Suspending the device ...\n");
- igt_system_suspend_autoresume(SUSPEND_STATE_MEM, SUSPEND_TEST_NONE);
-}
-
static bool write_only(const uint32_t addr)
{
int i;
@@ -198,7 +193,13 @@ static void check_workarounds(int fd, enum operation op, unsigned int flags)
break;
case SUSPEND_RESUME:
- test_suspend_resume();
+ igt_system_suspend_autoresume(SUSPEND_STATE_MEM,
+ SUSPEND_TEST_NONE);
+ break;
+
+ case HIBERNATE_RESUME:
+ igt_system_suspend_autoresume(SUSPEND_STATE_DISK,
+ SUSPEND_TEST_NONE);
break;
case SIMPLE_READ:
@@ -226,6 +227,7 @@ igt_main
{ "basic-read", SIMPLE_READ },
{ "reset", GPU_RESET },
{ "suspend-resume", SUSPEND_RESUME },
+ { "hibernate-resume", HIBERNATE_RESUME },
{ }
}, *op;
const struct {