Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tests/kms_plane_cursor: Skip unneeded overlay requirement
@ 2024-01-10 21:07 Rob Clark
  2024-01-10 23:26 ` ✗ Fi.CI.BAT: failure for " Patchwork
  2024-01-11  0:07 ` ✓ CI.xeBAT: success " Patchwork
  0 siblings, 2 replies; 3+ messages in thread
From: Rob Clark @ 2024-01-10 21:07 UTC (permalink / raw)
  To: igt-dev; +Cc: Rob Clark

From: Rob Clark <robdclark@chromium.org>

Tests that aren't using an overlay plan should not require one.

Some qcom devices only have primary and cursor planes (but those planes
are not restricted to a single CRTC).  Requiring an overlay plane even
for subtests that didn't need one, was causing all the tests to SKIP.

Signed-off-by: Rob Clark <robdclark@chromium.org>
---
 tests/kms_plane_cursor.c | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/tests/kms_plane_cursor.c b/tests/kms_plane_cursor.c
index dd33d8129626..5b3cdc06901b 100644
--- a/tests/kms_plane_cursor.c
+++ b/tests/kms_plane_cursor.c
@@ -91,7 +91,8 @@ typedef struct data {
 } data_t;
 
 /* Common test setup. */
-static void test_init(data_t *data, enum pipe pipe_id, igt_output_t *output)
+static void test_init(data_t *data, enum pipe pipe_id, igt_output_t *output,
+		      unsigned int flags)
 {
 	data->pipe_id = pipe_id;
 	data->pipe = &data->display.pipes[data->pipe_id];
@@ -100,7 +101,8 @@ static void test_init(data_t *data, enum pipe pipe_id, igt_output_t *output)
 	data->mode = igt_output_get_mode(data->output);
 
 	data->primary = igt_pipe_get_plane_type(data->pipe, DRM_PLANE_TYPE_PRIMARY);
-	data->overlay = igt_pipe_get_plane_type(data->pipe, DRM_PLANE_TYPE_OVERLAY);
+	if (flags & TEST_OVERLAY)
+		data->overlay = igt_pipe_get_plane_type(data->pipe, DRM_PLANE_TYPE_OVERLAY);
 	data->cursor = igt_pipe_get_plane_type(data->pipe, DRM_PLANE_TYPE_CURSOR);
 
 	igt_info("Using (pipe %s + %s) to run the subtest.\n",
@@ -123,7 +125,8 @@ static void test_fini(data_t *data)
 	igt_pipe_crc_free(data->pipe_crc);
 	igt_display_reset(&data->display);
 	igt_plane_set_fb(data->primary, NULL);
-	igt_plane_set_fb(data->overlay, NULL);
+	if (data->overlay)
+		igt_plane_set_fb(data->overlay, NULL);
 	igt_plane_set_fb(data->cursor, NULL);
 	igt_display_commit2(&data->display, COMMIT_ATOMIC);
 }
@@ -167,7 +170,8 @@ static void test_cursor_pos(data_t *data, int x, int y, unsigned int flags)
 	igt_paint_color(cr, x, y, cw, ch, 1.0, 0.0, 1.0);
 	igt_put_cairo_ctx(cr);
 
-	igt_plane_set_fb(data->overlay, NULL);
+	if (flags & TEST_OVERLAY)
+		igt_plane_set_fb(data->overlay, NULL);
 	igt_plane_set_fb(data->cursor, NULL);
 	igt_display_commit_atomic(&data->display, 0, NULL);
 
@@ -333,7 +337,7 @@ igt_main
 				if (!intel_pipe_output_combo_valid(display))
 					continue;
 
-				test_init(&data, pipe, output);
+				test_init(&data, pipe, output, tests[i].flags);
 
 				for (j = 0; j < ARRAY_SIZE(cursor_sizes); j++) {
 					int size = cursor_sizes[j];
-- 
2.43.0

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

end of thread, other threads:[~2024-01-11  0:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-10 21:07 [PATCH] tests/kms_plane_cursor: Skip unneeded overlay requirement Rob Clark
2024-01-10 23:26 ` ✗ Fi.CI.BAT: failure for " Patchwork
2024-01-11  0:07 ` ✓ CI.xeBAT: success " Patchwork

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