[Intel-gfx] [PATCH i-g-t] lib: don't hang on blt on snb

Daniel Vetter daniel.vetter at ffwll.ch
Fri Aug 4 16:07:22 UTC 2017


We now have full (or a lot at least) igt running in beta CI, and snb
blt hangs are really unhappy:

- drv_hangman at error-state-capture-blt and gem_exec_capture at capture-blt
  reliably result in insta-machine death when we try to reset the gpu,
  both on the CI snb and the one I have here.

- Other testcases also randomly (and sometimes rather rarely) die on
  snb.

We can't use the endless batch because that results in a reset failure
and wedged gpu, so also not really better.

Until this works reliably it's best to take the tests out of igt,
since machine death has massive impact in creating noise due to the
per-build sharding changing the victimized tests all the time.

Most tests use igt_hang, but gem_exec_capture needed to be switched to
the igt_require_hang_ring helper.

Cc: Tomi Sarvela <tomi.p.sarvela at intel.com>
Cc: Chris Wilson <chris at chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter at intel.com>
---
 lib/igt_gt.c             | 4 ++++
 tests/gem_exec_capture.c | 3 ++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/lib/igt_gt.c b/lib/igt_gt.c
index 6f7daa5ef982..99d709fe4086 100644
--- a/lib/igt_gt.c
+++ b/lib/igt_gt.c
@@ -118,6 +118,10 @@ void igt_require_hang_ring(int fd, int ring)
 	if (!igt_check_boolean_env_var("IGT_HANG", true))
 		igt_skip("hang injection disabled by user");
 
+	igt_require_f(ring != I915_EXEC_BLT ||
+		      intel_gen(intel_get_drm_devid(fd)) != 6,
+		      "blt hang can causes insta-death on snb.\n");
+
 	gem_require_ring(fd, ring);
 	gem_context_require_bannable(fd);
 	if (!igt_check_boolean_env_var("IGT_HANG_WITHOUT_RESET", false))
diff --git a/tests/gem_exec_capture.c b/tests/gem_exec_capture.c
index f8f43d2903a9..fb4a5e85f6b2 100644
--- a/tests/gem_exec_capture.c
+++ b/tests/gem_exec_capture.c
@@ -69,6 +69,8 @@ static void capture(int fd, int dir, unsigned ring)
 	uint32_t *batch;
 	int i;
 
+	igt_require_hang_ring(fd, ring);
+
 	memset(obj, 0, sizeof(obj));
 	obj[SCRATCH].handle = gem_create(fd, 4096);
 	obj[CAPTURE].handle = gem_create(fd, 4096);
@@ -166,7 +168,6 @@ igt_main
 			continue;
 
 		igt_subtest_f("capture-%s", e->name) {
-			gem_require_ring(fd, e->exec_id | e->flags);
 			capture(fd, dir, e->exec_id | e->flags);
 		}
 	}
-- 
2.5.5



More information about the Intel-gfx mailing list