[Intel-gfx] [PATCH] tests/gem_eio: Resilience against "hanging too fast"
Daniel Vetter
daniel.vetter at ffwll.ch
Wed Nov 25 08:19:24 PST 2015
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.
Cc: Chris Wilson <chris at chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter at intel.com>
---
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 ad67332eae59..f6e41db63a7d 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), -EIO);
+ hang.ban = 0;
igt_post_hang_ring(fd, hang);
igt_assert(i915_reset_control(true));
--
2.1.0
More information about the Intel-gfx
mailing list