diff mbox

[v2] aubinator: Define DRM_IOCTL_I915_GEM_EXECBUFFER2_WR if unavailable

Message ID 1489680461-3269-1-git-send-email-jason.ekstrand@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jason Ekstrand March 16, 2017, 4:07 p.m. UTC
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 mbox

Patch

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, ...);