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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx
---
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();
 }

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux