From patchwork Fri Feb 26 11:21:15 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Feceoru, Gabriel" X-Patchwork-Id: 8435731 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 D94E59F314 for ; Fri, 26 Feb 2016 11:14:55 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1CA342035E for ; Fri, 26 Feb 2016 11:14:55 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 4B75F20274 for ; Fri, 26 Feb 2016 11:14:54 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E1A486EA9F; Fri, 26 Feb 2016 11:14:53 +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 2F3C96EA9F for ; Fri, 26 Feb 2016 11:14:53 +0000 (UTC) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP; 26 Feb 2016 03:14:52 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,498,1449561600"; d="scan'208";a="895334204" Received: from gfeceoru-ms-7924.rb.intel.com ([10.237.104.199]) by orsmga001.jf.intel.com with ESMTP; 26 Feb 2016 03:14:52 -0800 From: Gabriel Feceoru To: intel-gfx@lists.freedesktop.org Date: Fri, 26 Feb 2016 13:21:15 +0200 Message-Id: <1456485675-23869-1-git-send-email-gabriel.feceoru@intel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1455885293-10964-3-git-send-email-gabriel.feceoru@intel.com> References: <1455885293-10964-3-git-send-email-gabriel.feceoru@intel.com> Subject: [Intel-gfx] [PATCH i-g-t v2 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. v2: Apply review comments (Marius) Signed-off-by: Gabriel Feceoru --- lib/igt_kms.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/igt_kms.c b/lib/igt_kms.c index 90c8da7..6163a6d 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;