From patchwork Tue Mar 8 14:51:24 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomeu Vizoso X-Patchwork-Id: 8535021 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 32AFCC0553 for ; Tue, 8 Mar 2016 14:53:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 531ED200D4 for ; Tue, 8 Mar 2016 14:53:13 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 8860D200D0 for ; Tue, 8 Mar 2016 14:53:12 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 542AF6E6FE; Tue, 8 Mar 2016 14:53:11 +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 C02706E6EE for ; Tue, 8 Mar 2016 14:52:09 +0000 (UTC) Received: by mail-wm0-x244.google.com with SMTP id l68so4533417wml.3 for ; Tue, 08 Mar 2016 06:52:09 -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=L3YguKLqFdW7Qy/YsMqpOmV48r+1W5tPGv6Dk967EVk=; b=e1vzocIYdYIQcM7m3K1gFzd7xD+xW8o9tyRQTmPbjnjxH3j4Jq5fs73ySz1AoX4Eyx +bi0X0M/+/wrvO6wYyFtaAnkaRhHYunAVxHdyFr4K6xANBga7U6SlPr18P8aaJVweBC1 phLp7oxVf4abGNRhKuMnG6BVeeCdsdYRh0/0iDClJnOg1V3+c9W/zTnmIqxEelrw0v48 I5RbFJfG0czcJFGxjkQfAB+ZDp/hsCQHPaUYAwE+owEeWbqscazpNzfHk9Hysrp8G1V2 YvR8pgdxwCQRvRSKbW0EOSFVik3nvbXltdyVe7athhVdQ7rsLzeSHkUD0R1CBxUS0vuA dOaA== 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=L3YguKLqFdW7Qy/YsMqpOmV48r+1W5tPGv6Dk967EVk=; b=VTLeTI9uoEOmBUd6+aD9XtE85/7lioQaEqKXa4NKiyWFOMqX2GJ/1IjsTj0vtdGoe9 zRpaHTiPzx5rGm9Ad8/Q0UleQ+X4xd44jz15HDNaUvUpLhIEb1QEb/tsIFlepJsTXryu 7fsEFDYrNDAQTaCZIwiKMrwj9Sq6omcpEVT+UjlokaPk5gNNcp5bZ+My7HHt6ZevfI/w ecCjP5flh5arV9n/7hUo41Vk8wEyPvqzxemJUhJ6C381TqYEgkrtwyz9FTDQ5d+DhowH YIO37ylZFruTCgnD3wh07CBnPYLM8tHXPCvYPWfBYUMB/y5bb05iSGGkdrrNYYyQ0WnS lDOg== X-Gm-Message-State: AD7BkJJYJz4cGcd6mFHISSABxAi1Fbk1dpFq379Oo49CKKziLPBfdx0ylvb6Q5qLjJh8wg== X-Received: by 10.28.221.136 with SMTP id u130mr19379420wmg.40.1457448727984; Tue, 08 Mar 2016 06:52:07 -0800 (PST) Received: from cizrna.lan ([109.72.12.208]) by smtp.gmail.com with ESMTPSA id 3sm3781979wmp.14.2016.03.08.06.52.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 Mar 2016 06:52:06 -0800 (PST) From: Tomeu Vizoso To: Intel GFX discussion Date: Tue, 8 Mar 2016 15:51:24 +0100 Message-Id: <1457448699-9778-3-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 02/17] lib: add igt_require_intel 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 Add function that requires that the driver we are talking to is i915. This allows us to skip subtests that are specific to that driver. Signed-off-by: Tomeu Vizoso --- Changes in v2: - Rename is_intel to has_known_intel_chipset as suggested by Chris Wilson. lib/drmtest.c | 5 +++++ lib/drmtest.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/lib/drmtest.c b/lib/drmtest.c index b00f423d539b..2f847c85c30a 100644 --- a/lib/drmtest.c +++ b/lib/drmtest.c @@ -401,3 +401,8 @@ int drm_open_driver_render(int chipset) return fd; } + +void igt_require_intel(int fd) +{ + igt_require(is_i915_device(fd) && has_known_intel_chipset(fd)); +} diff --git a/lib/drmtest.h b/lib/drmtest.h index 9fcab9316bc4..af7da37d5ff8 100644 --- a/lib/drmtest.h +++ b/lib/drmtest.h @@ -82,6 +82,8 @@ int __drm_open_driver(int chipset); void gem_quiescent_gpu(int fd); +void igt_require_intel(int fd); + /** * do_or_die: * @x: command