[PATCH 1/3] lib/drmtest: Add a new test helper to check for Full PPGTT usage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Oscar Mateo <oscar.mateo@xxxxxxxxx>

Signed-off-by: Oscar Mateo <oscar.mateo@xxxxxxxxx>
---
 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

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux