From patchwork Thu Jun 26 15:48:46 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jesse Barnes X-Patchwork-Id: 4428221 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.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 20E2B9F2C8 for ; Thu, 26 Jun 2014 15:49:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E7EAF202AE for ; Thu, 26 Jun 2014 15:49:04 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 4020420306 for ; Thu, 26 Jun 2014 15:49:01 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B22226E0E9; Thu, 26 Jun 2014 08:48:59 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from gproxy2-pub.mail.unifiedlayer.com (gproxy2-pub.mail.unifiedlayer.com [69.89.18.3]) by gabe.freedesktop.org (Postfix) with SMTP id 8BB216E0E9 for ; Thu, 26 Jun 2014 08:48:58 -0700 (PDT) Received: (qmail 20355 invoked by uid 0); 26 Jun 2014 15:48:57 -0000 Received: from unknown (HELO cmgw2) (10.0.90.83) by gproxy2.mail.unifiedlayer.com with SMTP; 26 Jun 2014 15:48:57 -0000 Received: from box514.bluehost.com ([74.220.219.114]) by cmgw2 with id K3op1o00F2UhLwi013osHy; Thu, 26 Jun 2014 09:48:55 -0600 X-Authority-Analysis: v=2.1 cv=EJKVjTpC c=1 sm=1 tr=0 a=9W6Fsu4pMcyimqnCr1W0/w==:117 a=9W6Fsu4pMcyimqnCr1W0/w==:17 a=cNaOj0WVAAAA:8 a=f5113yIGAAAA:8 a=2zIOMBzqgUkA:10 a=3ROhxo7VqVMA:10 a=TBVoxVdAAAAA:8 a=GhZ5P8ky69gA:10 a=noBwr2J6l1kA:10 a=pLp8ENUnwBPqHSDnVbQA:9 a=rW6DTWptwo0A:10 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=virtuousgeek.org; s=default; h=Message-Id:Date:Subject:To:From; bh=DQOBK51ze+II4+h2W97/rMBU68BgdTODo6wLai8x1Qc=; b=fZXwL+1oT5GHTeB3m/9RtZDNRmNRt7dpBSN/JFK4q6yCUcCsUHNAHGgzD8DXzZFsKSMPbm3ERWox33RwW3+PmG8u8IYd4BuwQ38rCx22SxY4aKsfNU2xCu6GWH+lrrt9; Received: from [67.161.37.189] (port=60277 helo=localhost.localdomain) by box514.bluehost.com with esmtpsa (TLSv1.2:AES128-SHA256:128) (Exim 4.82) (envelope-from ) id 1X0BtM-00050s-LO for intel-gfx@lists.freedesktop.org; Thu, 26 Jun 2014 09:47:16 -0600 From: Jesse Barnes To: intel-gfx@lists.freedesktop.org Date: Thu, 26 Jun 2014 08:48:46 -0700 Message-Id: <1403797726-2413-1-git-send-email-jbarnes@virtuousgeek.org> X-Mailer: git-send-email 1.9.1 X-Identified-User: {10642:box514.bluehost.com:virtuous:virtuousgeek.org} {sentby:smtp auth 67.161.37.189 authed with jbarnes@virtuousgeek.org} Subject: [Intel-gfx] [PATCH] gem_exec_parse: require PPGTT as well X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.15 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, T_DKIM_INVALID, T_RP_MATCHES_RCVD, 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 The command parser may be present, but not active, so check for PPGTT before allowing this test to run. Signed-off-by: Jesse Barnes --- tests/gem_exec_parse.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/gem_exec_parse.c b/tests/gem_exec_parse.c index e78a192..f7376e3 100644 --- a/tests/gem_exec_parse.c +++ b/tests/gem_exec_parse.c @@ -198,7 +198,7 @@ int fd; igt_main { igt_fixture { - int parser_version = 0; + int parser_version = 0, has_ppgtt = 0; drm_i915_getparam_t gp; int rc; @@ -209,6 +209,11 @@ igt_main rc = drmIoctl(fd, DRM_IOCTL_I915_GETPARAM, &gp); igt_require(!rc && parser_version > 0); + gp.param = I915_PARAM_HAS_ALIASING_PPGTT; + gp.value = &has_ppgtt; + rc = drmIoctl(fd, DRM_IOCTL_I915_GETPARAM, &gp); + igt_require(!rc && has_ppgtt > 0); + handle = gem_create(fd, 4096); /* ATM cmd parser only exists on gen7. */