summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBen Widawsky <benjamin.widawsky@intel.com>2013-11-11 20:21:44 -0800
committerBen Widawsky <benjamin.widawsky@intel.com>2013-12-05 20:31:05 -0800
commit78a8640a94d2c4c944fab17f17e2ef88dc665b74 (patch)
tree42247ca97229d86ebddd214ba2c42cd8872c3bfa /lib
parent012643084fc6d53433d20e928aa33827911211a3 (diff)
gem_pin: Skip with full ppgtt
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Diffstat (limited to 'lib')
-rw-r--r--lib/drmtest.c16
-rw-r--r--lib/drmtest.h1
2 files changed, 17 insertions, 0 deletions
diff --git a/lib/drmtest.c b/lib/drmtest.c
index 97a44031..5db1a39f 100644
--- a/lib/drmtest.c
+++ b/lib/drmtest.c
@@ -101,6 +101,22 @@ bool gem_uses_aliasing_ppgtt(int fd)
return val;
}
+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;
+
+ fprintf(stderr, "The return of has ful was %d\n", val);
+
+ return val;
+}
+
int gem_available_fences(int fd)
{
struct drm_i915_getparam gp;
diff --git a/lib/drmtest.h b/lib/drmtest.h
index 20e26205..c5c69f49 100644
--- a/lib/drmtest.h
+++ b/lib/drmtest.h
@@ -92,6 +92,7 @@ bool gem_bo_busy(int fd, uint32_t handle);
/* feature test helpers */
bool gem_uses_aliasing_ppgtt(int fd);
+bool gem_uses_full_ppgtt(int fd);
int gem_available_fences(int fd);
/* prime */