[i-g-t,v6,10/10] igt: tests: chamelium: Add YUV formats tests

Submitted by Maxime Ripard on Feb. 8, 2019, 1:19 p.m.

Details

Message ID 20190208131901.1400-11-maxime.ripard@bootlin.com
State New
Series "igt: chamelium: Test YUV buffers using the Chamelium"
Headers show

Commit Message

Maxime Ripard Feb. 8, 2019, 1:19 p.m.
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: Lyude Paul <lyude@redhat.com>
Reviewed-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
---
 tests/kms_chamelium.c | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

Patch hide | download patch | download mbox

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);
 	}