summaryrefslogtreecommitdiff
path: root/lib/drmtest.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/drmtest.c')
-rw-r--r--lib/drmtest.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/drmtest.c b/lib/drmtest.c
index 0f021902..f9b7a6f0 100644
--- a/lib/drmtest.c
+++ b/lib/drmtest.c
@@ -57,6 +57,20 @@ is_intel(int fd)
return IS_INTEL(devid);
}
+bool gem_uses_aliasing_ppgtt(int fd)
+{
+ struct drm_i915_getparam gp;
+ int val;
+
+ gp.param = 18; /* HAS_ALIASING_PPGTT */
+ gp.value = &val;
+
+ if (ioctl(fd, DRM_IOCTL_I915_GETPARAM, &gp, sizeof(gp)))
+ return 0;
+
+ return val;
+}
+
/* Ensure the gpu is idle by launching a nop execbuf and stalling for it. */
void gem_quiescent_gpu(int fd)
{