From patchwork Tue Mar 8 14:51:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomeu Vizoso X-Patchwork-Id: 8534921 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 9D703C0553 for ; Tue, 8 Mar 2016 14:52:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BB33A200D4 for ; Tue, 8 Mar 2016 14:52:21 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id CFC6A201C8 for ; Tue, 8 Mar 2016 14:52:19 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A8DE96E6F6; Tue, 8 Mar 2016 14:52:15 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wm0-x241.google.com (mail-wm0-x241.google.com [IPv6:2a00:1450:400c:c09::241]) by gabe.freedesktop.org (Postfix) with ESMTPS id 974206E6EF for ; Tue, 8 Mar 2016 14:52:12 +0000 (UTC) Received: by mail-wm0-x241.google.com with SMTP id l68so4533668wml.3 for ; Tue, 08 Mar 2016 06:52:12 -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=dsWXQsdA0N5ZUHK1dQnnlMz3cAqMDiheqzqsgwKH4WQ=; b=Bm6DhASvJA/Dy0DQ/j2iCBImWpTYyEjVHL4DYdy1wY1qI17SsAv1BeZsuimrXLuhR+ xt9MK//iDv9O+8YamcUt4agRF3d12XDqRfl0pe4cM9atW1cL2n4ha3og0NZHzORxz1Bq 2ysy2UCYZZWnVAtNL/3TXPYKzqR33CJL5hEBQKqCbLL7Gty/DxQNLAbqDT3Ph+JR/nZw FtBvo0hfLCZoQynn8ZCWuNzeTqOwdFvAxJkXoE9KFtqKW5JDTQ5VvDe6Dn+cf6Q3g8Of dnVwZhtauG5qr4FBY7r4LJDWFnetvfq1YG1kLmVyEWLfnWCuUgw8I76R1hePuj7cYiFv ngpw== 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=dsWXQsdA0N5ZUHK1dQnnlMz3cAqMDiheqzqsgwKH4WQ=; b=TpmzdKkJ4kC9rpAQbw0P2r+cvniLAMxR6H2Tk+jOOUCLOfxErutuemgRSeaGKechY6 XK4hb2rLnIKI2wdh+TeJ2eUGGLGsCgcsSFOtiFFwY4kBYDj1h5qPNIeqBDwlUrlVyeS8 euH43hoLXJlb5fyDx/iwVYzGBKsGhNbZDJaOrHgd37EStHxI6uz8EJbLAMrW3f8xsZZ5 5+uvUHUqsPVLYSXP8+nqef3B0ZCsYMwJbCkJFDjgjSjncCx8E7UnCk+EcHrJrsGEnUYS eA7ZoBlyAw3SJRfD+fjJ/FqqQzJAN0UK7FpZibb08E4ZzTplNJeC1I279kmhE4puG3UF VDVw== X-Gm-Message-State: AD7BkJJ0KFo28ALOGaZdDYw7E6HSCVUHHdLBG+gliNyeRaEaMXNphiTxM2tzg0XwTW/DEg== X-Received: by 10.194.142.135 with SMTP id rw7mr27793581wjb.84.1457448730749; Tue, 08 Mar 2016 06:52:10 -0800 (PST) Received: from cizrna.lan ([109.72.12.208]) by smtp.gmail.com with ESMTPSA id 3sm3781979wmp.14.2016.03.08.06.52.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 Mar 2016 06:52:09 -0800 (PST) From: Tomeu Vizoso To: Intel GFX discussion Date: Tue, 8 Mar 2016 15:51:26 +0100 Message-Id: <1457448699-9778-5-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 04/17] 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 --- Changes in v2: None 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 2f847c85c30a..10304bbb3f96 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