[Intel-gfx] [PATCH v2] aubinator: Define DRM_IOCTL_I915_GEM_EXECBUFFER2_WR if unavailable

Jason Ekstrand jason at jlekstrand.net
Thu Mar 16 16:07:41 UTC 2017


Depending on what version of drm_i915.h you have, you may not have
this #define but it's required in order to properly dump aubs from
newer versions of mesa.
---
 tools/aubdump.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/tools/aubdump.c b/tools/aubdump.c
index 08cee55..8a89b8c 100644
--- a/tools/aubdump.c
+++ b/tools/aubdump.c
@@ -47,6 +47,14 @@
 #define ARRAY_SIZE(x) (sizeof(x)/sizeof((x)[0]))
 #endif
 
+#ifndef DRM_I915_GEM_EXECBUFFER2_WR
+#define DRM_I915_GEM_EXECBUFFER2_WR	DRM_I915_GEM_EXECBUFFER2
+#endif
+
+#ifndef DRM_IOCTL_I915_GEM_EXECBUFFER2_WR
+#define DRM_IOCTL_I915_GEM_EXECBUFFER2_WR	DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_EXECBUFFER2_WR, struct drm_i915_gem_execbuffer2)
+#endif
+
 static int close_init_helper(int fd);
 static int ioctl_init_helper(int fd, unsigned long request, ...);
 
-- 
2.5.0.400.gff86faf



More information about the Intel-gfx mailing list