[PATCH i-g-t] tests/kms_plane_cursor: Skip unneeded overlay requirement
Jessica Zhang
quic_jesszhan at quicinc.com
Thu Feb 22 01:14:18 UTC 2024
On 2/15/2024 2:19 PM, Rob Clark wrote:
> From: Rob Clark <robdclark at 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 at chromium.org>
Hi Rob,
Reviewed-by: Jessica Zhang <quic_jesszhan at quicinc.com>
Thanks,
Jessica Zhang
> ---
> 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
>
More information about the igt-dev
mailing list