From patchwork Thu Mar 10 11:03:29 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Derek Morton X-Patchwork-Id: 8555551 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 18AEEC0553 for ; Thu, 10 Mar 2016 11:04:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 502612024D for ; Thu, 10 Mar 2016 11:04:10 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 72067200FF for ; Thu, 10 Mar 2016 11:04:09 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8CBFE6E21C; Thu, 10 Mar 2016 11:04:08 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by gabe.freedesktop.org (Postfix) with ESMTP id 6E8BB6E21F for ; Thu, 10 Mar 2016 11:03:55 +0000 (UTC) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga103.fm.intel.com with ESMTP; 10 Mar 2016 03:03:56 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,315,1455004800"; d="scan'208";a="906891830" Received: from djmorton-linux2.isw.intel.com ([10.102.226.90]) by orsmga001.jf.intel.com with ESMTP; 10 Mar 2016 03:03:51 -0800 From: Derek Morton To: intel-gfx@lists.freedesktop.org Date: Thu, 10 Mar 2016 11:03:29 +0000 Message-Id: <1457607814-18751-2-git-send-email-derek.j.morton@intel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1457607814-18751-1-git-send-email-derek.j.morton@intel.com> References: <1457607814-18751-1-git-send-email-derek.j.morton@intel.com> Cc: daniel.vetter@ffwll.com Subject: [Intel-gfx] [PATCH i-g-t v3 1/6] 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);