summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPaul Kocialkowski <paul.kocialkowski@bootlin.com>2019-01-10 15:50:20 +0100
committerPaul Kocialkowski <paul.kocialkowski@bootlin.com>2019-02-26 09:45:54 +0100
commitcc28478682e35ced5cf45e9ef2ea8edd1d7cccb9 (patch)
tree2cf9e9415f98fbaea123162e5fae9accbb8ba23c /tests
parentc6f3707d3c5c7f61283ef643106db8e5f7e309e9 (diff)
lib/igt_chamelium: Generalize the frame match helper with check type
In prevision of adding support for another type of frame matching, rename chamelium_assert_analog_frame_match_or_dump to drop the analog part and feed it the check type. This way, the bulk of the helper can apply to other frame matching types. This requires moving the chamelium_check enum from the test to the common chamelium header. 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.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/tests/kms_chamelium.c b/tests/kms_chamelium.c
index fe58aea9..6bf5358a 100644
--- a/tests/kms_chamelium.c
+++ b/tests/kms_chamelium.c
@@ -527,11 +527,6 @@ static int chamelium_get_pattern_fb(data_t *data, size_t width, size_t height,
return fb_id;
}
-enum chamelium_check {
- CHAMELIUM_CHECK_ANALOG,
- CHAMELIUM_CHECK_CRC,
-};
-
static void do_test_display(data_t *data, struct chamelium_port *port,
igt_output_t *output, drmModeModeInfo *mode,
uint32_t fourcc, enum chamelium_check check,
@@ -590,8 +585,8 @@ static void do_test_display(data_t *data, struct chamelium_port *port,
0, 0);
chamelium_crop_analog_frame(dump, mode->hdisplay,
mode->vdisplay);
- chamelium_assert_analog_frame_match_or_dump(data->chamelium,
- port, dump, &fb);
+ chamelium_assert_frame_match_or_dump(data->chamelium, port,
+ dump, &fb, check);
chamelium_destroy_frame_dump(dump);
}