From d337713ec4f94d5dde101c879fda9c6332a074c3 Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Mon, 18 Jun 2018 20:46:57 +0100 Subject: [PATCH] intel: tools: remove drm-uapi defines We already embed the headers, no need to redefine defines/structs. Signed-off-by: Lionel Landwerlin Reviewed-by: Rafael Antognolli --- src/intel/tools/intel_dump_gpu.c | 30 +----------------------------- 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/src/intel/tools/intel_dump_gpu.c b/src/intel/tools/intel_dump_gpu.c index 6107035d5bc..8a7dd52e746 100644 --- a/src/intel/tools/intel_dump_gpu.c +++ b/src/intel/tools/intel_dump_gpu.c @@ -272,27 +272,6 @@ static struct bo *bos; #define DRM_MAJOR 226 -#ifndef DRM_I915_GEM_USERPTR - -#define DRM_I915_GEM_USERPTR 0x33 -#define DRM_IOCTL_I915_GEM_USERPTR DRM_IOWR (DRM_COMMAND_BASE + DRM_I915_GEM_USERPTR, struct drm_i915_gem_userptr) - -struct drm_i915_gem_userptr { - __u64 user_ptr; - __u64 user_size; - __u32 flags; -#define I915_USERPTR_READ_ONLY 0x1 -#define I915_USERPTR_UNSYNCHRONIZED 0x80000000 - /** - * Returned handle for the object. - * - * Object handles are nonzero. - */ - __u32 handle; -}; - -#endif - /* We set bit 0 in the map pointer for userptr BOs so we know not to * munmap them on DRM_IOCTL_GEM_CLOSE. */ @@ -300,10 +279,6 @@ struct drm_i915_gem_userptr { #define IS_USERPTR(p) ((uintptr_t) (p) & USERPTR_FLAG) #define GET_PTR(p) ( (void *) ((uintptr_t) p & ~(uintptr_t) 1) ) -#ifndef I915_EXEC_BATCH_FIRST -#define I915_EXEC_BATCH_FIRST (1 << 18) -#endif - static inline bool use_execlists(void) { return devinfo.gen >= 8; @@ -1127,9 +1102,6 @@ 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) - __attribute__ ((visibility ("default"))) int ioctl(int fd, unsigned long request, ...) { @@ -1185,7 +1157,7 @@ ioctl(int fd, unsigned long request, ...) } case DRM_IOCTL_I915_GEM_EXECBUFFER2: - case LOCAL_IOCTL_I915_GEM_EXECBUFFER2_WR: { + case DRM_IOCTL_I915_GEM_EXECBUFFER2_WR: { dump_execbuffer2(fd, argp); if (device_override) return 0; -- 2.30.2