[Intel-gfx] [PATCH igt 4/9] igt/gem_ctx_exec: Convert from stop-rings to a real GPU hang/reset

Chris Wilson chris at chris-wilson.co.uk
Sat Dec 12 12:02:50 PST 2015


Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
---
 tests/gem_ctx_exec.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/tests/gem_ctx_exec.c b/tests/gem_ctx_exec.c
index 179e991..0ec898a 100644
--- a/tests/gem_ctx_exec.c
+++ b/tests/gem_ctx_exec.c
@@ -188,6 +188,8 @@ igt_main
 	igt_subtest("reset-pin-leak") {
 		int i;
 
+		igt_require_hang_ring(fd, I915_EXEC_RENDER);
+
 		/*
 		 * Use an explicit context to isolate the test from
 		 * any major code changes related to the per-file
@@ -201,10 +203,10 @@ igt_main
 		 * the last context is leaked at every reset.
 		 */
 		for (i = 0; i < 20; i++) {
-                        igt_set_stop_rings(igt_to_stop_ring_flag(I915_EXEC_RENDER));
+			igt_hang_ring_t hang = igt_hang_ring(fd, I915_EXEC_RENDER);
 			igt_assert(exec(fd, handle, I915_EXEC_RENDER, 0) == 0);
 			igt_assert(exec(fd, handle, I915_EXEC_RENDER, ctx_id) == 0);
-			gem_sync(fd, handle);
+			igt_post_hang_ring(fd, hang);
 		}
 
 		gem_context_destroy(fd, ctx_id);
-- 
2.6.3



More information about the Intel-gfx mailing list