[igt-dev] [PATCH] tests/kms_plane: Check plane format before using
Alex Hung
alex.hung at amd.com
Thu Aug 4 18:03:57 UTC 2022
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>
---
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;
+
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