From patchwork Wed Mar 2 18:10:39 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Derek Morton X-Patchwork-Id: 8484421 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 98043C0553 for ; Wed, 2 Mar 2016 18:11:10 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C26702037E for ; Wed, 2 Mar 2016 18:11:09 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id AF4D02037C for ; Wed, 2 Mar 2016 18:11:08 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id ABD566E944; Wed, 2 Mar 2016 18:11:06 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by gabe.freedesktop.org (Postfix) with ESMTP id 57D066E947 for ; Wed, 2 Mar 2016 18:11:04 +0000 (UTC) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga103.jf.intel.com with ESMTP; 02 Mar 2016 10:11:05 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,529,1449561600"; d="scan'208";a="58537696" Received: from djmorton-linux2.isw.intel.com ([10.102.226.90]) by fmsmga004.fm.intel.com with ESMTP; 02 Mar 2016 10:11:02 -0800 From: Derek Morton To: intel-gfx@lists.freedesktop.org Date: Wed, 2 Mar 2016 18:10:39 +0000 Message-Id: <1456942245-24749-2-git-send-email-derek.j.morton@intel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1456942245-24749-1-git-send-email-derek.j.morton@intel.com> References: <1456942245-24749-1-git-send-email-derek.j.morton@intel.com> Cc: daniel.vetter@ffwll.ch Subject: [Intel-gfx] [PATCH i-g-t v2 1/7] ioctl_wrappers: make gem_has_ring non static 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.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 For tests that use multiple rings to test interactions it is useful to know if a ring exists without triggering the test to skip. Signed-off-by: Derek Morton --- lib/ioctl_wrappers.c | 2 +- lib/ioctl_wrappers.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ioctl_wrappers.c b/lib/ioctl_wrappers.c index 5d49729..f42e2c9 100644 --- a/lib/ioctl_wrappers.c +++ b/lib/ioctl_wrappers.c @@ -1396,7 +1396,7 @@ void gem_require_caching(int fd) errno = 0; } -static int gem_has_ring(int fd, int ring) +int gem_has_ring(int fd, int ring) { uint32_t bbe = MI_BATCH_BUFFER_END; struct drm_i915_gem_execbuffer2 execbuf; diff --git a/lib/ioctl_wrappers.h b/lib/ioctl_wrappers.h index f59eafb..e095c41 100644 --- a/lib/ioctl_wrappers.h +++ b/lib/ioctl_wrappers.h @@ -150,6 +150,7 @@ uint64_t gem_global_aperture_size(int fd); uint64_t gem_mappable_aperture_size(void); bool gem_has_softpin(int fd); +int gem_has_ring(int fd, int ring); /* check functions which auto-skip tests by calling igt_skip() */ void gem_require_caching(int fd); void gem_require_ring(int fd, int ring_id);