From patchwork Tue Mar 8 14:51:23 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomeu Vizoso X-Patchwork-Id: 8534961 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 2E19CC0554 for ; Tue, 8 Mar 2016 14:52:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 126D0201C8 for ; Tue, 8 Mar 2016 14:52:27 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 8D3A0200D0 for ; Tue, 8 Mar 2016 14:52:21 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 12B566E6F8; Tue, 8 Mar 2016 14:52:16 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wm0-x243.google.com (mail-wm0-x243.google.com [IPv6:2a00:1450:400c:c09::243]) by gabe.freedesktop.org (Postfix) with ESMTPS id C109D6E6EE for ; Tue, 8 Mar 2016 14:52:07 +0000 (UTC) Received: by mail-wm0-x243.google.com with SMTP id l68so4533269wml.3 for ; Tue, 08 Mar 2016 06:52:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=ABFu4BcTyWDrLhJZrrqwKmhA+o+3CpFj1Oh1mn8Ikxo=; b=UPFMzdwL7oiv8S76mshcxPxOd7G48pX7hTcepz0yhk4COS0WqGhvyTIOCwJNsmlaY8 sXoBd1eP9i2ixZNM2H2xuqMqer7ArM5tUjeV7VdMQYLgaDCCBGfgrOejkApsYsP294c3 iKmQ5sobBnicFlBHqNnB9Og6jOiYKjpfAB+jQcU172ZjUOxrhbSLaqOvEHcjlF1JXPHK mRiDo9vBqumJwY3OFM9QzqSeS1qkZD7d/gksHZQ1/I8lPUSgrgT34UmhbWpEUE3MlmhL krC55+uKKZ6oK2PDJ0JLnBO9RhuCkXDN0lor59lbly8gawlx0EQUrlfCn6WbOFUtj6+J TqBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=ABFu4BcTyWDrLhJZrrqwKmhA+o+3CpFj1Oh1mn8Ikxo=; b=HB2fmRXi+XmC1EyUxuQxNgSW/PnvQxbiziTt1Yk0sQ7GcW1iBZdPuG1/w3Jd+nX46r tsYnx1K+3+Uaz1iRMVqxn6JQXrN1f3LdUV1y318eBbQu7wlCmeAAY0HLxxUZ0eU/QMXt HZlMSMIQMNu0D9jsa9suH1OJEEyR4v+O3PL8ZZrxxPKOJhvm4WxzWA3MZbDKRXLRXVDi agX+hVP8WM9HZDCprr2oVq7+nvVG9Xj7vsNIYyjZ3Ku5ayX77dxp9pANBDVM/6SKxD2W 869nl8rqen6nc/+uia/Sa2MBEfZbcFZ3q8zlmHYpWGuHG4qokXmIINYoGvnX9iWB5d56 k7JQ== X-Gm-Message-State: AD7BkJKRPAJX639vPqtt98tfaEkVzo70bQHQN/KvnLrhh/AA9Cc6TDJomvMax+L6osLNKg== X-Received: by 10.194.111.229 with SMTP id il5mr34168268wjb.82.1457448726033; Tue, 08 Mar 2016 06:52:06 -0800 (PST) Received: from cizrna.lan ([109.72.12.208]) by smtp.gmail.com with ESMTPSA id 3sm3781979wmp.14.2016.03.08.06.52.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 Mar 2016 06:52:04 -0800 (PST) From: Tomeu Vizoso To: Intel GFX discussion Date: Tue, 8 Mar 2016 15:51:23 +0100 Message-Id: <1457448699-9778-2-git-send-email-tomeu.vizoso@collabora.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1457448699-9778-1-git-send-email-tomeu.vizoso@collabora.com> References: <1457448699-9778-1-git-send-email-tomeu.vizoso@collabora.com> Cc: Daniel Stone , Tomeu Vizoso , Micah Fedke , Gustavo Padovan , Emil Velikov Subject: [Intel-gfx] [i-g-t PATCH v2 01/17] lib: Rename is_intel to has_known_intel_chipset 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.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham 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 As it reflects more clearly what the function actually does. Suggested-by: Chris Wilson Signed-off-by: Tomeu Vizoso --- Changes in v2: None lib/drmtest.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/drmtest.c b/lib/drmtest.c index 7b2227fe0f6a..b00f423d539b 100644 --- a/lib/drmtest.c +++ b/lib/drmtest.c @@ -110,7 +110,7 @@ static bool is_vc4_device(int fd) return !ret && strcmp("vc4", name) == 0; } -static bool is_intel(int fd) +static bool has_known_intel_chipset(int fd) { struct drm_i915_getparam gp; int devid = 0; @@ -219,7 +219,7 @@ int drm_get_card(void) if (fd == -1) continue; - if (!is_i915_device(fd) || !is_intel(fd)) { + if (!is_i915_device(fd) || !has_known_intel_chipset(fd)) { close(fd); continue; } @@ -254,7 +254,9 @@ int __drm_open_driver(int chipset) if (fd == -1) continue; - found_intel = is_i915_device(fd) && is_intel(fd) && (chipset & DRIVER_INTEL); + found_intel = is_i915_device(fd) && + has_known_intel_chipset(fd) && + (chipset & DRIVER_INTEL); found_vc4 = is_vc4_device(fd) && (chipset & DRIVER_VC4); @@ -285,7 +287,7 @@ static int __drm_open_driver_render(int chipset) if (fd == -1) continue; - if (!is_i915_device(fd) || !is_intel(fd)) { + if (!is_i915_device(fd) || !has_known_intel_chipset(fd)) { close(fd); fd = -1; continue;