[i-g-t,v3,20/21] chamelium: Move the YUV tests over to the checkerboard checking method

Submitted by Paul Kocialkowski on Jan. 11, 2019, 9:05 a.m.

Details

Message ID 20190111090532.19235-21-paul.kocialkowski@bootlin.com
State Accepted
Commit 6f2ab673c46b55911e372093faf89bfb884caff2
Headers show
Series "Chamelium VC4 plane fuzzy testing, with SAND and T-tiled mode" ( rev: 1 ) in IGT

Not browsing as part of any series.

Commit Message

Paul Kocialkowski Jan. 11, 2019, 9:05 a.m.
Now that the checkerboard frame checking method is available through
the frame match helper, make use of it in YUV tests to increase the
reliability of the results.

The analog test tends to provide false positives, which are properly
detected by the checkerboard method in most instances.

Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
---
 tests/kms_chamelium.c | 26 +++++++++++++++-----------
 1 file changed, 15 insertions(+), 11 deletions(-)

Patch hide | download patch | download mbox

diff --git a/tests/kms_chamelium.c b/tests/kms_chamelium.c
index fa6fee7d9e3e..2779d74f55b6 100644
--- a/tests/kms_chamelium.c
+++ b/tests/kms_chamelium.c
@@ -575,15 +575,19 @@  static void do_test_display(data_t *data, struct chamelium_port *port,
 
 		free(expected_crc);
 		free(crc);
-	} else if (check == CHAMELIUM_CHECK_ANALOG) {
+	} else if (check == CHAMELIUM_CHECK_ANALOG ||
+		   check == CHAMELIUM_CHECK_CHECKERBOARD) {
 		struct chamelium_frame_dump *dump;
 
 		igt_assert(count == 1);
 
 		dump = chamelium_port_dump_pixels(data->chamelium, port, 0, 0,
 						  0, 0);
-		chamelium_crop_analog_frame(dump, mode->hdisplay,
-					    mode->vdisplay);
+
+		if (check == CHAMELIUM_CHECK_ANALOG)
+			chamelium_crop_analog_frame(dump, mode->hdisplay,
+						    mode->vdisplay);
+
 		chamelium_assert_frame_match_or_dump(data->chamelium, port,
 						     dump, &fb, check);
 		chamelium_destroy_frame_dump(dump);
@@ -974,35 +978,35 @@  igt_main
 
 		connector_subtest("hdmi-cmp-nv12", HDMIA)
 			test_display_one_mode(&data, port, DRM_FORMAT_NV12,
-					      CHAMELIUM_CHECK_ANALOG, 1);
+					      CHAMELIUM_CHECK_CHECKERBOARD, 1);
 
 		connector_subtest("hdmi-cmp-nv16", HDMIA)
 			test_display_one_mode(&data, port, DRM_FORMAT_NV16,
-					      CHAMELIUM_CHECK_ANALOG, 1);
+					      CHAMELIUM_CHECK_CHECKERBOARD, 1);
 
 		connector_subtest("hdmi-cmp-nv21", HDMIA)
 			test_display_one_mode(&data, port, DRM_FORMAT_NV21,
-					      CHAMELIUM_CHECK_ANALOG, 1);
+					      CHAMELIUM_CHECK_CHECKERBOARD, 1);
 
 		connector_subtest("hdmi-cmp-nv61", HDMIA)
 			test_display_one_mode(&data, port, DRM_FORMAT_NV61,
-					      CHAMELIUM_CHECK_ANALOG, 1);
+					      CHAMELIUM_CHECK_CHECKERBOARD, 1);
 
 		connector_subtest("hdmi-cmp-yu12", HDMIA)
 			test_display_one_mode(&data, port, DRM_FORMAT_YUV420,
-					      CHAMELIUM_CHECK_ANALOG, 1);
+					      CHAMELIUM_CHECK_CHECKERBOARD, 1);
 
 		connector_subtest("hdmi-cmp-yu16", HDMIA)
 			test_display_one_mode(&data, port, DRM_FORMAT_YUV422,
-					      CHAMELIUM_CHECK_ANALOG, 1);
+					      CHAMELIUM_CHECK_CHECKERBOARD, 1);
 
 		connector_subtest("hdmi-cmp-yv12", HDMIA)
 			test_display_one_mode(&data, port, DRM_FORMAT_YVU420,
-					      CHAMELIUM_CHECK_ANALOG, 1);
+					      CHAMELIUM_CHECK_CHECKERBOARD, 1);
 
 		connector_subtest("hdmi-cmp-yv16", HDMIA)
 			test_display_one_mode(&data, port, DRM_FORMAT_YVU422,
-					      CHAMELIUM_CHECK_ANALOG, 1);
+					      CHAMELIUM_CHECK_CHECKERBOARD, 1);
 
 		connector_subtest("hdmi-frame-dump", HDMIA)
 			test_display_frame_dump(&data, port);

Comments

