From cc28478682e35ced5cf45e9ef2ea8edd1d7cccb9 Mon Sep 17 00:00:00 2001 From: Paul Kocialkowski Date: Thu, 10 Jan 2019 15:50:20 +0100 Subject: 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 Reviewed-by: Lyude Paul Reviewed-by: Maxime Ripard --- tests/kms_chamelium.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'tests/kms_chamelium.c') 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); } -- cgit v1.2.3