summaryrefslogtreecommitdiff
path: root/tools/aubdump.c
diff options
context:
space:
mode:
authorArkadiusz Hiler <arkadiusz.hiler@intel.com>2017-07-11 13:51:01 +0300
committerArkadiusz Hiler <arkadiusz.hiler@intel.com>2017-07-11 18:38:25 +0300
commit6e572cfc276874c69c37728d01be64cae268592c (patch)
tree9c590884122fef91a5abfbd1fc5b3ea168097b16 /tools/aubdump.c
parent4258cc8ea26208a7e9537977df5e4b8c9dcf0e74 (diff)
igt: Add LOCAL defines for distro compatibility
Each Linux distro takes a different spin on providing kernel's uapi headers (especialy the *drm*.h). You can get them with linux-headers, you can get them with libdrm. Sometime you can even get them twice, from both sources. Sometimes the headers match your kernel version, sometimes you end up stuck with headers matching the kernel that the given release of the distro came out with. This makes things harder for code that does not depend on libdrm, as we cannot have sane ./configure-time checks. So let's define LOCAL_ version for FENCE and EXECBUFFER2_WB defines until all the stable distros catch up (+/- some epsilon). Cc: Petri Latvala <petri.latvala@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Diffstat (limited to 'tools/aubdump.c')
-rw-r--r--tools/aubdump.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/aubdump.c b/tools/aubdump.c
index eccea74a..610526cc 100644
--- a/tools/aubdump.c
+++ b/tools/aubdump.c
@@ -578,6 +578,9 @@ maybe_init(void)
fail_if(bos == NULL, "intel_aubdump: out of memory\n");
}
+#define LOCAL_IOCTL_I915_GEM_EXECBUFFER2_WR \
+ DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_EXECBUFFER2, struct drm_i915_gem_execbuffer2)
+
int
ioctl(int fd, unsigned long request, ...)
{
@@ -633,7 +636,7 @@ ioctl(int fd, unsigned long request, ...)
}
case DRM_IOCTL_I915_GEM_EXECBUFFER2:
- case DRM_IOCTL_I915_GEM_EXECBUFFER2_WR: {
+ case LOCAL_IOCTL_I915_GEM_EXECBUFFER2_WR: {
dump_execbuffer2(fd, argp);
if (device_override)
return 0;