From patchwork Wed Mar 2 14:00:10 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomeu Vizoso X-Patchwork-Id: 8480791 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 187C69F372 for ; Wed, 2 Mar 2016 14:01:20 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4870B2038F for ; Wed, 2 Mar 2016 14:01:19 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id CFDB1202AE for ; Wed, 2 Mar 2016 14:01:13 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 270A46E877; Wed, 2 Mar 2016 14:01:12 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wm0-x244.google.com (mail-wm0-x244.google.com [IPv6:2a00:1450:400c:c09::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id A27896E877 for ; Wed, 2 Mar 2016 14:01:06 +0000 (UTC) Received: by mail-wm0-x244.google.com with SMTP id l68so9783919wml.3 for ; Wed, 02 Mar 2016 06:01:06 -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=QB9KP7Cq6M7f0bhq3wp/OHfrnI0SlI5WTtoc2G7GaDw=; b=Y+xk6grzBVFYzaXf17zgCRmZ/gIjwEBnjKwoloFU8Mc2y81sYesbtn6rVvUFmquxvK /KB+1+EN8FOOe0SgVKe9On1+UMwc8Egx3aLxMt6U8nlZRb+xtiKDwR51tqs+biEQb2WQ 56LD2iRwLnQReB9irW0x8QRjH8ieeChxnv+po/S8zjlaRfuguQ51PGs1Heydx8UAYFmB dsa98ALYxBXeMXDXw0FeMnqM/QEa5quoGsTG5cK16zCcgzeF3QxaCtXd5OHWkSA/a1N8 +iLWXsr54BPYeI5yCR5PP+p1C00/f9bVFsrReB6BiRSO8q0NTDcqvF54SN5lAUHAWsNc S0JQ== 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=QB9KP7Cq6M7f0bhq3wp/OHfrnI0SlI5WTtoc2G7GaDw=; b=Oaje1Zx9SUfcBKXCynTOqumABaD5T2thypUIoCAmHifGJOcJl593mVHrN5mAl3qOu7 M2ZmwrZPbOmjy93k5Ku4qIgJEYNCturdOV4kNNUJGI9lYcxnHWHRpl9fRkh0w3lnBJsg 4IOh4i341t05cZnnWWjn/X1WtEcbtdKO1pOyRYeFGmz45H0sdGX9QnEG9xqRRvyz9ppS jFm2IJWlvhFf50gH7YJoEOqMJWmjhy3RAGlbrmojdmLW3oGgnGO06swMwWAgE2lqTbeN dL7fSqb8hs5FXEIzms0eRdkYQqq0sIdjT4gJWUI4yzNzB5Ix9tshXtOChyDkdhMXY9BF JHJw== X-Gm-Message-State: AD7BkJLbauCffxnkoz4502kkQgYrVZqnVgPWpj8rXI1mjpuuhhXJTEPEaHX21aGWh3aGQA== X-Received: by 10.194.121.99 with SMTP id lj3mr30101372wjb.55.1456927265156; Wed, 02 Mar 2016 06:01:05 -0800 (PST) Received: from cizrna.lan ([109.72.12.223]) by smtp.gmail.com with ESMTPSA id e19sm4359876wmd.1.2016.03.02.06.01.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 02 Mar 2016 06:01:04 -0800 (PST) From: Tomeu Vizoso To: Intel GFX discussion Date: Wed, 2 Mar 2016 15:00:10 +0100 Message-Id: <1456927221-32421-4-git-send-email-tomeu.vizoso@collabora.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1456927221-32421-1-git-send-email-tomeu.vizoso@collabora.com> References: <1456927221-32421-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 v1 03/14] lib: Expose is_i915_device 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 Lib and test code can use this function to avoid i915-specific behavior when running on other drivers. Signed-off-by: Tomeu Vizoso --- lib/drmtest.c | 2 +- lib/drmtest.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/drmtest.c b/lib/drmtest.c index bb9ca507a922..2ed84a01083a 100644 --- a/lib/drmtest.c +++ b/lib/drmtest.c @@ -90,7 +90,7 @@ static int __get_drm_device_name(int fd, char *name) return -1; } -static bool is_i915_device(int fd) +bool is_i915_device(int fd) { int ret; char name[5] = ""; diff --git a/lib/drmtest.h b/lib/drmtest.h index af7da37d5ff8..1d73115fb6bd 100644 --- a/lib/drmtest.h +++ b/lib/drmtest.h @@ -84,6 +84,8 @@ void gem_quiescent_gpu(int fd); void igt_require_intel(int fd); +bool is_i915_device(int fd); + /** * do_or_die: * @x: command