On Fri, Jan 11, 2019 at 10:05:31AM +0100, Paul Kocialkowski wrote:
> Now that the checkerboard frame checking method is available through
> the frame match helper, make use of it in YUV tests to increase the
> reliability of the results.
> 
> The analog test tends to provide false positives, which are properly
> detected by the checkerboard method in most instances.
> 
> Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>

Reviewed-by: Maxime Ripard <maxime.ripard@bootlin.com>

Maxime
Reviewed-by: Lyude Paul <lyude@redhat.com>

On Fri, 2019-01-11 at 10:05 +0100, Paul Kocialkowski wrote:
> Now that the checkerboard frame checking method is available through
> the frame match helper, make use of it in YUV tests to increase the
> reliability of the results.
> 
> The analog test tends to provide false positives, which are properly
> detected by the checkerboard method in most instances.
> 
> Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
> ---
>  tests/kms_chamelium.c | 26 +++++++++++++++-----------
>  1 file changed, 15 insertions(+), 11 deletions(-)
> 
> diff --git a/tests/kms_chamelium.c b/tests/kms_chamelium.c
> index fa6fee7d9e3e..2779d74f55b6 100644
> --- a/tests/kms_chamelium.c
> +++ b/tests/kms_chamelium.c
> @@ -575,15 +575,19 @@ static void do_test_display(data_t *data, struct
> chamelium_port *port,
>  
>  		free(expected_crc);
>  		free(crc);
> -	} else if (check == CHAMELIUM_CHECK_ANALOG) {
> +	} else if (check == CHAMELIUM_CHECK_ANALOG ||
> +		   check == CHAMELIUM_CHECK_CHECKERBOARD) {
>  		struct chamelium_frame_dump *dump;
>  
>  		igt_assert(count == 1);
>  
>  		dump = chamelium_port_dump_pixels(data->chamelium, port, 0, 0,
>  						  0, 0);
> -		chamelium_crop_analog_frame(dump, mode->hdisplay,
> -					    mode->vdisplay);
> +
> +		if (check == CHAMELIUM_CHECK_ANALOG)
> +			chamelium_crop_analog_frame(dump, mode->hdisplay,
> +						    mode->vdisplay);
> +
>  		chamelium_assert_frame_match_or_dump(data->chamelium, port,
>  						     dump, &fb, check);
>  		chamelium_destroy_frame_dump(dump);
> @@ -974,35 +978,35 @@ igt_main
>  
>  		connector_subtest("hdmi-cmp-nv12", HDMIA)
>  			test_display_one_mode(&data, port, DRM_FORMAT_NV12,
> -					      CHAMELIUM_CHECK_ANALOG, 1);
> +					      CHAMELIUM_CHECK_CHECKERBOARD,
> 1);
>  
>  		connector_subtest("hdmi-cmp-nv16", HDMIA)
>  			test_display_one_mode(&data, port, DRM_FORMAT_NV16,
> -					      CHAMELIUM_CHECK_ANALOG, 1);
> +					      CHAMELIUM_CHECK_CHECKERBOARD,
> 1);
>  
>  		connector_subtest("hdmi-cmp-nv21", HDMIA)
>  			test_display_one_mode(&data, port, DRM_FORMAT_NV21,
> -					      CHAMELIUM_CHECK_ANALOG, 1);
> +					      CHAMELIUM_CHECK_CHECKERBOARD,
> 1);
>  
>  		connector_subtest("hdmi-cmp-nv61", HDMIA)
>  			test_display_one_mode(&data, port, DRM_FORMAT_NV61,
> -					      CHAMELIUM_CHECK_ANALOG, 1);
> +					      CHAMELIUM_CHECK_CHECKERBOARD,
> 1);
>  
>  		connector_subtest("hdmi-cmp-yu12", HDMIA)
>  			test_display_one_mode(&data, port, DRM_FORMAT_YUV420,
> -					      CHAMELIUM_CHECK_ANALOG, 1);
> +					      CHAMELIUM_CHECK_CHECKERBOARD,
> 1);
>  
>  		connector_subtest("hdmi-cmp-yu16", HDMIA)
>  			test_display_one_mode(&data, port, DRM_FORMAT_YUV422,
> -					      CHAMELIUM_CHECK_ANALOG, 1);
> +					      CHAMELIUM_CHECK_CHECKERBOARD,
> 1);
>  
>  		connector_subtest("hdmi-cmp-yv12", HDMIA)
>  			test_display_one_mode(&data, port, DRM_FORMAT_YVU420,
> -					      CHAMELIUM_CHECK_ANALOG, 1);
> +					      CHAMELIUM_CHECK_CHECKERBOARD,
> 1);
>  
>  		connector_subtest("hdmi-cmp-yv16", HDMIA)
>  			test_display_one_mode(&data, port, DRM_FORMAT_YVU422,
> -					      CHAMELIUM_CHECK_ANALOG, 1);
> +					      CHAMELIUM_CHECK_CHECKERBOARD,
> 1);
>  
>  		connector_subtest("hdmi-frame-dump", HDMIA)
>  			test_display_frame_dump(&data, port);