From: oscar.mateo@intel.com Subject: [PATCH 1/3] lib/drmtest: Add a new test helper to check for Full PPGTT usage Date: Tue, 10 Dec 2013 09:36:21 +0000 Message-ID: <1386668183-19514-1-git-send-email-oscar.mateo@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTP id 6FFCBFB1C1 for ; Tue, 10 Dec 2013 01:42:12 -0800 (PST) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org To: intel-gfx@lists.freedesktop.org Cc: benjamin.widawsky@intel.com List-Id: intel-gfx@lists.freedesktop.org From: Oscar Mateo Signed-off-by: Oscar Mateo --- lib/drmtest.c | 14 ++++++++++++++ lib/drmtest.h | 1 + 2 files changed, 15 insertions(+) diff --git a/lib/drmtest.c b/lib/drmtest.c index f2624a1..c2483ee 100644 --- a/lib/drmtest.c +++ b/lib/drmtest.c @@ -87,6 +87,20 @@ is_intel(int fd) return IS_INTEL(devid); } +bool gem_uses_full_ppgtt(int fd) +{ + struct drm_i915_getparam gp; + int val; + + gp.param = 28; /* HAS_FULL_PPGTT */ + gp.value = &val; + + if (ioctl(fd, DRM_IOCTL_I915_GETPARAM, &gp, sizeof(gp))) + return 0; + + return val; +} + bool gem_uses_aliasing_ppgtt(int fd) { struct drm_i915_getparam gp; diff --git a/lib/drmtest.h b/lib/drmtest.h index 20e2620..61769e2 100644 --- a/lib/drmtest.h +++ b/lib/drmtest.h @@ -91,6 +91,7 @@ void gem_sw_finish(int fd, uint32_t handle); bool gem_bo_busy(int fd, uint32_t handle); /* feature test helpers */ +bool gem_uses_full_ppgtt(int fd); bool gem_uses_aliasing_ppgtt(int fd); int gem_available_fences(int fd); -- 1.7.9.5