From: Damien Lespiau Subject: [PATCH i-g-t 12/43] kms_rotation_crc: Test the validity of the output first Date: Thu, 10 Jul 2014 19:00:13 +0100 Message-ID: <1405015244-11370-13-git-send-email-damien.lespiau@intel.com> References: <1405015244-11370-1-git-send-email-damien.lespiau@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga03.intel.com (mga03.intel.com [143.182.124.21]) by gabe.freedesktop.org (Postfix) with ESMTP id B470D6E3BD for ; Thu, 10 Jul 2014 11:01:23 -0700 (PDT) In-Reply-To: <1405015244-11370-1-git-send-email-damien.lespiau@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org So we don't need code to unwind what we just did. Signed-off-by: Damien Lespiau --- 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