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

Paul Kocialkowski
2019-01-10T10:54:06Z

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);
> }
--
Paul Kocialkowski, Bootlin
Embedded Linux and kernel engineering