summaryrefslogtreecommitdiff
path: root/tests/kms_rotation_crc.c
diff options
context:
space:
mode:
authorDamien Lespiau <damien.lespiau@intel.com>2014-07-08 12:10:44 +0100
committerDamien Lespiau <damien.lespiau@intel.com>2014-07-11 15:12:22 +0100
commit143984a4f14ab22b5495411e006644caa7d6cb7a (patch)
tree669b130e3f2ab79f3176c6ae96aabf5e975584af /tests/kms_rotation_crc.c
parent9cf7e8d35fb331626a03992f68e9856eafe3997d (diff)
kms_rotation_crc: Test the validity of the output first
So we don't need code to unwind what we just did. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Diffstat (limited to 'tests/kms_rotation_crc.c')
-rw-r--r--tests/kms_rotation_crc.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c
index f5a569a3..1f2953d2 100644
--- a/tests/kms_rotation_crc.c
+++ b/tests/kms_rotation_crc.c
@@ -78,6 +78,9 @@ static bool prepare_crtc(data_t *data)
igt_output_set_pipe(output, data->pipe);
igt_display_commit(display);
+ if (!data->output->valid)
+ return false;
+
/* create the pipe_crc object for this pipe */
if (data->pipe_crc)
igt_pipe_crc_free(data->pipe_crc);
@@ -90,13 +93,6 @@ static bool prepare_crtc(data_t *data)
return false;
}
-
- if (!data->output->valid) {
- igt_output_set_pipe(output, PIPE_ANY);
- igt_display_commit(display);
- return false;
- }
-
switch (data->type) {
case DRM_PLANE_TYPE_OVERLAY: /* Sprite */