From patchwork Mon Feb 8 18:56:06 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Feceoru, Gabriel" X-Patchwork-Id: 8254061 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 EDB10BEEE5 for ; Mon, 8 Feb 2016 18:49:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3F0DC203B1 for ; Mon, 8 Feb 2016 18:49:38 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 43ED020254 for ; Mon, 8 Feb 2016 18:49:37 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 28FD46E488; Mon, 8 Feb 2016 10:49:36 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by gabe.freedesktop.org (Postfix) with ESMTP id 25D646E488 for ; Mon, 8 Feb 2016 10:49:35 -0800 (PST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga104.fm.intel.com with ESMTP; 08 Feb 2016 10:49:34 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,417,1449561600"; d="scan'208";a="879714761" Received: from gfeceoru-ms-7924.rb.intel.com ([10.237.104.199]) by orsmga001.jf.intel.com with ESMTP; 08 Feb 2016 10:49:33 -0800 From: Gabriel Feceoru To: intel-gfx@lists.freedesktop.org Date: Mon, 8 Feb 2016 20:56:06 +0200 Message-Id: <1454957766-25207-1-git-send-email-gabriel.feceoru@intel.com> X-Mailer: git-send-email 1.9.1 Subject: [Intel-gfx] [PATCH i-g-t] 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.5 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. Signed-off-by: Gabriel Feceoru --- 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 f371bf0..dfabde7 100644 --- a/lib/ioctl_wrappers.c +++ b/lib/ioctl_wrappers.c @@ -1348,8 +1348,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)) } }