[igt-dev] [PATCH i-g-t v5 13/13] igt: tests: chamelium: Add YUV formats tests

Maxime Ripard maxime.ripard at bootlin.com
Fri Jan 25 14:58:42 UTC 2019


The NV12, NV16, NV21, NV61, YUV420, YVU420, YUV422 and YVU422 are YUV
formats that are currently supported in IGT.

We'll want to test those formats in addition to the RGB formats, so
let's add some subtests. One thing worth noting is some hardware isn't
able to output a pixel-perfect image, so we do the same kind of
comparison than for VGA.

Reviewed-by: Paul Kocialkowski <paul.kocialkowski at bootlin.com>
Signed-off-by: Maxime Ripard <maxime.ripard at bootlin.com>
---
 tests/kms_chamelium.c | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/tests/kms_chamelium.c b/tests/kms_chamelium.c
index eaea9c18832a..64f87d3ae474 100644
--- a/tests/kms_chamelium.c
+++ b/tests/kms_chamelium.c
@@ -977,6 +977,38 @@ igt_main
 			test_display_one_mode(&data, port, DRM_FORMAT_XRGB1555,
 					      CHAMELIUM_CHECK_CRC, 1);
 
+		connector_subtest("hdmi-cmp-nv12", HDMIA)
+			test_display_one_mode(&data, port, DRM_FORMAT_NV12,
+					      CHAMELIUM_CHECK_ANALOG, 1);
+
+		connector_subtest("hdmi-cmp-nv16", HDMIA)
+			test_display_one_mode(&data, port, DRM_FORMAT_NV16,
+					      CHAMELIUM_CHECK_ANALOG, 1);
+
+		connector_subtest("hdmi-cmp-nv21", HDMIA)
+			test_display_one_mode(&data, port, DRM_FORMAT_NV21,
+					      CHAMELIUM_CHECK_ANALOG, 1);
+
+		connector_subtest("hdmi-cmp-nv61", HDMIA)
+			test_display_one_mode(&data, port, DRM_FORMAT_NV61,
+					      CHAMELIUM_CHECK_ANALOG, 1);
+
+		connector_subtest("hdmi-cmp-yu12", HDMIA)
+			test_display_one_mode(&data, port, DRM_FORMAT_YUV420,
+					      CHAMELIUM_CHECK_ANALOG, 1);
+
+		connector_subtest("hdmi-cmp-yu16", HDMIA)
+			test_display_one_mode(&data, port, DRM_FORMAT_YUV422,
+					      CHAMELIUM_CHECK_ANALOG, 1);
+
+		connector_subtest("hdmi-cmp-yv12", HDMIA)
+			test_display_one_mode(&data, port, DRM_FORMAT_YVU420,
+					      CHAMELIUM_CHECK_ANALOG, 1);
+
+		connector_subtest("hdmi-cmp-yv16", HDMIA)
+			test_display_one_mode(&data, port, DRM_FORMAT_YVU422,
+					      CHAMELIUM_CHECK_ANALOG, 1);
+
 		connector_subtest("hdmi-frame-dump", HDMIA)
 			test_display_frame_dump(&data, port);
 	}
-- 
2.20.1



More information about the igt-dev mailing list