diff mbox

[2/2] gem_ring_sync_loop: test the new ring

Message ID 1352966290-25762-2-git-send-email-haihao.xiang@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Xiang, Haihao Nov. 15, 2012, 7:58 a.m. UTC
From: "Xiang, Haihao" <haihao.xiang@intel.com>

The code is surround by a #ifdef...#endif to avoid to break compiling against
the current libdrm release

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
---
 tests/gem_ring_sync_loop.c |   12 ++++++++++++
 1 file changed, 12 insertions(+)
diff mbox

Patch

diff --git a/tests/gem_ring_sync_loop.c b/tests/gem_ring_sync_loop.c
index 2875cf3..955bf34 100644
--- a/tests/gem_ring_sync_loop.c
+++ b/tests/gem_ring_sync_loop.c
@@ -81,6 +81,18 @@  get_num_rings(int fd)
 	else
 		goto skip;
 
+#ifdef I915_PARAM_HAS_VEBOX /* remove it once the upstream libdrm support VEBOX */
+
+	gp.param = I915_PARAM_HAS_VEBOX;
+	ret = drmIoctl(fd, DRM_IOCTL_I915_GETPARAM, &gp);
+
+	if ((ret == 0) & (*gp.value > 0))
+		num_rings++;
+	else
+		goto skip;
+
+#endif
+
 skip:	
 	return num_rings;
 }