From patchwork Fri Feb 19 12:34:52 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Feceoru, Gabriel" X-Patchwork-Id: 8360451 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 4367E9F38B for ; Fri, 19 Feb 2016 12:28:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 67D8620453 for ; Fri, 19 Feb 2016 12:28:20 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 7A8E320451 for ; Fri, 19 Feb 2016 12:28:19 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C15EE6EF20; Fri, 19 Feb 2016 12:28:18 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTP id 46F2E6EF20 for ; Fri, 19 Feb 2016 12:28:17 +0000 (UTC) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga102.jf.intel.com with ESMTP; 19 Feb 2016 04:28:17 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,470,1449561600"; d="scan'208";a="50844223" Received: from gfeceoru-ms-7924.rb.intel.com ([10.237.104.199]) by fmsmga004.fm.intel.com with ESMTP; 19 Feb 2016 04:28:17 -0800 From: Gabriel Feceoru To: intel-gfx@lists.freedesktop.org Date: Fri, 19 Feb 2016 14:34:52 +0200 Message-Id: <1455885293-10964-3-git-send-email-gabriel.feceoru@intel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1455885293-10964-1-git-send-email-gabriel.feceoru@intel.com> References: <1455885293-10964-1-git-send-email-gabriel.feceoru@intel.com> Subject: [Intel-gfx] [PATCH i-g-t 2/3] lib/igt_kms: Add fail exit branch in do_display_commit() X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Cherryview PIPE_C can only be connected to PORT_D (bspec). The driver properly reports the crtc_mask for the encoder, however the mismatch between pipe and port is not reported back to the test. Add support for detecting this case so the test can be skipped. Signed-off-by: Gabriel Feceoru --- lib/igt_kms.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/igt_kms.c b/lib/igt_kms.c index 90c8da7..b18a317 100644 --- a/lib/igt_kms.c +++ b/lib/igt_kms.c @@ -1669,6 +1669,7 @@ static int do_display_commit(igt_display_t *display, bool fail_on_error) { int i, ret; + int valid_outs = 0; LOG_INDENT(display, "commit"); @@ -1680,12 +1681,16 @@ static int do_display_commit(igt_display_t *display, if (!output->valid) continue; + valid_outs++; ret = igt_output_commit(output, s, fail_on_error); CHECK_RETURN(ret, fail_on_error); } LOG_UNINDENT(display); + if (valid_outs == 0) + return -1; + igt_debug_wait_for_keypress("modeset"); return 0; @@ -1712,9 +1717,7 @@ static int do_display_commit(igt_display_t *display, int igt_display_commit2(igt_display_t *display, enum igt_commit_style s) { - do_display_commit(display, s, true); - - return 0; + return do_display_commit(display, s, true); } /**