intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Imre Deak <imre.deak@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH i-g-t] kms_atomic_transition: Split out modeset tests on internal panels
Date: Thu,  2 Nov 2017 15:38:09 +0200	[thread overview]
Message-ID: <20171102133809.16427-1-imre.deak@intel.com> (raw)

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

             reply	other threads:[~2017-11-02 13:38 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-02 13:38 Imre Deak [this message]
2017-11-02 15:56 ` ✓ Fi.CI.BAT: success for kms_atomic_transition: Split out modeset tests on internal panels 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171102133809.16427-1-imre.deak@intel.com \
    --to=imre.deak@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).