Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t v2 1/2] tests/kms_rotation_crc: move plane rotation requirements into helper
@ 2024-11-04 19:44 Juha-Pekka Heikkila
  2024-11-04 19:44 ` [PATCH i-g-t v2 2/2] tests/kms_rotation_crc: Intel display version 20 onwards doesn't do hflip with tile4 Juha-Pekka Heikkila
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: Juha-Pekka Heikkila @ 2024-11-04 19:44 UTC (permalink / raw)
  To: igt-dev; +Cc: Juha-Pekka Heikkila

move plane rotation requirement block into helper function.

Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
---
 tests/kms_rotation_crc.c | 23 +++++++++++++++++------
 1 file changed, 17 insertions(+), 6 deletions(-)

diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c
index 9888ac6ac..e8b6e4ff2 100644
--- a/tests/kms_rotation_crc.c
+++ b/tests/kms_rotation_crc.c
@@ -564,6 +564,22 @@ static bool test_format(data_t *data,
 	return true;
 }
 
+static bool plane_rotation_requirements(data_t *data, igt_plane_t *plane)
+{
+	if (!igt_plane_has_prop(plane, IGT_PLANE_ROTATION))
+		return false;
+
+	if (!igt_plane_has_rotation(plane, data->rotation))
+		return false;
+
+	/* CHV can't rotate and reflect simultaneously */
+	if (!(!is_intel_device(data->gfx_fd) || !IS_CHERRYVIEW(data->devid) ||
+	    data->rotation != (IGT_ROTATION_180 | IGT_REFLECT_X)))
+		return false;
+
+	return true;
+}
+
 static void test_plane_rotation(data_t *data, int plane_type, bool test_bad_format)
 {
 	igt_display_t *display = &data->display;
@@ -632,12 +648,7 @@ static void test_plane_rotation(data_t *data, int plane_type, bool test_bad_form
 		igt_output_set_pipe(output, pipe);
 
 		plane = igt_output_get_plane_type(output, plane_type);
-		igt_require(igt_plane_has_prop(plane, IGT_PLANE_ROTATION));
-		igt_require(igt_plane_has_rotation(plane, data->rotation));
-		/* CHV can't rotate and reflect simultaneously */
-		igt_require(!is_intel_device(data->gfx_fd) ||
-			    !IS_CHERRYVIEW(data->devid) ||
-			    data->rotation != (IGT_ROTATION_180 | IGT_REFLECT_X));
+		igt_require(plane_rotation_requirements(data, plane));
 
 		prepare_crtc(data, output, pipe, plane, true);
 
-- 
2.45.2


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

end of thread, other threads:[~2024-11-06 10:54 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-04 19:44 [PATCH i-g-t v2 1/2] tests/kms_rotation_crc: move plane rotation requirements into helper Juha-Pekka Heikkila
2024-11-04 19:44 ` [PATCH i-g-t v2 2/2] tests/kms_rotation_crc: Intel display version 20 onwards doesn't do hflip with tile4 Juha-Pekka Heikkila
2024-11-06 10:54   ` Karthik B S
2024-11-04 21:07 ` ✓ Fi.CI.BAT: success for series starting with [i-g-t,v2,1/2] tests/kms_rotation_crc: move plane rotation requirements into helper Patchwork
2024-11-04 21:42 ` ✓ CI.xeBAT: " Patchwork
2024-11-05 13:03 ` ✗ Fi.CI.IGT: failure " Patchwork
2024-11-05 16:51 ` ✗ CI.xeFULL: " Patchwork
2024-11-06 10:53 ` [PATCH i-g-t v2 1/2] " Karthik B S

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