diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2016-03-04 21:06:40 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2016-03-08 09:57:33 +0000 |
commit | 1985459b095cb463d434b6be91a464998ff538d9 (patch) | |
tree | 20411967b019af0c58e0d6cd2ef10b9694ba2c24 /tests/gem_ringfill.c | |
parent | d8842d385cf4cc7928b478d45274320620bfdcc7 (diff) |
igt/gem_ringfill: Check full rings across suspend/hibernate
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tests/gem_ringfill.c')
-rw-r--r-- | tests/gem_ringfill.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/gem_ringfill.c b/tests/gem_ringfill.c index ff0a6939..a3f515ea 100644 --- a/tests/gem_ringfill.c +++ b/tests/gem_ringfill.c @@ -76,6 +76,8 @@ static void fill_ring(int fd, struct drm_i915_gem_execbuffer2 *execbuf) #define CHILD 0x8 #define FORKED 0x8 #define BOMB 0x10 +#define SUSPEND 0x20 +#define HIBERNATE 0x40 static void run_test(int fd, unsigned ring, unsigned flags) { @@ -92,6 +94,9 @@ static void run_test(int fd, unsigned ring, unsigned flags) igt_skip_on_f(gen == 6 && (ring & ~(3<<13)) == I915_EXEC_BSD, "MI_STORE_DATA broken on gen6 bsd\n"); + if (flags & (SUSPEND | HIBERNATE)) + run_test(fd, ring, 0); + gem_quiescent_gpu(fd); memset(&execbuf, 0, sizeof(execbuf)); @@ -169,6 +174,12 @@ static void run_test(int fd, unsigned ring, unsigned flags) igt_fork(child, nchild) fill_ring(fd, &execbuf); + if (flags & SUSPEND) + igt_system_suspend_autoresume(); + + if (flags & HIBERNATE) + igt_system_hibernate_autoresume(); + igt_waitchildren(); } else fill_ring(fd, &execbuf); @@ -183,6 +194,11 @@ static void run_test(int fd, unsigned ring, unsigned flags) gem_close(fd, obj[1].handle); gem_close(fd, obj[0].handle); + + gem_quiescent_gpu(fd); + + if (flags & (SUSPEND | HIBERNATE)) + run_test(fd, ring, 0); } igt_main @@ -197,6 +213,8 @@ igt_main { "-child", CHILD }, { "-forked", FORKED }, { "-bomb", BOMB | INTERRUPTIBLE }, + { "-S3", BOMB | SUSPEND }, + { "-S4", BOMB | HIBERNATE }, { NULL, 0 } }, *mode; const struct intel_execution_engine *e; |