[Intel-gfx] [PATCH i-g-t 12/43] kms_rotation_crc: Test the validity of the output first

Damien Lespiau damien.lespiau at intel.com
Thu Jul 10 20:00:13 CEST 2014


So we don't need code to unwind what we just did.

Signed-off-by: Damien Lespiau <damien.lespiau at intel.com>
---
 tests/kms_rotation_crc.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c
index f5a569a..1f2953d 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 */
-- 
1.8.3.1




More information about the Intel-gfx mailing list