From a461515b334ebb7782ee15e31f943e7a6753d845 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ville=20Syrj=C3=A4l=C3=A4?= Date: Fri, 25 Apr 2014 15:27:57 +0300 Subject: [PATCH] kms_cursor_crc: Fix the test on platforms where the pipe->port mapping has restrictions MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit On gen2 for instance the LVDS port can only be fed from pipe B. Check whether the combinations is valid before trying to run the test. Also clean up the state back to PIPE_ANY properly so that following tests can again go through all the combinations. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75131 Signed-off-by: Ville Syrjälä --- tests/kms_cursor_crc.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/kms_cursor_crc.c b/tests/kms_cursor_crc.c index aa92197..8b4b93e 100644 --- a/tests/kms_cursor_crc.c +++ b/tests/kms_cursor_crc.c @@ -230,6 +230,13 @@ static bool prepare_crtc(test_data_t *test_data, igt_output_t *output, /* select the pipe we want to use */ igt_output_set_pipe(output, test_data->pipe); + igt_display_commit(display); + + if (!output->valid) { + igt_output_set_pipe(output, PIPE_ANY); + igt_display_commit(display); + return false; + } /* create and set the primary plane fb */ mode = igt_output_get_mode(output); @@ -279,6 +286,7 @@ static bool prepare_crtc(test_data_t *test_data, igt_output_t *output, static void cleanup_crtc(test_data_t *test_data, igt_output_t *output) { data_t *data = test_data->data; + igt_display_t *display = &data->display; igt_plane_t *primary; igt_pipe_crc_free(test_data->pipe_crc); @@ -290,6 +298,7 @@ static void cleanup_crtc(test_data_t *test_data, igt_output_t *output) igt_plane_set_fb(primary, NULL); igt_output_set_pipe(output, PIPE_ANY); + igt_display_commit(display); } static void run_test(data_t *data, void (*testfunc)(test_data_t *), int cursor_w, int cursor_h) -- 2.7.4