Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] tests/kms_atomic_transition:reduce execution time
@ 2020-12-11  6:07 nidhi1.gupta
  2020-12-11  6:34 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_atomic_transition:reduce execution time (rev4) Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: nidhi1.gupta @ 2020-12-11  6:07 UTC (permalink / raw)
  To: igt-dev; +Cc: Nidhi Gupta, juha-pekka.heikkila, uma.shanker

From: Nidhi Gupta <nidhi1.gupta@intel.com>

v1: All the subtests are using for_each_pipe_with_valid_output
function which will execute on all the possible
combination of pipe and output to reduce the execution
time replaced the function with
for_each_pipe_with_single_output this will loop over all
the pipes but at most once.

v2: kms_atomic_transition test is taking minimum of
69.5s time to execute on CI. To reduce the execution
time this patch will add the change which will run
the test on 1 HDR plane, 1 SDR UV plane, 1 SDR Y plane
and skip the rest of the planes.

v3: combined v1 and v2 in one patch.

Signed-off-by: Nidhi Gupta <nidhi1.gupta@intel.com>
---
 tests/kms_atomic_transition.c | 55 +++++++++++++++++++++++++++--------
 1 file changed, 43 insertions(+), 12 deletions(-)

diff --git a/tests/kms_atomic_transition.c b/tests/kms_atomic_transition.c
index a71bbe10..9e7c8e8a 100644
--- a/tests/kms_atomic_transition.c
+++ b/tests/kms_atomic_transition.c
@@ -205,6 +205,33 @@ static void set_sprite_wh(igt_display_t *display, enum pipe pipe,
 #define is_atomic_check_plane_size_errno(errno) \
 		(errno == -EINVAL)
 
+static bool skip_plane(igt_display_t *display, igt_plane_t *plane)
+{
+	int index = plane->index;
+
+	if (!is_i915_device(display->drm_fd))
+		return false;
+
+	if (plane->type == DRM_PLANE_TYPE_CURSOR)
+		return false;
+
+	if (plane->type == DRM_PLANE_TYPE_PRIMARY)
+		return false;
+
+	if (intel_gen(intel_get_drm_devid(display->drm_fd)) < 11)
+		return false;
+
+	/*
+	 * Test 1 HDR plane, 1 SDR UV plane, 1 SDR Y plane.
+	 *
+	 * Kernel registers planes in the hardware Z order:
+	 * 0,1,2 HDR planes
+	 * 3,4 SDR UV planes
+	 * 5,6 SDR Y planes
+	 */
+	return index != 0 && index != 3 && index != 5;
+}
+
 static void setup_parms(igt_display_t *display, enum pipe pipe,
 			const drmModeModeInfo *mode,
 			struct igt_fb *primary_fb,
@@ -230,8 +257,12 @@ static void setup_parms(igt_display_t *display, enum pipe pipe,
 		cursor_height = mode->vdisplay;
 
 	for_each_plane_on_pipe(display, pipe, plane) {
+
 		int i = plane->index;
 
+		if (skip_plane(display, plane))
+			continue;
+
 		if (plane->type == DRM_PLANE_TYPE_PRIMARY) {
 			parms[i].fb = primary_fb;
 			parms[i].width = mode->hdisplay;
@@ -932,46 +963,46 @@ igt_main
 	}
 
 	igt_subtest("plane-primary-toggle-with-vblank-wait")
-		for_each_pipe_with_valid_output(&display, pipe, output)
+		for_each_pipe_with_single_output(&display, pipe, output)
 			run_primary_test(&display, pipe, output);
 
 	igt_subtest_with_dynamic("plane-all-transition") {
-		for_each_pipe_with_valid_output(&display, pipe, output) {
+		for_each_pipe_with_single_output(&display, pipe, output) {
 			igt_dynamic_f("%s-pipe-%s", igt_output_name(output), kmstest_pipe_name(pipe))
 				run_transition_test(&display, pipe, output, TRANSITION_PLANES, false, false);
 		}
 	}
 
 	igt_subtest_with_dynamic("plane-all-transition-fencing") {
-		for_each_pipe_with_valid_output(&display, pipe, output) {
+		for_each_pipe_with_single_output(&display, pipe, output) {
 			igt_dynamic_f("%s-pipe-%s", igt_output_name(output), kmstest_pipe_name(pipe))
 				run_transition_test(&display, pipe, output, TRANSITION_PLANES, false, true);
 		}
 	}
 
 	igt_subtest_with_dynamic("plane-all-transition-nonblocking") {
-		for_each_pipe_with_valid_output(&display, pipe, output) {
+		for_each_pipe_with_single_output(&display, pipe, output) {
 			igt_dynamic_f("%s-pipe-%s", igt_output_name(output), kmstest_pipe_name(pipe))
 				run_transition_test(&display, pipe, output, TRANSITION_PLANES, true, false);
 		}
 	}
 
 	igt_subtest_with_dynamic("plane-all-transition-nonblocking-fencing") {
-		for_each_pipe_with_valid_output(&display, pipe, output) {
+		for_each_pipe_with_single_output(&display, pipe, output) {
 			igt_dynamic_f("%s-pipe-%s", igt_output_name(output), kmstest_pipe_name(pipe))
 				run_transition_test(&display, pipe, output, TRANSITION_PLANES, true, true);
 		}
 	}
 
 	igt_subtest_with_dynamic("plane-use-after-nonblocking-unbind") {
-		for_each_pipe_with_valid_output(&display, pipe, output) {
+		for_each_pipe_with_single_output(&display, pipe, output) {
 			igt_dynamic_f("%s-pipe-%s", igt_output_name(output), kmstest_pipe_name(pipe))
 				run_transition_test(&display, pipe, output, TRANSITION_AFTER_FREE, true, false);
 		}
 	}
 
 	igt_subtest_with_dynamic("plane-use-after-nonblocking-unbind-fencing") {
-		for_each_pipe_with_valid_output(&display, pipe, output) {
+		for_each_pipe_with_single_output(&display, pipe, output) {
 			igt_dynamic_f("%s-pipe-%s", igt_output_name(output), kmstest_pipe_name(pipe))
 				run_transition_test(&display, pipe, output, TRANSITION_AFTER_FREE, true, true);
 		}
@@ -983,7 +1014,7 @@ igt_main
 	 * panels with long power cycle delays.
 	 */
 	igt_subtest_with_dynamic("plane-all-modeset-transition")
-		for_each_pipe_with_valid_output(&display, pipe, output) {
+		for_each_pipe_with_single_output(&display, pipe, output) {
 			if (output_is_internal_panel(output))
 				continue;
 
@@ -992,7 +1023,7 @@ igt_main
 		}
 
 	igt_subtest_with_dynamic("plane-all-modeset-transition-fencing")
-		for_each_pipe_with_valid_output(&display, pipe, output) {
+		for_each_pipe_with_single_output(&display, pipe, output) {
 			if (output_is_internal_panel(output))
 				continue;
 
@@ -1001,7 +1032,7 @@ igt_main
 		}
 
 	igt_subtest_with_dynamic("plane-all-modeset-transition-internal-panels") {
-		for_each_pipe_with_valid_output(&display, pipe, output) {
+		for_each_pipe_with_single_output(&display, pipe, output) {
 			if (!output_is_internal_panel(output))
 				continue;
 
@@ -1011,7 +1042,7 @@ igt_main
 	}
 
 	igt_subtest_with_dynamic("plane-all-modeset-transition-fencing-internal-panels") {
-		for_each_pipe_with_valid_output(&display, pipe, output) {
+		for_each_pipe_with_single_output(&display, pipe, output) {
 			if (!output_is_internal_panel(output))
 				continue;
 
@@ -1021,7 +1052,7 @@ igt_main
 	}
 
 	igt_subtest("plane-toggle-modeset-transition")
-		for_each_pipe_with_valid_output(&display, pipe, output)
+		for_each_pipe_with_single_output(&display, pipe, output)
 			run_transition_test(&display, pipe, output, TRANSITION_MODESET_DISABLE, false, false);
 
 	for (i = 1; i <= IGT_MAX_PIPES; i++) {
-- 
2.26.2

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 7+ messages in thread
* [igt-dev] [PATCH i-g-t] tests/kms_atomic_transition:reduce execution time
@ 2020-12-09 13:36 Nidhi Gupta
  2020-12-09 13:36 ` Nidhi Gupta
  0 siblings, 1 reply; 7+ messages in thread
From: Nidhi Gupta @ 2020-12-09 13:36 UTC (permalink / raw)
  To: igt-dev; +Cc: Nidhi Gupta, juha-pekka.heikkila

kms_atomic_transition test is taking minimum of
69.5s time to execute on CI. To reduce the execution
time this patch will add the change which will run
the test on 1 HDR plane, 1 SDR UV plane, 1 SDR Y plane
and skip the rest of the planes.

Signed-off-by: Nidhi Gupta <nidhi1.gupta@intel.com>
---
 tests/kms_atomic_transition.c | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/tests/kms_atomic_transition.c b/tests/kms_atomic_transition.c
index a71bbe10..856378e6 100644
--- a/tests/kms_atomic_transition.c
+++ b/tests/kms_atomic_transition.c
@@ -205,6 +205,33 @@ static void set_sprite_wh(igt_display_t *display, enum pipe pipe,
 #define is_atomic_check_plane_size_errno(errno) \
 		(errno == -EINVAL)
 
+static bool skip_plane(igt_display_t *display, igt_plane_t *plane)
+{
+	int index = plane->index;
+
+	if (!is_i915_device(display->drm_fd))
+		return false;
+
+	if (plane->type == DRM_PLANE_TYPE_CURSOR)
+		return false;
+
+	if (plane->type == DRM_PLANE_TYPE_PRIMARY)
+		return false;
+
+	if (intel_gen(intel_get_drm_devid(display->drm_fd)) < 11)
+		return false;
+
+	/*
+	 * Test 1 HDR plane, 1 SDR UV plane, 1 SDR Y plane.
+	 *
+	 * Kernel registers planes in the hardware Z order:
+	 * 0,1,2 HDR planes
+	 * 3,4 SDR UV planes
+	 * 5,6 SDR Y planes
+	 */
+	return index != 0 && index != 3 && index != 5;
+}
+
 static void setup_parms(igt_display_t *display, enum pipe pipe,
 			const drmModeModeInfo *mode,
 			struct igt_fb *primary_fb,
@@ -230,8 +257,12 @@ static void setup_parms(igt_display_t *display, enum pipe pipe,
 		cursor_height = mode->vdisplay;
 
 	for_each_plane_on_pipe(display, pipe, plane) {
+
 		int i = plane->index;
 
+		if (skip_plane(display, plane))
+			continue;
+
 		if (plane->type == DRM_PLANE_TYPE_PRIMARY) {
 			parms[i].fb = primary_fb;
 			parms[i].width = mode->hdisplay;
-- 
2.26.2

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

end of thread, other threads:[~2020-12-17  3:28 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-11  6:07 [igt-dev] [PATCH i-g-t] tests/kms_atomic_transition:reduce execution time nidhi1.gupta
2020-12-11  6:34 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_atomic_transition:reduce execution time (rev4) Patchwork
2020-12-11  7:31 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2020-12-14 11:59 ` [igt-dev] [PATCH i-g-t] tests/kms_atomic_transition:reduce execution time Shankar, Uma
2020-12-17  3:28   ` Gupta, Nidhi1
  -- strict thread matches above, loose matches on Subject: below --
2020-12-09 13:36 Nidhi Gupta
2020-12-09 13:36 ` Nidhi Gupta

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox