intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH i-g-t] kms_atomic_transition: Split out modeset tests on internal panels
@ 2017-11-02 13:38 Imre Deak
  2017-11-02 15:56 ` ✓ Fi.CI.BAT: success for " Patchwork
                   ` (6 more replies)
  0 siblings, 7 replies; 12+ messages in thread
From: Imre Deak @ 2017-11-02 13:38 UTC (permalink / raw)
  To: intel-gfx

Doing modeset on internal panels may have a considerable overhead due to
the panel specific power sequencing delays. To avoid long test runtimes
in the CI fast-feedback test split out the testing of internal panels
from the plane modeset subtests. Create fast and slow versions of these
new subtests. In the fast one only combinations with all enabled, all
planes disabled or a single plane enable are tested. In the slow one all
plane combinations are tested.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103334
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
---
 tests/kms_atomic_transition.c | 64 ++++++++++++++++++++++++++++++++++++++++---
 1 file changed, 60 insertions(+), 4 deletions(-)

diff --git a/tests/kms_atomic_transition.c b/tests/kms_atomic_transition.c
index 4c295125..c27e48e1 100644
--- a/tests/kms_atomic_transition.c
+++ b/tests/kms_atomic_transition.c
@@ -189,6 +189,7 @@ enum transition_type {
 	TRANSITION_PLANES,
 	TRANSITION_AFTER_FREE,
 	TRANSITION_MODESET,
+	TRANSITION_MODESET_PLANES_FAST,
 	TRANSITION_MODESET_DISABLE,
 };
 
@@ -528,6 +529,10 @@ run_transition_test(igt_display_t *display, enum pipe pipe, igt_output_t *output
 	}
 
 	for (i = 0; i < iter_max; i++) {
+		if (type == TRANSITION_MODESET_PLANES_FAST &&
+		    hweight32(i) != 1 && hweight32(i) != pipe_obj->n_planes)
+			continue;
+
 		igt_output_set_pipe(output, pipe);
 
 		wm_setup_plane(display, pipe, i, parms, fencing);
@@ -547,16 +552,20 @@ run_transition_test(igt_display_t *display, enum pipe pipe, igt_output_t *output
 
 			/* i -> i+1 will be done when i increases, can be skipped here */
 			for (j = iter_max - 1; j > i + 1; j--) {
+				if (type == TRANSITION_MODESET_PLANES_FAST &&
+				    hweight32(j) != 1 && hweight32(j) != pipe_obj->n_planes)
+					continue;
+
 				wm_setup_plane(display, pipe, j, parms, fencing);
 
-				if (type == TRANSITION_MODESET)
+				if (type >= TRANSITION_MODESET)
 					igt_output_override_mode(output, &override_mode);
 
 				atomic_commit(display, pipe, flags, (void *)(unsigned long) j, fencing);
 				wait_for_transition(display, pipe, nonblocking, fencing);
 
 				wm_setup_plane(display, pipe, i, parms, fencing);
-				if (type == TRANSITION_MODESET)
+				if (type >= TRANSITION_MODESET)
 					igt_output_override_mode(output, NULL);
 
 				atomic_commit(display, pipe, flags, (void *)(unsigned long) i, fencing);
@@ -864,6 +873,19 @@ static void run_modeset_transition(igt_display_t *display, int requested_outputs
 	run_modeset_tests(display, requested_outputs, nonblocking, fencing);
 }
 
+static bool output_is_internal_panel(igt_output_t *output)
+{
+	switch (output->config.connector->connector_type) {
+	case DRM_MODE_CONNECTOR_LVDS:
+	case DRM_MODE_CONNECTOR_eDP:
+	case DRM_MODE_CONNECTOR_DSI:
+	case DRM_MODE_CONNECTOR_DPI:
+		return true;
+	default:
+		return false;
+	}
+}
+
 igt_main
 {
 	igt_display_t display;
@@ -914,12 +936,46 @@ igt_main
 			run_transition_test(&display, pipe, output, TRANSITION_AFTER_FREE, true, true);
 
 	igt_subtest("plane-all-modeset-transition")
-		for_each_pipe_with_valid_output(&display, pipe, output)
+		for_each_pipe_with_valid_output(&display, pipe, output) {
+			if (output_is_internal_panel(output))
+				continue;
 			run_transition_test(&display, pipe, output, TRANSITION_MODESET, false, false);
+		}
 
 	igt_subtest("plane-all-modeset-transition-fencing")
-		for_each_pipe_with_valid_output(&display, pipe, output)
+		for_each_pipe_with_valid_output(&display, pipe, output) {
+			if (output_is_internal_panel(output))
+				continue;
 			run_transition_test(&display, pipe, output, TRANSITION_MODESET, false, true);
+		}
+
+	igt_subtest("plane-all-modeset-transition-internal-panels-fast")
+		for_each_pipe_with_valid_output(&display, pipe, output) {
+			if (!output_is_internal_panel(output))
+				continue;
+			run_transition_test(&display, pipe, output, TRANSITION_MODESET_PLANES_FAST, false, false);
+		}
+
+	igt_subtest("plane-all-modeset-transition-fencing-internal-panels-fast")
+		for_each_pipe_with_valid_output(&display, pipe, output) {
+			if (!output_is_internal_panel(output))
+				continue;
+			run_transition_test(&display, pipe, output, TRANSITION_MODESET_PLANES_FAST, false, true);
+		}
+
+	igt_subtest("plane-all-modeset-transition-internal-panels-slow")
+		for_each_pipe_with_valid_output(&display, pipe, output) {
+			if (!output_is_internal_panel(output))
+				continue;
+			run_transition_test(&display, pipe, output, TRANSITION_MODESET, false, false);
+		}
+
+	igt_subtest("plane-all-modeset-transition-fencing-internal-panels-slow")
+		for_each_pipe_with_valid_output(&display, pipe, output) {
+			if (!output_is_internal_panel(output))
+				continue;
+			run_transition_test(&display, pipe, output, TRANSITION_MODESET, false, true);
+		}
 
 	igt_subtest("plane-toggle-modeset-transition")
 		for_each_pipe_with_valid_output(&display, pipe, output)
-- 
2.11.0

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

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2017-11-09 12:39 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-02 13:38 [PATCH i-g-t] kms_atomic_transition: Split out modeset tests on internal panels Imre Deak
2017-11-02 15:56 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-11-02 17:09 ` ✗ Fi.CI.IGT: warning " Patchwork
2017-11-02 17:12 ` [PATCH i-g-t] " Chris Wilson
2017-11-03  9:21   ` Imre Deak
2017-11-03 13:27 ` [PATCH i-g-t v2] " Imre Deak
2017-11-08 19:33   ` [PATCH i-g-t v3] " Imre Deak
2017-11-09  8:03     ` Maarten Lankhorst
2017-11-09 12:39       ` Imre Deak
2017-11-03 15:34 ` ✓ Fi.CI.BAT: success for kms_atomic_transition: Split out modeset tests on internal panels (rev2) Patchwork
2017-11-03 18:12 ` ✗ Fi.CI.IGT: failure " Patchwork
2017-11-08 20:53 ` ✗ Fi.CI.BAT: failure for kms_atomic_transition: Split out modeset tests on internal panels (rev3) Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).