From patchwork Mon Jun 13 14:51:06 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: jim.bride@linux.intel.com X-Patchwork-Id: 9173337 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id EC43F60573 for ; Mon, 13 Jun 2016 14:51:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DE5C81FFC9 for ; Mon, 13 Jun 2016 14:51:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D293A262AE; Mon, 13 Jun 2016 14:51:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9C8E51FFC9 for ; Mon, 13 Jun 2016 14:51:26 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id AFF916E626; Mon, 13 Jun 2016 14:51:25 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by gabe.freedesktop.org (Postfix) with ESMTP id 320236E624 for ; Mon, 13 Jun 2016 14:51:24 +0000 (UTC) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP; 13 Jun 2016 07:51:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,466,1459839600"; d="scan'208";a="827065695" Received: from shiv.jf.intel.com ([10.7.198.83]) by orsmga003.jf.intel.com with ESMTP; 13 Jun 2016 07:51:23 -0700 From: Jim Bride To: intel-gfx@lists.freedesktop.org Date: Mon, 13 Jun 2016 07:51:06 -0700 Message-Id: <1465829466-13735-1-git-send-email-jim.bride@linux.intel.com> X-Mailer: git-send-email 2.7.4 Subject: [Intel-gfx] [PATCH i-g-t] demos/intel_sprite_on: Fix connector iteration bug 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-Virus-Scanned: ClamAV using ClamSMTP Instead of looping until the first disconnected port is found, now go through all possible connectors, drawing the sprite on any connected display. Signed-off-by: Jim Bride --- demos/intel_sprite_on.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/demos/intel_sprite_on.c b/demos/intel_sprite_on.c index 6dddded..ff40e3c 100644 --- a/demos/intel_sprite_on.c +++ b/demos/intel_sprite_on.c @@ -563,10 +563,8 @@ static void ricochet(int tiled, int sprite_w, int sprite_h, // Find the native (preferred) display mode connector_find_preferred_mode(gfx_fd, gfx_resources, &curr_connector); - if (curr_connector.mode_valid == 0) { - printf("No valid preferred mode detected\n"); - goto out; - } + if (curr_connector.mode_valid == 0) + continue; // Determine if sprite hardware is available on pipe // associated with this connector.