Since $debugfs/i915_wedged restores a wedged gpu by using a normal gpu hang we need to be careful to not run into the "hanging too fast check": - don't restore the ban period, but instead keep it at 0. - make sure we idle the gpu fully before hanging it again (wait subtest missted that). With this gem_eio works now reliable even when I don't run the subtests individually. Of course it's a bit fishy that the default ctx gets blamed for essentially doing nothing, but until that's figured out in upstream it's better to make the test work for now. Cc: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> Signed-off-by: Daniel Vetter <daniel.vetter@xxxxxxxxx> --- tests/gem_eio.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/gem_eio.c b/tests/gem_eio.c index 8345d1a7a429..6c07d9175b95 100644 --- a/tests/gem_eio.c +++ b/tests/gem_eio.c @@ -84,13 +84,17 @@ static void trigger_reset(int fd) static void wedge_gpu(int fd) { + igt_hang_ring_t hang; + /* First idle the GPU then disable GPU resets before injecting a hang */ gem_quiescent_gpu(fd); igt_require(i915_reset_control(false)); igt_debug("Wedging GPU by injecting hang\n"); - igt_post_hang_ring(fd, igt_hang_ring(fd, I915_EXEC_DEFAULT)); + hang = igt_hang_ring(fd, I915_EXEC_DEFAULT); + hang.ban = 0; + igt_post_hang_ring(fd, hang); igt_assert(i915_reset_control(true)); } @@ -161,10 +165,14 @@ static void test_wait(int fd) { igt_hang_ring_t hang; + /* First idle the GPU then disable GPU resets before injecting a hang */ + gem_quiescent_gpu(fd); + igt_require(i915_reset_control(false)); hang = igt_hang_ring(fd, I915_EXEC_DEFAULT); igt_assert_eq(__gem_wait(fd, hang.handle, -1), 0); + hang.ban = 0; igt_post_hang_ring(fd, hang); igt_assert(i915_reset_control(true)); -- 2.1.0 _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/intel-gfx