kms_cursor_crc: Fix the test on platforms where the pipe->port mapping has restrictions

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ä <ville.syrjala@linux.intel.com>
This commit is contained in:
Ville Syrjälä 2014-04-25 15:27:57 +03:00
parent 5b90833941
commit a461515b33

View File

@ -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)