summaryrefslogtreecommitdiff
path: root/tests/kms_cursor_crc.c
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2014-04-25 15:27:57 +0300
committerVille Syrjälä <ville.syrjala@linux.intel.com>2014-04-25 16:18:20 +0300
commita461515b334ebb7782ee15e31f943e7a6753d845 (patch)
treef4507ee779cd1520711a188622f72bb00aaf2178 /tests/kms_cursor_crc.c
parent5b90833941f17d175204041c86ad84c6662e55df (diff)
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>
Diffstat (limited to 'tests/kms_cursor_crc.c')
-rw-r--r--tests/kms_cursor_crc.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/kms_cursor_crc.c b/tests/kms_cursor_crc.c
index aa92197b..8b4b93e8 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)