[Intel-gfx] [PATCH i-g-t] drv_hangman: Add test for modeset during gpu reset.

Maarten Lankhorst maarten.lankhorst at linux.intel.com
Tue Apr 5 11:00:44 UTC 2016


This adds a test that forces a modeset during gpu reset, which has broken
a few times in the past during the atomic rework.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com
---
diff --git a/tests/drv_hangman.c b/tests/drv_hangman.c
index f4cdadb80e02..8a17d7acff1b 100644
--- a/tests/drv_hangman.c
+++ b/tests/drv_hangman.c
@@ -324,6 +324,22 @@ static void hangcheck_unterminated(void)
 	close(fd);
 }
 
+static void reset_with_forced_modeset(void)
+{
+	igt_hang_ring_t hang;
+	int fd = drm_open_driver(DRIVER_INTEL);
+
+	igt_require_hang_ring(fd, I915_EXEC_DEFAULT);
+
+	igt_set_module_param_int("force_reset_modeset_test", 1);
+
+	hang = igt_hang_ring(fd, I915_EXEC_DEFAULT);
+	igt_post_hang_ring(fd, hang);
+
+	igt_set_module_param_int("force_reset_modeset_test", 0);
+	close(fd);
+}
+
 igt_main
 {
 	const struct intel_execution_engine *e;
@@ -353,4 +369,7 @@ igt_main
 
 	igt_subtest("hangcheck-unterminated")
 		hangcheck_unterminated();
+
+	igt_subtest("reset-with-forced-modeset")
+		reset_with_forced_modeset();
 }



More information about the Intel-gfx mailing list