[i-g-t,v2,13/13] igt: tests: chamelium: Add YUV formats tests

Submitted by Maxime Ripard on Jan. 8, 2019, 3:19 p.m.

Details

Message ID 20190108152001.5367-13-maxime.ripard@bootlin.com
State Accepted
Commit f62577c85c9ef0539d468d6fad105b706a15139c
Headers show
Series "igt: chamelium: Test YUV buffers using the Chamelium" ( rev: 4 3 ) in IGT

Not browsing as part of any series.

Commit Message

Maxime Ripard Jan. 8, 2019, 3: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.

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

Comments

On Tue, 2019-01-08 at 16:19 +0100, Maxime Ripard wrote:
> 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.
>
> Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>

After numerous rounds of testing, I found that the analog test has a
strong tendency to return false positives on digital interfaces.

I'll send out a more reliable testing mechanism soon and will switch
these tests over to using it.

Since it's not available yet and the analog tests are the next best
thing for fuzzy comparison:

Reviewed-by: Paul Kocialkowski <paul.kocialkowski@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);
>  	}