summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPaul Kocialkowski <paul.kocialkowski@bootlin.com>2019-01-10 16:19:09 +0100
committerPaul Kocialkowski <paul.kocialkowski@bootlin.com>2019-02-26 09:45:54 +0100
commit6f2ab673c46b55911e372093faf89bfb884caff2 (patch)
treed249bb086469d5bb0fc184efb54de2dcfe8a1fc6 /tests
parent757471599422469a1d12eec82ee038c4a748fc0f (diff)
chamelium: Move the YUV tests over to the checkerboard checking method
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: Lyude Paul <lyude@redhat.com> Reviewed-by: Maxime Ripard <maxime.ripard@bootlin.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/kms_chamelium.c26
1 files changed, 15 insertions, 11 deletions
diff --git a/tests/kms_chamelium.c b/tests/kms_chamelium.c
index 6bf5358a..f332592b 100644
--- a/tests/kms_chamelium.c
+++ b/tests/kms_chamelium.c
@@ -576,15 +576,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);
@@ -975,35 +979,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);