[PATCH v5 19/37] tests/kms_colorop: Skip if writeback does not support fourcc
Harry Wentland
harry.wentland at amd.com
Mon Aug 19 20:58:05 UTC 2024
Signed-off-by: Harry Wentland <harry.wentland at amd.com>
---
tests/kms_colorop.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/tests/kms_colorop.c b/tests/kms_colorop.c
index 56c232ef33d1..4c1751c3be1c 100644
--- a/tests/kms_colorop.c
+++ b/tests/kms_colorop.c
@@ -69,6 +69,10 @@ static bool check_writeback_config(igt_display_t *display, igt_output_t *output,
uint32_t writeback_format = fourcc_out;
uint64_t modifier = DRM_FORMAT_MOD_LINEAR;
int width, height, ret;
+ drmModePropertyBlobRes *wb_formats_blob;
+ int i;
+ __u32 *format;
+ bool found_format = false;
igt_output_override_mode(output, &override_mode);
@@ -83,6 +87,17 @@ static bool check_writeback_config(igt_display_t *display, igt_output_t *output,
fourcc_in, modifier, &input_fb);
igt_assert(ret >= 0);
+ /* check writeback formats */
+ wb_formats_blob = get_writeback_formats_blob(output);
+ format = wb_formats_blob->data;
+
+ for (i = 0; i < wb_formats_blob->length / 4; i++)
+ if (fourcc_out == format[i])
+ found_format = true;
+
+ igt_skip_on_f(!found_format,
+ "writeback doesn't support fourcc format %x\n", fourcc_out);
+
ret = igt_create_fb(display->drm_fd, width, height,
writeback_format, modifier, &output_fb);
igt_assert(ret >= 0);
--
2.46.0
More information about the igt-dev
mailing list