From patchwork Wed Mar 2 18:10:40 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Derek Morton X-Patchwork-Id: 8484471 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 9887E9F2F0 for ; Wed, 2 Mar 2016 18:11:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D63F62037C for ; Wed, 2 Mar 2016 18:11:20 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 1531020382 for ; Wed, 2 Mar 2016 18:11:19 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B93A06E94B; Wed, 2 Mar 2016 18:11:15 +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 843826E944 for ; Wed, 2 Mar 2016 18:11:05 +0000 (UTC) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga103.jf.intel.com with ESMTP; 02 Mar 2016 10:11:06 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,529,1449561600"; d="scan'208";a="58537735" Received: from djmorton-linux2.isw.intel.com ([10.102.226.90]) by fmsmga004.fm.intel.com with ESMTP; 02 Mar 2016 10:11:04 -0800 From: Derek Morton To: intel-gfx@lists.freedesktop.org Date: Wed, 2 Mar 2016 18:10:40 +0000 Message-Id: <1456942245-24749-3-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 2/7] lib/ioctl_wrappers: Separate ring BSD1 from BSD2 checks 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 Some platforms have ring BSD available but no BSD2. Because of the current verification, tests involving ring BSD1 will be skipped if no BSD2 is available. Decoupling the checks will allow running the BSD1 specific tests on these platforms. Based on a patch originally submitted by Gabriel Feceoru to patchwork-hook-test branch. Signed-off-by: Derek Morton --- lib/ioctl_wrappers.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/ioctl_wrappers.c b/lib/ioctl_wrappers.c index f42e2c9..a4c6aa4 100644 --- a/lib/ioctl_wrappers.c +++ b/lib/ioctl_wrappers.c @@ -1432,8 +1432,10 @@ void gem_require_ring(int fd, int ring_id) /* silly ABI, the kernel thinks everyone who has BSD also has BSD2 */ if ((ring_id & ~(3<<13)) == I915_EXEC_BSD) { - if (ring_id & (3 << 13)) + if (ring_id & (2 << 13)) igt_require(gem_has_bsd2(fd)); + if (ring_id & (1 << 13)) + igt_require(gem_has_bsd(fd)); } }