From: Jesse Barnes Subject: [PATCH] gem_exec_parse: require PPGTT as well Date: Thu, 26 Jun 2014 08:48:46 -0700 Message-ID: <1403797726-2413-1-git-send-email-jbarnes@virtuousgeek.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: 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: 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org 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. */ -- 1.9.1