[igt-dev] [PATCH] tests/kms_plane: Check plane format before using

Mark Yacoub markyacoub at chromium.org
Thu Aug 4 18:15:50 UTC 2022


On Thu, Aug 4, 2022 at 2:04 PM Alex Hung <alex.hung at amd.com> wrote:
>
> If a plane does not support the format or modifier, skip testing
> for this plane.
>
> Signed-off-by: Alex Hung <alex.hung at amd.com>
Reviewed-by: Mark Yacoub <markyacoub at chromium.org>
> ---
>  tests/kms_plane.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/tests/kms_plane.c b/tests/kms_plane.c
> index c885a813..3cf3cfd3 100644
> --- a/tests/kms_plane.c
> +++ b/tests/kms_plane.c
> @@ -224,6 +224,9 @@ test_plane_position_with_output(data_t *data,
>         create_fb_for_mode(data, mode, &green, &rect, 1, &primary_fb);
>         igt_plane_set_fb(primary, &primary_fb);
>
> +       if (!igt_plane_has_format_mod(sprite, DRM_FORMAT_XRGB8888, DRM_FORMAT_MOD_LINEAR))
> +               return;
> +
looks reasonable to me.
>         igt_create_color_fb(data->drm_fd,
>                             64, 64, /* width, height */
>                             DRM_FORMAT_XRGB8888,
> --
> 2.37.1
>


More information about the igt-dev mailing list