From: Rob Clark <robdclark@gmail.com>
To: igt-dev@lists.freedesktop.org
Cc: Rob Clark <robdclark@chromium.org>
Subject: [PATCH] tests/kms_plane_cursor: Skip unneeded overlay requirement
Date: Wed, 10 Jan 2024 13:07:09 -0800 [thread overview]
Message-ID: <20240110210709.219979-1-robdclark@gmail.com> (raw)
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
next reply other threads:[~2024-01-10 21:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-10 21:07 Rob Clark [this message]
2024-01-10 23:26 ` ✗ Fi.CI.BAT: failure for tests/kms_plane_cursor: Skip unneeded overlay requirement Patchwork
2024-01-11 0:07 ` ✓ CI.xeBAT: success " 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=20240110210709.219979-1-robdclark@gmail.com \
--to=robdclark@gmail.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=robdclark@chromium.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