[igt-dev] [PATCH i-g-t 2/2] tests/kms_rotation_crc: Check requested format/mod combo is supported

Juha-Pekka Heikkila juhapekka.heikkila at gmail.com
Mon Oct 7 19:52:34 UTC 2019


Avoid failing test for wrong reasons.

Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila at gmail.com>
---
 tests/kms_rotation_crc.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c
index 668c173..fe63311 100644
--- a/tests/kms_rotation_crc.c
+++ b/tests/kms_rotation_crc.c
@@ -251,6 +251,12 @@ static void prepare_fbs(data_t *data, igt_output_t *output,
 		igt_swap(w, h);
 	}
 
+	/* 
+	 * Just try here if requested tiling format is generally available,
+	 * if one format fail it will skip entire subtest.
+	 */
+	igt_require(igt_display_has_format_mod(display, pixel_format, tiling));
+
 	/*
 	 * Create a reference software rotated flip framebuffer.
 	 */
-- 
2.7.4



More information about the igt-dev mailing list