Generate clib/wrapper.h with build.rs

master
itycodes 2 months ago
parent f3a2c86935
commit 0ccfa81420

@ -1,7 +1,13 @@
use std::env;
use std::path::PathBuf;
use std::process::Command;
fn main() {
Command::new("sh")
.args(["-c", "./gen_workaround.sh > clib/wrapper.h"])
.status()
.expect("Failed to generate clib/wrapper.h");
let bindings = bindgen::Builder::default()
.header("clib/wrapper.h")
.parse_callbacks(Box::new(bindgen::CargoCallbacks::new()))

@ -1,441 +0,0 @@
#include <libdrm/drm.h>
#include <libdrm/i915_drm.h>
const __u64 _DRM_IOCTL_VERSION = DRM_IOCTL_VERSION;
#undef DRM_IOCTL_VERSION
const __u64 DRM_IOCTL_VERSION = _DRM_IOCTL_VERSION;
const __u64 _DRM_IOCTL_GET_UNIQUE = DRM_IOCTL_GET_UNIQUE;
#undef DRM_IOCTL_GET_UNIQUE
const __u64 DRM_IOCTL_GET_UNIQUE = _DRM_IOCTL_GET_UNIQUE;
const __u64 _DRM_IOCTL_IRQ_BUSID = DRM_IOCTL_IRQ_BUSID;
#undef DRM_IOCTL_IRQ_BUSID
const __u64 DRM_IOCTL_IRQ_BUSID = _DRM_IOCTL_IRQ_BUSID;
const __u64 _DRM_IOCTL_GET_MAP = DRM_IOCTL_GET_MAP;
#undef DRM_IOCTL_GET_MAP
const __u64 DRM_IOCTL_GET_MAP = _DRM_IOCTL_GET_MAP;
const __u64 _DRM_IOCTL_GET_CLIENT = DRM_IOCTL_GET_CLIENT;
#undef DRM_IOCTL_GET_CLIENT
const __u64 DRM_IOCTL_GET_CLIENT = _DRM_IOCTL_GET_CLIENT;
const __u64 _DRM_IOCTL_SET_VERSION = DRM_IOCTL_SET_VERSION;
#undef DRM_IOCTL_SET_VERSION
const __u64 DRM_IOCTL_SET_VERSION = _DRM_IOCTL_SET_VERSION;
const __u64 _DRM_IOCTL_MODESET_CTL = DRM_IOCTL_MODESET_CTL;
#undef DRM_IOCTL_MODESET_CTL
const __u64 DRM_IOCTL_MODESET_CTL = _DRM_IOCTL_MODESET_CTL;
const __u64 _DRM_IOCTL_GEM_CLOSE = DRM_IOCTL_GEM_CLOSE;
#undef DRM_IOCTL_GEM_CLOSE
const __u64 DRM_IOCTL_GEM_CLOSE = _DRM_IOCTL_GEM_CLOSE;
const __u64 _DRM_IOCTL_GEM_FLINK = DRM_IOCTL_GEM_FLINK;
#undef DRM_IOCTL_GEM_FLINK
const __u64 DRM_IOCTL_GEM_FLINK = _DRM_IOCTL_GEM_FLINK;
const __u64 _DRM_IOCTL_GEM_OPEN = DRM_IOCTL_GEM_OPEN;
#undef DRM_IOCTL_GEM_OPEN
const __u64 DRM_IOCTL_GEM_OPEN = _DRM_IOCTL_GEM_OPEN;
const __u64 _DRM_IOCTL_GET_CAP = DRM_IOCTL_GET_CAP;
#undef DRM_IOCTL_GET_CAP
const __u64 DRM_IOCTL_GET_CAP = _DRM_IOCTL_GET_CAP;
const __u64 _DRM_IOCTL_BLOCK = DRM_IOCTL_BLOCK;
#undef DRM_IOCTL_BLOCK
const __u64 DRM_IOCTL_BLOCK = _DRM_IOCTL_BLOCK;
const __u64 _DRM_IOCTL_UNBLOCK = DRM_IOCTL_UNBLOCK;
#undef DRM_IOCTL_UNBLOCK
const __u64 DRM_IOCTL_UNBLOCK = _DRM_IOCTL_UNBLOCK;
const __u64 _DRM_IOCTL_ADD_MAP = DRM_IOCTL_ADD_MAP;
#undef DRM_IOCTL_ADD_MAP
const __u64 DRM_IOCTL_ADD_MAP = _DRM_IOCTL_ADD_MAP;
const __u64 _DRM_IOCTL_ADD_BUFS = DRM_IOCTL_ADD_BUFS;
#undef DRM_IOCTL_ADD_BUFS
const __u64 DRM_IOCTL_ADD_BUFS = _DRM_IOCTL_ADD_BUFS;
const __u64 _DRM_IOCTL_INFO_BUFS = DRM_IOCTL_INFO_BUFS;
#undef DRM_IOCTL_INFO_BUFS
const __u64 DRM_IOCTL_INFO_BUFS = _DRM_IOCTL_INFO_BUFS;
const __u64 _DRM_IOCTL_MAP_BUFS = DRM_IOCTL_MAP_BUFS;
#undef DRM_IOCTL_MAP_BUFS
const __u64 DRM_IOCTL_MAP_BUFS = _DRM_IOCTL_MAP_BUFS;
const __u64 _DRM_IOCTL_GET_SAREA_CTX = DRM_IOCTL_GET_SAREA_CTX;
#undef DRM_IOCTL_GET_SAREA_CTX
const __u64 DRM_IOCTL_GET_SAREA_CTX = _DRM_IOCTL_GET_SAREA_CTX;
const __u64 _DRM_IOCTL_SET_MASTER = DRM_IOCTL_SET_MASTER;
#undef DRM_IOCTL_SET_MASTER
const __u64 DRM_IOCTL_SET_MASTER = _DRM_IOCTL_SET_MASTER;
const __u64 _DRM_IOCTL_DROP_MASTER = DRM_IOCTL_DROP_MASTER;
#undef DRM_IOCTL_DROP_MASTER
const __u64 DRM_IOCTL_DROP_MASTER = _DRM_IOCTL_DROP_MASTER;
const __u64 _DRM_IOCTL_ADD_CTX = DRM_IOCTL_ADD_CTX;
#undef DRM_IOCTL_ADD_CTX
const __u64 DRM_IOCTL_ADD_CTX = _DRM_IOCTL_ADD_CTX;
const __u64 _DRM_IOCTL_RM_CTX = DRM_IOCTL_RM_CTX;
#undef DRM_IOCTL_RM_CTX
const __u64 DRM_IOCTL_RM_CTX = _DRM_IOCTL_RM_CTX;
const __u64 _DRM_IOCTL_GET_CTX = DRM_IOCTL_GET_CTX;
#undef DRM_IOCTL_GET_CTX
const __u64 DRM_IOCTL_GET_CTX = _DRM_IOCTL_GET_CTX;
const __u64 _DRM_IOCTL_RES_CTX = DRM_IOCTL_RES_CTX;
#undef DRM_IOCTL_RES_CTX
const __u64 DRM_IOCTL_RES_CTX = _DRM_IOCTL_RES_CTX;
const __u64 _DRM_IOCTL_ADD_DRAW = DRM_IOCTL_ADD_DRAW;
#undef DRM_IOCTL_ADD_DRAW
const __u64 DRM_IOCTL_ADD_DRAW = _DRM_IOCTL_ADD_DRAW;
const __u64 _DRM_IOCTL_RM_DRAW = DRM_IOCTL_RM_DRAW;
#undef DRM_IOCTL_RM_DRAW
const __u64 DRM_IOCTL_RM_DRAW = _DRM_IOCTL_RM_DRAW;
const __u64 _DRM_IOCTL_DMA = DRM_IOCTL_DMA;
#undef DRM_IOCTL_DMA
const __u64 DRM_IOCTL_DMA = _DRM_IOCTL_DMA;
const __u64 _DRM_IOCTL_PRIME_HANDLE_TO_FD = DRM_IOCTL_PRIME_HANDLE_TO_FD;
#undef DRM_IOCTL_PRIME_HANDLE_TO_FD
const __u64 DRM_IOCTL_PRIME_HANDLE_TO_FD = _DRM_IOCTL_PRIME_HANDLE_TO_FD;
const __u64 _DRM_IOCTL_PRIME_FD_TO_HANDLE = DRM_IOCTL_PRIME_FD_TO_HANDLE;
#undef DRM_IOCTL_PRIME_FD_TO_HANDLE
const __u64 DRM_IOCTL_PRIME_FD_TO_HANDLE = _DRM_IOCTL_PRIME_FD_TO_HANDLE;
const __u64 _DRM_IOCTL_AGP_ALLOC = DRM_IOCTL_AGP_ALLOC;
#undef DRM_IOCTL_AGP_ALLOC
const __u64 DRM_IOCTL_AGP_ALLOC = _DRM_IOCTL_AGP_ALLOC;
const __u64 _DRM_IOCTL_SG_ALLOC = DRM_IOCTL_SG_ALLOC;
#undef DRM_IOCTL_SG_ALLOC
const __u64 DRM_IOCTL_SG_ALLOC = _DRM_IOCTL_SG_ALLOC;
const __u64 _DRM_IOCTL_WAIT_VBLANK = DRM_IOCTL_WAIT_VBLANK;
#undef DRM_IOCTL_WAIT_VBLANK
const __u64 DRM_IOCTL_WAIT_VBLANK = _DRM_IOCTL_WAIT_VBLANK;
const __u64 _DRM_IOCTL_CRTC_GET_SEQUENCE = DRM_IOCTL_CRTC_GET_SEQUENCE;
#undef DRM_IOCTL_CRTC_GET_SEQUENCE
const __u64 DRM_IOCTL_CRTC_GET_SEQUENCE = _DRM_IOCTL_CRTC_GET_SEQUENCE;
const __u64 _DRM_IOCTL_CRTC_QUEUE_SEQUENCE = DRM_IOCTL_CRTC_QUEUE_SEQUENCE;
#undef DRM_IOCTL_CRTC_QUEUE_SEQUENCE
const __u64 DRM_IOCTL_CRTC_QUEUE_SEQUENCE = _DRM_IOCTL_CRTC_QUEUE_SEQUENCE;
const __u64 _DRM_IOCTL_UPDATE_DRAW = DRM_IOCTL_UPDATE_DRAW;
#undef DRM_IOCTL_UPDATE_DRAW
const __u64 DRM_IOCTL_UPDATE_DRAW = _DRM_IOCTL_UPDATE_DRAW;
const __u64 _DRM_IOCTL_MODE_GETRESOURCES = DRM_IOCTL_MODE_GETRESOURCES;
#undef DRM_IOCTL_MODE_GETRESOURCES
const __u64 DRM_IOCTL_MODE_GETRESOURCES = _DRM_IOCTL_MODE_GETRESOURCES;
const __u64 _DRM_IOCTL_MODE_GETCRTC = DRM_IOCTL_MODE_GETCRTC;
#undef DRM_IOCTL_MODE_GETCRTC
const __u64 DRM_IOCTL_MODE_GETCRTC = _DRM_IOCTL_MODE_GETCRTC;
const __u64 _DRM_IOCTL_MODE_SETCRTC = DRM_IOCTL_MODE_SETCRTC;
#undef DRM_IOCTL_MODE_SETCRTC
const __u64 DRM_IOCTL_MODE_SETCRTC = _DRM_IOCTL_MODE_SETCRTC;
const __u64 _DRM_IOCTL_MODE_CURSOR = DRM_IOCTL_MODE_CURSOR;
#undef DRM_IOCTL_MODE_CURSOR
const __u64 DRM_IOCTL_MODE_CURSOR = _DRM_IOCTL_MODE_CURSOR;
const __u64 _DRM_IOCTL_MODE_GETGAMMA = DRM_IOCTL_MODE_GETGAMMA;
#undef DRM_IOCTL_MODE_GETGAMMA
const __u64 DRM_IOCTL_MODE_GETGAMMA = _DRM_IOCTL_MODE_GETGAMMA;
const __u64 _DRM_IOCTL_MODE_SETGAMMA = DRM_IOCTL_MODE_SETGAMMA;
#undef DRM_IOCTL_MODE_SETGAMMA
const __u64 DRM_IOCTL_MODE_SETGAMMA = _DRM_IOCTL_MODE_SETGAMMA;
const __u64 _DRM_IOCTL_MODE_GETENCODER = DRM_IOCTL_MODE_GETENCODER;
#undef DRM_IOCTL_MODE_GETENCODER
const __u64 DRM_IOCTL_MODE_GETENCODER = _DRM_IOCTL_MODE_GETENCODER;
const __u64 _DRM_IOCTL_MODE_GETCONNECTOR = DRM_IOCTL_MODE_GETCONNECTOR;
#undef DRM_IOCTL_MODE_GETCONNECTOR
const __u64 DRM_IOCTL_MODE_GETCONNECTOR = _DRM_IOCTL_MODE_GETCONNECTOR;
const __u64 _DRM_IOCTL_MODE_ATTACHMODE = DRM_IOCTL_MODE_ATTACHMODE;
#undef DRM_IOCTL_MODE_ATTACHMODE
const __u64 DRM_IOCTL_MODE_ATTACHMODE = _DRM_IOCTL_MODE_ATTACHMODE;
const __u64 _DRM_IOCTL_MODE_DETACHMODE = DRM_IOCTL_MODE_DETACHMODE;
#undef DRM_IOCTL_MODE_DETACHMODE
const __u64 DRM_IOCTL_MODE_DETACHMODE = _DRM_IOCTL_MODE_DETACHMODE;
const __u64 _DRM_IOCTL_MODE_GETPROPERTY = DRM_IOCTL_MODE_GETPROPERTY;
#undef DRM_IOCTL_MODE_GETPROPERTY
const __u64 DRM_IOCTL_MODE_GETPROPERTY = _DRM_IOCTL_MODE_GETPROPERTY;
const __u64 _DRM_IOCTL_MODE_SETPROPERTY = DRM_IOCTL_MODE_SETPROPERTY;
#undef DRM_IOCTL_MODE_SETPROPERTY
const __u64 DRM_IOCTL_MODE_SETPROPERTY = _DRM_IOCTL_MODE_SETPROPERTY;
const __u64 _DRM_IOCTL_MODE_GETPROPBLOB = DRM_IOCTL_MODE_GETPROPBLOB;
#undef DRM_IOCTL_MODE_GETPROPBLOB
const __u64 DRM_IOCTL_MODE_GETPROPBLOB = _DRM_IOCTL_MODE_GETPROPBLOB;
const __u64 _DRM_IOCTL_MODE_GETFB = DRM_IOCTL_MODE_GETFB;
#undef DRM_IOCTL_MODE_GETFB
const __u64 DRM_IOCTL_MODE_GETFB = _DRM_IOCTL_MODE_GETFB;
const __u64 _DRM_IOCTL_MODE_ADDFB = DRM_IOCTL_MODE_ADDFB;
#undef DRM_IOCTL_MODE_ADDFB
const __u64 DRM_IOCTL_MODE_ADDFB = _DRM_IOCTL_MODE_ADDFB;
const __u64 _DRM_IOCTL_MODE_RMFB = DRM_IOCTL_MODE_RMFB;
#undef DRM_IOCTL_MODE_RMFB
const __u64 DRM_IOCTL_MODE_RMFB = _DRM_IOCTL_MODE_RMFB;
const __u64 _DRM_IOCTL_MODE_PAGE_FLIP = DRM_IOCTL_MODE_PAGE_FLIP;
#undef DRM_IOCTL_MODE_PAGE_FLIP
const __u64 DRM_IOCTL_MODE_PAGE_FLIP = _DRM_IOCTL_MODE_PAGE_FLIP;
const __u64 _DRM_IOCTL_MODE_DIRTYFB = DRM_IOCTL_MODE_DIRTYFB;
#undef DRM_IOCTL_MODE_DIRTYFB
const __u64 DRM_IOCTL_MODE_DIRTYFB = _DRM_IOCTL_MODE_DIRTYFB;
const __u64 _DRM_IOCTL_MODE_CREATE_DUMB = DRM_IOCTL_MODE_CREATE_DUMB;
#undef DRM_IOCTL_MODE_CREATE_DUMB
const __u64 DRM_IOCTL_MODE_CREATE_DUMB = _DRM_IOCTL_MODE_CREATE_DUMB;
const __u64 _DRM_IOCTL_MODE_MAP_DUMB = DRM_IOCTL_MODE_MAP_DUMB;
#undef DRM_IOCTL_MODE_MAP_DUMB
const __u64 DRM_IOCTL_MODE_MAP_DUMB = _DRM_IOCTL_MODE_MAP_DUMB;
const __u64 _DRM_IOCTL_MODE_DESTROY_DUMB = DRM_IOCTL_MODE_DESTROY_DUMB;
#undef DRM_IOCTL_MODE_DESTROY_DUMB
const __u64 DRM_IOCTL_MODE_DESTROY_DUMB = _DRM_IOCTL_MODE_DESTROY_DUMB;
const __u64 _DRM_IOCTL_MODE_GETPLANERESOURCES = DRM_IOCTL_MODE_GETPLANERESOURCES;
#undef DRM_IOCTL_MODE_GETPLANERESOURCES
const __u64 DRM_IOCTL_MODE_GETPLANERESOURCES = _DRM_IOCTL_MODE_GETPLANERESOURCES;
const __u64 _DRM_IOCTL_MODE_GETPLANE = DRM_IOCTL_MODE_GETPLANE;
#undef DRM_IOCTL_MODE_GETPLANE
const __u64 DRM_IOCTL_MODE_GETPLANE = _DRM_IOCTL_MODE_GETPLANE;
const __u64 _DRM_IOCTL_MODE_SETPLANE = DRM_IOCTL_MODE_SETPLANE;
#undef DRM_IOCTL_MODE_SETPLANE
const __u64 DRM_IOCTL_MODE_SETPLANE = _DRM_IOCTL_MODE_SETPLANE;
const __u64 _DRM_IOCTL_MODE_ADDFB2 = DRM_IOCTL_MODE_ADDFB2;
#undef DRM_IOCTL_MODE_ADDFB2
const __u64 DRM_IOCTL_MODE_ADDFB2 = _DRM_IOCTL_MODE_ADDFB2;
const __u64 _DRM_IOCTL_MODE_OBJ_GETPROPERTIES = DRM_IOCTL_MODE_OBJ_GETPROPERTIES;
#undef DRM_IOCTL_MODE_OBJ_GETPROPERTIES
const __u64 DRM_IOCTL_MODE_OBJ_GETPROPERTIES = _DRM_IOCTL_MODE_OBJ_GETPROPERTIES;
const __u64 _DRM_IOCTL_MODE_OBJ_SETPROPERTY = DRM_IOCTL_MODE_OBJ_SETPROPERTY;
#undef DRM_IOCTL_MODE_OBJ_SETPROPERTY
const __u64 DRM_IOCTL_MODE_OBJ_SETPROPERTY = _DRM_IOCTL_MODE_OBJ_SETPROPERTY;
const __u64 _DRM_IOCTL_MODE_CURSOR2 = DRM_IOCTL_MODE_CURSOR2;
#undef DRM_IOCTL_MODE_CURSOR2
const __u64 DRM_IOCTL_MODE_CURSOR2 = _DRM_IOCTL_MODE_CURSOR2;
const __u64 _DRM_IOCTL_MODE_ATOMIC = DRM_IOCTL_MODE_ATOMIC;
#undef DRM_IOCTL_MODE_ATOMIC
const __u64 DRM_IOCTL_MODE_ATOMIC = _DRM_IOCTL_MODE_ATOMIC;
const __u64 _DRM_IOCTL_MODE_CREATEPROPBLOB = DRM_IOCTL_MODE_CREATEPROPBLOB;
#undef DRM_IOCTL_MODE_CREATEPROPBLOB
const __u64 DRM_IOCTL_MODE_CREATEPROPBLOB = _DRM_IOCTL_MODE_CREATEPROPBLOB;
const __u64 _DRM_IOCTL_MODE_DESTROYPROPBLOB = DRM_IOCTL_MODE_DESTROYPROPBLOB;
#undef DRM_IOCTL_MODE_DESTROYPROPBLOB
const __u64 DRM_IOCTL_MODE_DESTROYPROPBLOB = _DRM_IOCTL_MODE_DESTROYPROPBLOB;
const __u64 _DRM_IOCTL_SYNCOBJ_CREATE = DRM_IOCTL_SYNCOBJ_CREATE;
#undef DRM_IOCTL_SYNCOBJ_CREATE
const __u64 DRM_IOCTL_SYNCOBJ_CREATE = _DRM_IOCTL_SYNCOBJ_CREATE;
const __u64 _DRM_IOCTL_SYNCOBJ_DESTROY = DRM_IOCTL_SYNCOBJ_DESTROY;
#undef DRM_IOCTL_SYNCOBJ_DESTROY
const __u64 DRM_IOCTL_SYNCOBJ_DESTROY = _DRM_IOCTL_SYNCOBJ_DESTROY;
const __u64 _DRM_IOCTL_SYNCOBJ_HANDLE_TO_FD = DRM_IOCTL_SYNCOBJ_HANDLE_TO_FD;
#undef DRM_IOCTL_SYNCOBJ_HANDLE_TO_FD
const __u64 DRM_IOCTL_SYNCOBJ_HANDLE_TO_FD = _DRM_IOCTL_SYNCOBJ_HANDLE_TO_FD;
const __u64 _DRM_IOCTL_SYNCOBJ_FD_TO_HANDLE = DRM_IOCTL_SYNCOBJ_FD_TO_HANDLE;
#undef DRM_IOCTL_SYNCOBJ_FD_TO_HANDLE
const __u64 DRM_IOCTL_SYNCOBJ_FD_TO_HANDLE = _DRM_IOCTL_SYNCOBJ_FD_TO_HANDLE;
const __u64 _DRM_IOCTL_SYNCOBJ_WAIT = DRM_IOCTL_SYNCOBJ_WAIT;
#undef DRM_IOCTL_SYNCOBJ_WAIT
const __u64 DRM_IOCTL_SYNCOBJ_WAIT = _DRM_IOCTL_SYNCOBJ_WAIT;
const __u64 _DRM_IOCTL_SYNCOBJ_RESET = DRM_IOCTL_SYNCOBJ_RESET;
#undef DRM_IOCTL_SYNCOBJ_RESET
const __u64 DRM_IOCTL_SYNCOBJ_RESET = _DRM_IOCTL_SYNCOBJ_RESET;
const __u64 _DRM_IOCTL_SYNCOBJ_SIGNAL = DRM_IOCTL_SYNCOBJ_SIGNAL;
#undef DRM_IOCTL_SYNCOBJ_SIGNAL
const __u64 DRM_IOCTL_SYNCOBJ_SIGNAL = _DRM_IOCTL_SYNCOBJ_SIGNAL;
const __u64 _DRM_IOCTL_MODE_CREATE_LEASE = DRM_IOCTL_MODE_CREATE_LEASE;
#undef DRM_IOCTL_MODE_CREATE_LEASE
const __u64 DRM_IOCTL_MODE_CREATE_LEASE = _DRM_IOCTL_MODE_CREATE_LEASE;
const __u64 _DRM_IOCTL_MODE_LIST_LESSEES = DRM_IOCTL_MODE_LIST_LESSEES;
#undef DRM_IOCTL_MODE_LIST_LESSEES
const __u64 DRM_IOCTL_MODE_LIST_LESSEES = _DRM_IOCTL_MODE_LIST_LESSEES;
const __u64 _DRM_IOCTL_MODE_GET_LEASE = DRM_IOCTL_MODE_GET_LEASE;
#undef DRM_IOCTL_MODE_GET_LEASE
const __u64 DRM_IOCTL_MODE_GET_LEASE = _DRM_IOCTL_MODE_GET_LEASE;
const __u64 _DRM_IOCTL_MODE_REVOKE_LEASE = DRM_IOCTL_MODE_REVOKE_LEASE;
#undef DRM_IOCTL_MODE_REVOKE_LEASE
const __u64 DRM_IOCTL_MODE_REVOKE_LEASE = _DRM_IOCTL_MODE_REVOKE_LEASE;
const __u64 _DRM_IOCTL_SYNCOBJ_TIMELINE_WAIT = DRM_IOCTL_SYNCOBJ_TIMELINE_WAIT;
#undef DRM_IOCTL_SYNCOBJ_TIMELINE_WAIT
const __u64 DRM_IOCTL_SYNCOBJ_TIMELINE_WAIT = _DRM_IOCTL_SYNCOBJ_TIMELINE_WAIT;
const __u64 _DRM_IOCTL_SYNCOBJ_QUERY = DRM_IOCTL_SYNCOBJ_QUERY;
#undef DRM_IOCTL_SYNCOBJ_QUERY
const __u64 DRM_IOCTL_SYNCOBJ_QUERY = _DRM_IOCTL_SYNCOBJ_QUERY;
const __u64 _DRM_IOCTL_SYNCOBJ_TRANSFER = DRM_IOCTL_SYNCOBJ_TRANSFER;
#undef DRM_IOCTL_SYNCOBJ_TRANSFER
const __u64 DRM_IOCTL_SYNCOBJ_TRANSFER = _DRM_IOCTL_SYNCOBJ_TRANSFER;
const __u64 _DRM_IOCTL_SYNCOBJ_TIMELINE_SIGNAL = DRM_IOCTL_SYNCOBJ_TIMELINE_SIGNAL;
#undef DRM_IOCTL_SYNCOBJ_TIMELINE_SIGNAL
const __u64 DRM_IOCTL_SYNCOBJ_TIMELINE_SIGNAL = _DRM_IOCTL_SYNCOBJ_TIMELINE_SIGNAL;
const __u64 _DRM_IOCTL_MODE_GETFB2 = DRM_IOCTL_MODE_GETFB2;
#undef DRM_IOCTL_MODE_GETFB2
const __u64 DRM_IOCTL_MODE_GETFB2 = _DRM_IOCTL_MODE_GETFB2;
const __u64 _DRM_IOCTL_SYNCOBJ_EVENTFD = DRM_IOCTL_SYNCOBJ_EVENTFD;
#undef DRM_IOCTL_SYNCOBJ_EVENTFD
const __u64 DRM_IOCTL_SYNCOBJ_EVENTFD = _DRM_IOCTL_SYNCOBJ_EVENTFD;
const __u64 _DRM_IOCTL_MODE_CLOSEFB = DRM_IOCTL_MODE_CLOSEFB;
#undef DRM_IOCTL_MODE_CLOSEFB
const __u64 DRM_IOCTL_MODE_CLOSEFB = _DRM_IOCTL_MODE_CLOSEFB;
const __u64 _DRM_IOCTL_I915_INIT = DRM_IOCTL_I915_INIT;
#undef DRM_IOCTL_I915_INIT
const __u64 DRM_IOCTL_I915_INIT = _DRM_IOCTL_I915_INIT;
const __u64 _DRM_IOCTL_I915_FLUSH = DRM_IOCTL_I915_FLUSH;
#undef DRM_IOCTL_I915_FLUSH
const __u64 DRM_IOCTL_I915_FLUSH = _DRM_IOCTL_I915_FLUSH;
const __u64 _DRM_IOCTL_I915_FLIP = DRM_IOCTL_I915_FLIP;
#undef DRM_IOCTL_I915_FLIP
const __u64 DRM_IOCTL_I915_FLIP = _DRM_IOCTL_I915_FLIP;
const __u64 _DRM_IOCTL_I915_BATCHBUFFER = DRM_IOCTL_I915_BATCHBUFFER;
#undef DRM_IOCTL_I915_BATCHBUFFER
const __u64 DRM_IOCTL_I915_BATCHBUFFER = _DRM_IOCTL_I915_BATCHBUFFER;
const __u64 _DRM_IOCTL_I915_IRQ_EMIT = DRM_IOCTL_I915_IRQ_EMIT;
#undef DRM_IOCTL_I915_IRQ_EMIT
const __u64 DRM_IOCTL_I915_IRQ_EMIT = _DRM_IOCTL_I915_IRQ_EMIT;
const __u64 _DRM_IOCTL_I915_IRQ_WAIT = DRM_IOCTL_I915_IRQ_WAIT;
#undef DRM_IOCTL_I915_IRQ_WAIT
const __u64 DRM_IOCTL_I915_IRQ_WAIT = _DRM_IOCTL_I915_IRQ_WAIT;
const __u64 _DRM_IOCTL_I915_GETPARAM = DRM_IOCTL_I915_GETPARAM;
#undef DRM_IOCTL_I915_GETPARAM
const __u64 DRM_IOCTL_I915_GETPARAM = _DRM_IOCTL_I915_GETPARAM;
const __u64 _DRM_IOCTL_I915_SETPARAM = DRM_IOCTL_I915_SETPARAM;
#undef DRM_IOCTL_I915_SETPARAM
const __u64 DRM_IOCTL_I915_SETPARAM = _DRM_IOCTL_I915_SETPARAM;
const __u64 _DRM_IOCTL_I915_ALLOC = DRM_IOCTL_I915_ALLOC;
#undef DRM_IOCTL_I915_ALLOC
const __u64 DRM_IOCTL_I915_ALLOC = _DRM_IOCTL_I915_ALLOC;
const __u64 _DRM_IOCTL_I915_FREE = DRM_IOCTL_I915_FREE;
#undef DRM_IOCTL_I915_FREE
const __u64 DRM_IOCTL_I915_FREE = _DRM_IOCTL_I915_FREE;
const __u64 _DRM_IOCTL_I915_INIT_HEAP = DRM_IOCTL_I915_INIT_HEAP;
#undef DRM_IOCTL_I915_INIT_HEAP
const __u64 DRM_IOCTL_I915_INIT_HEAP = _DRM_IOCTL_I915_INIT_HEAP;
const __u64 _DRM_IOCTL_I915_CMDBUFFER = DRM_IOCTL_I915_CMDBUFFER;
#undef DRM_IOCTL_I915_CMDBUFFER
const __u64 DRM_IOCTL_I915_CMDBUFFER = _DRM_IOCTL_I915_CMDBUFFER;
const __u64 _DRM_IOCTL_I915_DESTROY_HEAP = DRM_IOCTL_I915_DESTROY_HEAP;
#undef DRM_IOCTL_I915_DESTROY_HEAP
const __u64 DRM_IOCTL_I915_DESTROY_HEAP = _DRM_IOCTL_I915_DESTROY_HEAP;
const __u64 _DRM_IOCTL_I915_SET_VBLANK_PIPE = DRM_IOCTL_I915_SET_VBLANK_PIPE;
#undef DRM_IOCTL_I915_SET_VBLANK_PIPE
const __u64 DRM_IOCTL_I915_SET_VBLANK_PIPE = _DRM_IOCTL_I915_SET_VBLANK_PIPE;
const __u64 _DRM_IOCTL_I915_GET_VBLANK_PIPE = DRM_IOCTL_I915_GET_VBLANK_PIPE;
#undef DRM_IOCTL_I915_GET_VBLANK_PIPE
const __u64 DRM_IOCTL_I915_GET_VBLANK_PIPE = _DRM_IOCTL_I915_GET_VBLANK_PIPE;
const __u64 _DRM_IOCTL_I915_VBLANK_SWAP = DRM_IOCTL_I915_VBLANK_SWAP;
#undef DRM_IOCTL_I915_VBLANK_SWAP
const __u64 DRM_IOCTL_I915_VBLANK_SWAP = _DRM_IOCTL_I915_VBLANK_SWAP;
const __u64 _DRM_IOCTL_I915_HWS_ADDR = DRM_IOCTL_I915_HWS_ADDR;
#undef DRM_IOCTL_I915_HWS_ADDR
const __u64 DRM_IOCTL_I915_HWS_ADDR = _DRM_IOCTL_I915_HWS_ADDR;
const __u64 _DRM_IOCTL_I915_GEM_INIT = DRM_IOCTL_I915_GEM_INIT;
#undef DRM_IOCTL_I915_GEM_INIT
const __u64 DRM_IOCTL_I915_GEM_INIT = _DRM_IOCTL_I915_GEM_INIT;
const __u64 _DRM_IOCTL_I915_GEM_EXECBUFFER = DRM_IOCTL_I915_GEM_EXECBUFFER;
#undef DRM_IOCTL_I915_GEM_EXECBUFFER
const __u64 DRM_IOCTL_I915_GEM_EXECBUFFER = _DRM_IOCTL_I915_GEM_EXECBUFFER;
const __u64 _DRM_IOCTL_I915_GEM_EXECBUFFER2 = DRM_IOCTL_I915_GEM_EXECBUFFER2;
#undef DRM_IOCTL_I915_GEM_EXECBUFFER2
const __u64 DRM_IOCTL_I915_GEM_EXECBUFFER2 = _DRM_IOCTL_I915_GEM_EXECBUFFER2;
const __u64 _DRM_IOCTL_I915_GEM_EXECBUFFER2_WR = DRM_IOCTL_I915_GEM_EXECBUFFER2_WR;
#undef DRM_IOCTL_I915_GEM_EXECBUFFER2_WR
const __u64 DRM_IOCTL_I915_GEM_EXECBUFFER2_WR = _DRM_IOCTL_I915_GEM_EXECBUFFER2_WR;
const __u64 _DRM_IOCTL_I915_GEM_PIN = DRM_IOCTL_I915_GEM_PIN;
#undef DRM_IOCTL_I915_GEM_PIN
const __u64 DRM_IOCTL_I915_GEM_PIN = _DRM_IOCTL_I915_GEM_PIN;
const __u64 _DRM_IOCTL_I915_GEM_UNPIN = DRM_IOCTL_I915_GEM_UNPIN;
#undef DRM_IOCTL_I915_GEM_UNPIN
const __u64 DRM_IOCTL_I915_GEM_UNPIN = _DRM_IOCTL_I915_GEM_UNPIN;
const __u64 _DRM_IOCTL_I915_GEM_BUSY = DRM_IOCTL_I915_GEM_BUSY;
#undef DRM_IOCTL_I915_GEM_BUSY
const __u64 DRM_IOCTL_I915_GEM_BUSY = _DRM_IOCTL_I915_GEM_BUSY;
const __u64 _DRM_IOCTL_I915_GEM_SET_CACHING = DRM_IOCTL_I915_GEM_SET_CACHING;
#undef DRM_IOCTL_I915_GEM_SET_CACHING
const __u64 DRM_IOCTL_I915_GEM_SET_CACHING = _DRM_IOCTL_I915_GEM_SET_CACHING;
const __u64 _DRM_IOCTL_I915_GEM_GET_CACHING = DRM_IOCTL_I915_GEM_GET_CACHING;
#undef DRM_IOCTL_I915_GEM_GET_CACHING
const __u64 DRM_IOCTL_I915_GEM_GET_CACHING = _DRM_IOCTL_I915_GEM_GET_CACHING;
const __u64 _DRM_IOCTL_I915_GEM_THROTTLE = DRM_IOCTL_I915_GEM_THROTTLE;
#undef DRM_IOCTL_I915_GEM_THROTTLE
const __u64 DRM_IOCTL_I915_GEM_THROTTLE = _DRM_IOCTL_I915_GEM_THROTTLE;
const __u64 _DRM_IOCTL_I915_GEM_ENTERVT = DRM_IOCTL_I915_GEM_ENTERVT;
#undef DRM_IOCTL_I915_GEM_ENTERVT
const __u64 DRM_IOCTL_I915_GEM_ENTERVT = _DRM_IOCTL_I915_GEM_ENTERVT;
const __u64 _DRM_IOCTL_I915_GEM_LEAVEVT = DRM_IOCTL_I915_GEM_LEAVEVT;
#undef DRM_IOCTL_I915_GEM_LEAVEVT
const __u64 DRM_IOCTL_I915_GEM_LEAVEVT = _DRM_IOCTL_I915_GEM_LEAVEVT;
const __u64 _DRM_IOCTL_I915_GEM_CREATE = DRM_IOCTL_I915_GEM_CREATE;
#undef DRM_IOCTL_I915_GEM_CREATE
const __u64 DRM_IOCTL_I915_GEM_CREATE = _DRM_IOCTL_I915_GEM_CREATE;
const __u64 _DRM_IOCTL_I915_GEM_CREATE_EXT = DRM_IOCTL_I915_GEM_CREATE_EXT;
#undef DRM_IOCTL_I915_GEM_CREATE_EXT
const __u64 DRM_IOCTL_I915_GEM_CREATE_EXT = _DRM_IOCTL_I915_GEM_CREATE_EXT;
const __u64 _DRM_IOCTL_I915_GEM_PREAD = DRM_IOCTL_I915_GEM_PREAD;
#undef DRM_IOCTL_I915_GEM_PREAD
const __u64 DRM_IOCTL_I915_GEM_PREAD = _DRM_IOCTL_I915_GEM_PREAD;
const __u64 _DRM_IOCTL_I915_GEM_PWRITE = DRM_IOCTL_I915_GEM_PWRITE;
#undef DRM_IOCTL_I915_GEM_PWRITE
const __u64 DRM_IOCTL_I915_GEM_PWRITE = _DRM_IOCTL_I915_GEM_PWRITE;
const __u64 _DRM_IOCTL_I915_GEM_MMAP = DRM_IOCTL_I915_GEM_MMAP;
#undef DRM_IOCTL_I915_GEM_MMAP
const __u64 DRM_IOCTL_I915_GEM_MMAP = _DRM_IOCTL_I915_GEM_MMAP;
const __u64 _DRM_IOCTL_I915_GEM_MMAP_GTT = DRM_IOCTL_I915_GEM_MMAP_GTT;
#undef DRM_IOCTL_I915_GEM_MMAP_GTT
const __u64 DRM_IOCTL_I915_GEM_MMAP_GTT = _DRM_IOCTL_I915_GEM_MMAP_GTT;
const __u64 _DRM_IOCTL_I915_GEM_MMAP_OFFSET = DRM_IOCTL_I915_GEM_MMAP_OFFSET;
#undef DRM_IOCTL_I915_GEM_MMAP_OFFSET
const __u64 DRM_IOCTL_I915_GEM_MMAP_OFFSET = _DRM_IOCTL_I915_GEM_MMAP_OFFSET;
const __u64 _DRM_IOCTL_I915_GEM_SET_DOMAIN = DRM_IOCTL_I915_GEM_SET_DOMAIN;
#undef DRM_IOCTL_I915_GEM_SET_DOMAIN
const __u64 DRM_IOCTL_I915_GEM_SET_DOMAIN = _DRM_IOCTL_I915_GEM_SET_DOMAIN;
const __u64 _DRM_IOCTL_I915_GEM_SW_FINISH = DRM_IOCTL_I915_GEM_SW_FINISH;
#undef DRM_IOCTL_I915_GEM_SW_FINISH
const __u64 DRM_IOCTL_I915_GEM_SW_FINISH = _DRM_IOCTL_I915_GEM_SW_FINISH;
const __u64 _DRM_IOCTL_I915_GEM_SET_TILING = DRM_IOCTL_I915_GEM_SET_TILING;
#undef DRM_IOCTL_I915_GEM_SET_TILING
const __u64 DRM_IOCTL_I915_GEM_SET_TILING = _DRM_IOCTL_I915_GEM_SET_TILING;
const __u64 _DRM_IOCTL_I915_GEM_GET_TILING = DRM_IOCTL_I915_GEM_GET_TILING;
#undef DRM_IOCTL_I915_GEM_GET_TILING
const __u64 DRM_IOCTL_I915_GEM_GET_TILING = _DRM_IOCTL_I915_GEM_GET_TILING;
const __u64 _DRM_IOCTL_I915_GEM_GET_APERTURE = DRM_IOCTL_I915_GEM_GET_APERTURE;
#undef DRM_IOCTL_I915_GEM_GET_APERTURE
const __u64 DRM_IOCTL_I915_GEM_GET_APERTURE = _DRM_IOCTL_I915_GEM_GET_APERTURE;
const __u64 _DRM_IOCTL_I915_GET_PIPE_FROM_CRTC_ID = DRM_IOCTL_I915_GET_PIPE_FROM_CRTC_ID;
#undef DRM_IOCTL_I915_GET_PIPE_FROM_CRTC_ID
const __u64 DRM_IOCTL_I915_GET_PIPE_FROM_CRTC_ID = _DRM_IOCTL_I915_GET_PIPE_FROM_CRTC_ID;
const __u64 _DRM_IOCTL_I915_GEM_MADVISE = DRM_IOCTL_I915_GEM_MADVISE;
#undef DRM_IOCTL_I915_GEM_MADVISE
const __u64 DRM_IOCTL_I915_GEM_MADVISE = _DRM_IOCTL_I915_GEM_MADVISE;
const __u64 _DRM_IOCTL_I915_OVERLAY_PUT_IMAGE = DRM_IOCTL_I915_OVERLAY_PUT_IMAGE;
#undef DRM_IOCTL_I915_OVERLAY_PUT_IMAGE
const __u64 DRM_IOCTL_I915_OVERLAY_PUT_IMAGE = _DRM_IOCTL_I915_OVERLAY_PUT_IMAGE;
const __u64 _DRM_IOCTL_I915_OVERLAY_ATTRS = DRM_IOCTL_I915_OVERLAY_ATTRS;
#undef DRM_IOCTL_I915_OVERLAY_ATTRS
const __u64 DRM_IOCTL_I915_OVERLAY_ATTRS = _DRM_IOCTL_I915_OVERLAY_ATTRS;
const __u64 _DRM_IOCTL_I915_SET_SPRITE_COLORKEY = DRM_IOCTL_I915_SET_SPRITE_COLORKEY;
#undef DRM_IOCTL_I915_SET_SPRITE_COLORKEY
const __u64 DRM_IOCTL_I915_SET_SPRITE_COLORKEY = _DRM_IOCTL_I915_SET_SPRITE_COLORKEY;
const __u64 _DRM_IOCTL_I915_GET_SPRITE_COLORKEY = DRM_IOCTL_I915_GET_SPRITE_COLORKEY;
#undef DRM_IOCTL_I915_GET_SPRITE_COLORKEY
const __u64 DRM_IOCTL_I915_GET_SPRITE_COLORKEY = _DRM_IOCTL_I915_GET_SPRITE_COLORKEY;
const __u64 _DRM_IOCTL_I915_GEM_WAIT = DRM_IOCTL_I915_GEM_WAIT;
#undef DRM_IOCTL_I915_GEM_WAIT
const __u64 DRM_IOCTL_I915_GEM_WAIT = _DRM_IOCTL_I915_GEM_WAIT;
const __u64 _DRM_IOCTL_I915_GEM_CONTEXT_CREATE = DRM_IOCTL_I915_GEM_CONTEXT_CREATE;
#undef DRM_IOCTL_I915_GEM_CONTEXT_CREATE
const __u64 DRM_IOCTL_I915_GEM_CONTEXT_CREATE = _DRM_IOCTL_I915_GEM_CONTEXT_CREATE;
const __u64 _DRM_IOCTL_I915_GEM_CONTEXT_CREATE_EXT = DRM_IOCTL_I915_GEM_CONTEXT_CREATE_EXT;
#undef DRM_IOCTL_I915_GEM_CONTEXT_CREATE_EXT
const __u64 DRM_IOCTL_I915_GEM_CONTEXT_CREATE_EXT = _DRM_IOCTL_I915_GEM_CONTEXT_CREATE_EXT;
const __u64 _DRM_IOCTL_I915_GEM_CONTEXT_DESTROY = DRM_IOCTL_I915_GEM_CONTEXT_DESTROY;
#undef DRM_IOCTL_I915_GEM_CONTEXT_DESTROY
const __u64 DRM_IOCTL_I915_GEM_CONTEXT_DESTROY = _DRM_IOCTL_I915_GEM_CONTEXT_DESTROY;
const __u64 _DRM_IOCTL_I915_REG_READ = DRM_IOCTL_I915_REG_READ;
#undef DRM_IOCTL_I915_REG_READ
const __u64 DRM_IOCTL_I915_REG_READ = _DRM_IOCTL_I915_REG_READ;
const __u64 _DRM_IOCTL_I915_GET_RESET_STATS = DRM_IOCTL_I915_GET_RESET_STATS;
#undef DRM_IOCTL_I915_GET_RESET_STATS
const __u64 DRM_IOCTL_I915_GET_RESET_STATS = _DRM_IOCTL_I915_GET_RESET_STATS;
const __u64 _DRM_IOCTL_I915_GEM_USERPTR = DRM_IOCTL_I915_GEM_USERPTR;
#undef DRM_IOCTL_I915_GEM_USERPTR
const __u64 DRM_IOCTL_I915_GEM_USERPTR = _DRM_IOCTL_I915_GEM_USERPTR;
const __u64 _DRM_IOCTL_I915_GEM_CONTEXT_GETPARAM = DRM_IOCTL_I915_GEM_CONTEXT_GETPARAM;
#undef DRM_IOCTL_I915_GEM_CONTEXT_GETPARAM
const __u64 DRM_IOCTL_I915_GEM_CONTEXT_GETPARAM = _DRM_IOCTL_I915_GEM_CONTEXT_GETPARAM;
const __u64 _DRM_IOCTL_I915_GEM_CONTEXT_SETPARAM = DRM_IOCTL_I915_GEM_CONTEXT_SETPARAM;
#undef DRM_IOCTL_I915_GEM_CONTEXT_SETPARAM
const __u64 DRM_IOCTL_I915_GEM_CONTEXT_SETPARAM = _DRM_IOCTL_I915_GEM_CONTEXT_SETPARAM;
const __u64 _DRM_IOCTL_I915_PERF_OPEN = DRM_IOCTL_I915_PERF_OPEN;
#undef DRM_IOCTL_I915_PERF_OPEN
const __u64 DRM_IOCTL_I915_PERF_OPEN = _DRM_IOCTL_I915_PERF_OPEN;
const __u64 _DRM_IOCTL_I915_PERF_ADD_CONFIG = DRM_IOCTL_I915_PERF_ADD_CONFIG;
#undef DRM_IOCTL_I915_PERF_ADD_CONFIG
const __u64 DRM_IOCTL_I915_PERF_ADD_CONFIG = _DRM_IOCTL_I915_PERF_ADD_CONFIG;
const __u64 _DRM_IOCTL_I915_PERF_REMOVE_CONFIG = DRM_IOCTL_I915_PERF_REMOVE_CONFIG;
#undef DRM_IOCTL_I915_PERF_REMOVE_CONFIG
const __u64 DRM_IOCTL_I915_PERF_REMOVE_CONFIG = _DRM_IOCTL_I915_PERF_REMOVE_CONFIG;
const __u64 _DRM_IOCTL_I915_QUERY = DRM_IOCTL_I915_QUERY;
#undef DRM_IOCTL_I915_QUERY
const __u64 DRM_IOCTL_I915_QUERY = _DRM_IOCTL_I915_QUERY;
const __u64 _DRM_IOCTL_I915_GEM_VM_CREATE = DRM_IOCTL_I915_GEM_VM_CREATE;
#undef DRM_IOCTL_I915_GEM_VM_CREATE
const __u64 DRM_IOCTL_I915_GEM_VM_CREATE = _DRM_IOCTL_I915_GEM_VM_CREATE;
const __u64 _DRM_IOCTL_I915_GEM_VM_DESTROY = DRM_IOCTL_I915_GEM_VM_DESTROY;
#undef DRM_IOCTL_I915_GEM_VM_DESTROY
const __u64 DRM_IOCTL_I915_GEM_VM_DESTROY = _DRM_IOCTL_I915_GEM_VM_DESTROY;

@ -1,3 +1,7 @@
echo "#include <libdrm/drm.h>"
echo "#include <libdrm/i915_drm.h>"
echo
FILES=$(rg 'DRM_IO(.?)(.?)\(0' /usr/include/libdrm/drm.h | awk '{print $2}')
for F in $FILES; do
echo "const __u64 _$F = $F;"

Loading…
Cancel
Save