[Intel-gfx] [PATCH i-g-t] tests/kms_busy: Only test agains one engine

Daniel Vetter daniel.vetter at ffwll.ch
Thu Aug 3 12:05:29 UTC 2017


Back when we used cs flips it made sense to go through different
engines, since a buffer busy on an engine that we couldnt' use for
cs flipping ended up in different paths.

But with atomic we use a worker for all flips, and going through the
combinatorial growth of engines just wastes precious machine time.
More so the more modern the platform is.

Of course gem tests should still do some diagonal testing across all
engines, but the kms side can afford to be a bit cheaper.

Cc: Chris Wilson <chris at chris-wilson.co.uk>
Cc: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
Cc: Arkadiusz Hiler <arkadiusz.hiler at intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter at intel.com>
---
 tests/kms_busy.c | 111 +++++++++++++++++++++++++++----------------------------
 1 file changed, 55 insertions(+), 56 deletions(-)

diff --git a/tests/kms_busy.c b/tests/kms_busy.c
index af7335db0d11..436d16e6acb9 100644
--- a/tests/kms_busy.c
+++ b/tests/kms_busy.c
@@ -309,7 +309,8 @@ static void test_pageflip_modeset_hang(igt_display_t *dpy,
 igt_main
 {
 	igt_display_t display = { .drm_fd = -1, .n_pipes = IGT_MAX_PIPES };
-	const struct intel_execution_engine *e;
+	/* we only test on render */
+	const struct intel_execution_engine *e = intel_execution_engines[1];
 
 	igt_skip_on_simulation();
 
@@ -333,82 +334,80 @@ igt_main
 			igt_skip_on(n >= display.n_pipes);
 		}
 
-		for (e = intel_execution_engines; e->name; e++) {
-			igt_subtest_f("%sflip-%s-%s",
-				      e->exec_id == 0 ? "basic-" : "",
-				      e->name, kmstest_pipe_name(n)) {
+		igt_subtest_f("%sflip-%s-%s",
+			      e->exec_id == 0 ? "basic-" : "",
+			      e->name, kmstest_pipe_name(n)) {
+			igt_require(gem_has_ring(display.drm_fd,
+						e->exec_id | e->flags));
+
+			test_flip(&display, e->exec_id | e->flags, n, false);
+		}
+		igt_subtest_f("%smodeset-%s-%s",
+			      e->exec_id == 0 ? "basic-" : "",
+			      e->name, kmstest_pipe_name(n)) {
+			igt_require(gem_has_ring(display.drm_fd,
+						e->exec_id | e->flags));
+
+			test_flip(&display, e->exec_id | e->flags, n, true);
+		}
+
+		igt_subtest_group {
+			igt_hang_t hang;
+
+			igt_fixture {
 				igt_require(gem_has_ring(display.drm_fd,
 							e->exec_id | e->flags));
 
-				test_flip(&display, e->exec_id | e->flags, n, false);
+				hang = igt_allow_hang(display.drm_fd, 0, 0);
 			}
-			igt_subtest_f("%smodeset-%s-%s",
-				      e->exec_id == 0 ? "basic-" : "",
+
+			igt_subtest_f("extended-pageflip-modeset-hang-oldfb-%s-%s",
 				      e->name, kmstest_pipe_name(n)) {
 				igt_require(gem_has_ring(display.drm_fd,
 							e->exec_id | e->flags));
 
-				test_flip(&display, e->exec_id | e->flags, n, true);
+				test_pageflip_modeset_hang(&display, e->exec_id | e->flags, n);
 			}
 
-			igt_subtest_group {
-				igt_hang_t hang;
-
-				igt_fixture {
-					igt_require(gem_has_ring(display.drm_fd,
-								e->exec_id | e->flags));
+			igt_fixture
+				igt_require(display.is_atomic);
 
-					hang = igt_allow_hang(display.drm_fd, 0, 0);
-				}
+			igt_subtest_f("extended-pageflip-hang-oldfb-%s-%s",
+				      e->name, kmstest_pipe_name(n))
+				test_hang(&display, e->exec_id | e->flags, n, false, false);
 
-				igt_subtest_f("extended-pageflip-modeset-hang-oldfb-%s-%s",
-					      e->name, kmstest_pipe_name(n)) {
-					igt_require(gem_has_ring(display.drm_fd,
-								e->exec_id | e->flags));
+			igt_subtest_f("extended-pageflip-hang-newfb-%s-%s",
+				      e->name, kmstest_pipe_name(n))
+				test_hang(&display, e->exec_id | e->flags, n, false, true);
 
-					test_pageflip_modeset_hang(&display, e->exec_id | e->flags, n);
-				}
+			igt_subtest_f("extended-modeset-hang-oldfb-%s-%s",
+				      e->name, kmstest_pipe_name(n))
+				test_hang(&display, e->exec_id | e->flags, n, true, false);
 
-				igt_fixture
-					igt_require(display.is_atomic);
+			igt_subtest_f("extended-modeset-hang-newfb-%s-%s",
+				      e->name, kmstest_pipe_name(n))
+				test_hang(&display, e->exec_id | e->flags, n, true, true);
 
-				igt_subtest_f("extended-pageflip-hang-oldfb-%s-%s",
-					      e->name, kmstest_pipe_name(n))
-					test_hang(&display, e->exec_id | e->flags, n, false, false);
-
-				igt_subtest_f("extended-pageflip-hang-newfb-%s-%s",
-					      e->name, kmstest_pipe_name(n))
-					test_hang(&display, e->exec_id | e->flags, n, false, true);
-
-				igt_subtest_f("extended-modeset-hang-oldfb-%s-%s",
-					      e->name, kmstest_pipe_name(n))
-					test_hang(&display, e->exec_id | e->flags, n, true, false);
-
-				igt_subtest_f("extended-modeset-hang-newfb-%s-%s",
-					      e->name, kmstest_pipe_name(n))
-					test_hang(&display, e->exec_id | e->flags, n, true, true);
-
-				igt_subtest_f("extended-modeset-hang-oldfb-with-reset-%s-%s",
-					      e->name, kmstest_pipe_name(n)) {
-					igt_set_module_param_int("force_reset_modeset_test", 1);
+			igt_subtest_f("extended-modeset-hang-oldfb-with-reset-%s-%s",
+				      e->name, kmstest_pipe_name(n)) {
+				igt_set_module_param_int("force_reset_modeset_test", 1);
 
-					test_hang(&display, e->exec_id | e->flags, n, true, false);
+				test_hang(&display, e->exec_id | e->flags, n, true, false);
 
-					igt_set_module_param_int("force_reset_modeset_test", 0);
-				}
+				igt_set_module_param_int("force_reset_modeset_test", 0);
+			}
 
-				igt_subtest_f("extended-modeset-hang-newfb-with-reset-%s-%s",
-					      e->name, kmstest_pipe_name(n)) {
-					igt_set_module_param_int("force_reset_modeset_test", 1);
+			igt_subtest_f("extended-modeset-hang-newfb-with-reset-%s-%s",
+				      e->name, kmstest_pipe_name(n)) {
+				igt_set_module_param_int("force_reset_modeset_test", 1);
 
-					test_hang(&display, e->exec_id | e->flags, n, true, true);
+				test_hang(&display, e->exec_id | e->flags, n, true, true);
 
-					igt_set_module_param_int("force_reset_modeset_test", 0);
-				}
+				igt_set_module_param_int("force_reset_modeset_test", 0);
+			}
 
-				igt_fixture {
-					igt_disallow_hang(display.drm_fd, hang);
-				}
+			igt_fixture {
+				igt_disallow_hang(display.drm_fd, hang);
 			}
 		}
 	}
-- 
2.13.3



More information about the Intel-gfx mailing list