public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH 1/3] lib/drmtest: Add a new test helper to check for Full PPGTT usage
@ 2013-12-10  9:36 oscar.mateo
  2013-12-10  9:36 ` [PATCH 2/3] tests/gem_close_race: Adapt the test for Full PPGTT oscar.mateo
  2013-12-10  9:36 ` [PATCH 3/3] tests/gem_ppgtt: New Full PPGTT set of tests oscar.mateo
  0 siblings, 2 replies; 7+ messages in thread
From: oscar.mateo @ 2013-12-10  9:36 UTC (permalink / raw)
  To: intel-gfx; +Cc: benjamin.widawsky

From: Oscar Mateo <oscar.mateo@intel.com>

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

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-12-10 18:24 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-10  9:36 [PATCH 1/3] lib/drmtest: Add a new test helper to check for Full PPGTT usage oscar.mateo
2013-12-10  9:36 ` [PATCH 2/3] tests/gem_close_race: Adapt the test for Full PPGTT oscar.mateo
2013-12-10 12:32   ` Daniel Vetter
2013-12-10 18:11     ` Ben Widawsky
2013-12-10 18:22       ` Mateo Lozano, Oscar
2013-12-10 18:24         ` Ben Widawsky
2013-12-10  9:36 ` [PATCH 3/3] tests/gem_ppgtt: New Full PPGTT set of tests oscar.mateo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox