1655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng/****************************************************************************
2655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng ****************************************************************************
3655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng ***
4655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng ***   This header was automatically generated from a Linux kernel header
5655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng ***   of the same name, to make information necessary for userspace to
6655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng ***   call into the kernel available to libc.  It contains only constants,
7655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng ***   structures, and macros generated from the original header, and thus,
8655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng ***   contains no copyrightable information.
9655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng ***
10655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng ***   To edit the content of this header, modify the corresponding
11655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng ***   source file (e.g. under external/kernel-headers/original/) then
12655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng ***   run bionic/libc/kernel/tools/update_all.py
13655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng ***
14655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng ***   Any manual change here will be lost the next time this script will
15655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng ***   be run. You've been warned!
16655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng ***
17655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng ****************************************************************************
18655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng ****************************************************************************/
19655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#ifndef _DRM_H_
20655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define _DRM_H_
21655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#ifdef __linux__
22655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#include <linux/types.h>
23655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#include <asm/ioctl.h>
24655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengtypedef unsigned int drm_handle_t;
25655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#else
26655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#include <sys/ioccom.h>
27655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#include <sys/types.h>
28655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengtypedef int8_t __s8;
29655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengtypedef uint8_t __u8;
30655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengtypedef int16_t __s16;
31655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengtypedef uint16_t __u16;
32655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengtypedef int32_t __s32;
33655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengtypedef uint32_t __u32;
34655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengtypedef int64_t __s64;
35655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengtypedef uint64_t __u64;
36106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferristypedef size_t __kernel_size_t;
37655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengtypedef unsigned long drm_handle_t;
38655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#endif
39106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris#ifdef __cplusplus
40106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris#endif
41106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris#define DRM_NAME "drm"
42655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define DRM_MIN_ORDER 5
43655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define DRM_MAX_ORDER 22
44655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define DRM_RAM_PERCENT 10
45655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define _DRM_LOCK_HELD 0x80000000U
46655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define _DRM_LOCK_CONT 0x40000000U
47655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define _DRM_LOCK_IS_HELD(lock) ((lock) & _DRM_LOCK_HELD)
48655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define _DRM_LOCK_IS_CONT(lock) ((lock) & _DRM_LOCK_CONT)
49d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao#define _DRM_LOCKING_CONTEXT(lock) ((lock) & ~(_DRM_LOCK_HELD | _DRM_LOCK_CONT))
50655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengtypedef unsigned int drm_context_t;
51655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengtypedef unsigned int drm_drawable_t;
52655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengtypedef unsigned int drm_magic_t;
53655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengstruct drm_clip_rect {
54d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  unsigned short x1;
55d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  unsigned short y1;
56d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  unsigned short x2;
57d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  unsigned short y2;
58655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng};
59655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengstruct drm_drawable_info {
60d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  unsigned int num_rects;
61d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  struct drm_clip_rect * rects;
62655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng};
63655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengstruct drm_tex_region {
64d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  unsigned char next;
65d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  unsigned char prev;
66d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  unsigned char in_use;
67d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  unsigned char padding;
68d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  unsigned int age;
69655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng};
70655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengstruct drm_hw_lock {
71d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  __volatile__ unsigned int lock;
72d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  char padding[60];
73655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng};
74655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengstruct drm_version {
75d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  int version_major;
76d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  int version_minor;
77d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  int version_patchlevel;
78106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  __kernel_size_t name_len;
79d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  char __user * name;
80106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  __kernel_size_t date_len;
81d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  char __user * date;
82106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  __kernel_size_t desc_len;
83d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  char __user * desc;
84655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng};
85655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengstruct drm_unique {
86106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  __kernel_size_t unique_len;
87d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  char __user * unique;
88655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng};
89655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengstruct drm_list {
90d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  int count;
91d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  struct drm_version __user * version;
92655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng};
93655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengstruct drm_block {
94d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  int unused;
95655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng};
96655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengstruct drm_control {
97d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  enum {
98d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao    DRM_ADD_COMMAND,
99d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao    DRM_RM_COMMAND,
100d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao    DRM_INST_HANDLER,
101d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao    DRM_UNINST_HANDLER
102d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  } func;
103d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  int irq;
104655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng};
105655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengenum drm_map_type {
106d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  _DRM_FRAME_BUFFER = 0,
107d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  _DRM_REGISTERS = 1,
108d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  _DRM_SHM = 2,
109d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  _DRM_AGP = 3,
110d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  _DRM_SCATTER_GATHER = 4,
111106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  _DRM_CONSISTENT = 5
112655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng};
113655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengenum drm_map_flags {
114d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  _DRM_RESTRICTED = 0x01,
115d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  _DRM_READ_ONLY = 0x02,
116d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  _DRM_LOCKED = 0x04,
117d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  _DRM_KERNEL = 0x08,
118d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  _DRM_WRITE_COMBINING = 0x10,
119d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  _DRM_CONTAINS_LOCK = 0x20,
120d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  _DRM_REMOVABLE = 0x40,
121d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  _DRM_DRIVER = 0x80
122655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng};
123655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengstruct drm_ctx_priv_map {
124d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  unsigned int ctx_id;
125d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  void * handle;
126655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng};
127655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengstruct drm_map {
128d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  unsigned long offset;
129d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  unsigned long size;
130d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  enum drm_map_type type;
131d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  enum drm_map_flags flags;
132d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  void * handle;
133d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  int mtrr;
134655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng};
135655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengstruct drm_client {
136d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  int idx;
137d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  int auth;
138d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  unsigned long pid;
139d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  unsigned long uid;
140d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  unsigned long magic;
141d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  unsigned long iocs;
142655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng};
143655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengenum drm_stat_type {
144d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  _DRM_STAT_LOCK,
145d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  _DRM_STAT_OPENS,
146d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  _DRM_STAT_CLOSES,
147d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  _DRM_STAT_IOCTLS,
148d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  _DRM_STAT_LOCKS,
149d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  _DRM_STAT_UNLOCKS,
150d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  _DRM_STAT_VALUE,
151d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  _DRM_STAT_BYTE,
152d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  _DRM_STAT_COUNT,
153d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  _DRM_STAT_IRQ,
154d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  _DRM_STAT_PRIMARY,
155d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  _DRM_STAT_SECONDARY,
156d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  _DRM_STAT_DMA,
157d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  _DRM_STAT_SPECIAL,
158d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  _DRM_STAT_MISSED
159655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng};
160655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengstruct drm_stats {
161d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  unsigned long count;
162d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  struct {
163d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao    unsigned long value;
164d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao    enum drm_stat_type type;
165d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  } data[15];
166655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng};
167655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengenum drm_lock_flags {
168d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  _DRM_LOCK_READY = 0x01,
169d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  _DRM_LOCK_QUIESCENT = 0x02,
170d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  _DRM_LOCK_FLUSH = 0x04,
171d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  _DRM_LOCK_FLUSH_ALL = 0x08,
172d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  _DRM_HALT_ALL_QUEUES = 0x10,
173d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  _DRM_HALT_CUR_QUEUES = 0x20
174655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng};
175655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengstruct drm_lock {
176d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  int context;
177d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  enum drm_lock_flags flags;
178655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng};
179655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengenum drm_dma_flags {
180d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  _DRM_DMA_BLOCK = 0x01,
181d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  _DRM_DMA_WHILE_LOCKED = 0x02,
182d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  _DRM_DMA_PRIORITY = 0x04,
183d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  _DRM_DMA_WAIT = 0x10,
184d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  _DRM_DMA_SMALLER_OK = 0x20,
185d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  _DRM_DMA_LARGER_OK = 0x40
186655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng};
187655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengstruct drm_buf_desc {
188d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  int count;
189d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  int size;
190d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  int low_mark;
191d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  int high_mark;
192d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  enum {
193d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao    _DRM_PAGE_ALIGN = 0x01,
194d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao    _DRM_AGP_BUFFER = 0x02,
195d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao    _DRM_SG_BUFFER = 0x04,
196d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao    _DRM_FB_BUFFER = 0x08,
197d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao    _DRM_PCI_BUFFER_RO = 0x10
198d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  } flags;
199d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  unsigned long agp_start;
200655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng};
201655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengstruct drm_buf_info {
202d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  int count;
203d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  struct drm_buf_desc __user * list;
204655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng};
205655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengstruct drm_buf_free {
206d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  int count;
207d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  int __user * list;
208655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng};
209655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengstruct drm_buf_pub {
210d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  int idx;
211d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  int total;
212d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  int used;
213d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  void __user * address;
214655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng};
215655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengstruct drm_buf_map {
216d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  int count;
217106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris#ifdef __cplusplus
218106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  void __user * virt;
219106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris#else
220106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  void __user * __linux_virtual;
221106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris#endif
222d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  struct drm_buf_pub __user * list;
223655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng};
224655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengstruct drm_dma {
225d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  int context;
226d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  int send_count;
227d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  int __user * send_indices;
228d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  int __user * send_sizes;
229d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  enum drm_dma_flags flags;
230d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  int request_count;
231d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  int request_size;
232d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  int __user * request_indices;
233d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  int __user * request_sizes;
234d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  int granted_count;
235655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng};
236655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengenum drm_ctx_flags {
237d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  _DRM_CONTEXT_PRESERVED = 0x01,
238d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  _DRM_CONTEXT_2DONLY = 0x02
239655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng};
240655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengstruct drm_ctx {
241d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  drm_context_t handle;
242d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  enum drm_ctx_flags flags;
243655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng};
244655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengstruct drm_ctx_res {
245d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  int count;
246d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  struct drm_ctx __user * contexts;
247655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng};
248655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengstruct drm_draw {
249d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  drm_drawable_t handle;
250655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng};
251655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengtypedef enum {
252106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris  DRM_DRAWABLE_CLIPRECTS
253655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng} drm_drawable_info_type_t;
254655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengstruct drm_update_draw {
255d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  drm_drawable_t handle;
256d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  unsigned int type;
257d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  unsigned int num;
258d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  unsigned long long data;
259655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng};
260655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengstruct drm_auth {
261d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  drm_magic_t magic;
262655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng};
263655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengstruct drm_irq_busid {
264d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  int irq;
265d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  int busnum;
266d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  int devnum;
267d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  int funcnum;
268655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng};
269655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengenum drm_vblank_seq_type {
270d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  _DRM_VBLANK_ABSOLUTE = 0x0,
271d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  _DRM_VBLANK_RELATIVE = 0x1,
272d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  _DRM_VBLANK_HIGH_CRTC_MASK = 0x0000003e,
273d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  _DRM_VBLANK_EVENT = 0x4000000,
274d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  _DRM_VBLANK_FLIP = 0x8000000,
275d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  _DRM_VBLANK_NEXTONMISS = 0x10000000,
276d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  _DRM_VBLANK_SECONDARY = 0x20000000,
277d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  _DRM_VBLANK_SIGNAL = 0x40000000
278655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng};
279655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define _DRM_VBLANK_HIGH_CRTC_SHIFT 1
280655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define _DRM_VBLANK_TYPES_MASK (_DRM_VBLANK_ABSOLUTE | _DRM_VBLANK_RELATIVE)
281d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao#define _DRM_VBLANK_FLAGS_MASK (_DRM_VBLANK_EVENT | _DRM_VBLANK_SIGNAL | _DRM_VBLANK_SECONDARY | _DRM_VBLANK_NEXTONMISS)
282655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengstruct drm_wait_vblank_request {
283d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  enum drm_vblank_seq_type type;
284d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  unsigned int sequence;
285d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  unsigned long signal;
286655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng};
287655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengstruct drm_wait_vblank_reply {
288d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  enum drm_vblank_seq_type type;
289d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  unsigned int sequence;
290d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  long tval_sec;
291d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  long tval_usec;
292655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng};
293655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengunion drm_wait_vblank {
294d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  struct drm_wait_vblank_request request;
295d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  struct drm_wait_vblank_reply reply;
296655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng};
297655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define _DRM_PRE_MODESET 1
298655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define _DRM_POST_MODESET 2
299655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengstruct drm_modeset_ctl {
300d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  __u32 crtc;
301d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  __u32 cmd;
302655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng};
303655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengstruct drm_agp_mode {
304d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  unsigned long mode;
305655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng};
306655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengstruct drm_agp_buffer {
307d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  unsigned long size;
308d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  unsigned long handle;
309d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  unsigned long type;
310d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  unsigned long physical;
311655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng};
312655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengstruct drm_agp_binding {
313d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  unsigned long handle;
314d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  unsigned long offset;
315655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng};
316655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengstruct drm_agp_info {
317d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  int agp_version_major;
318d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  int agp_version_minor;
319d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  unsigned long mode;
320d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  unsigned long aperture_base;
321d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  unsigned long aperture_size;
322d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  unsigned long memory_allowed;
323d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  unsigned long memory_used;
324d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  unsigned short id_vendor;
325d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  unsigned short id_device;
326655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng};
327655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengstruct drm_scatter_gather {
328d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  unsigned long size;
329d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  unsigned long handle;
330655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng};
331655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengstruct drm_set_version {
332d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  int drm_di_major;
333d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  int drm_di_minor;
334d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  int drm_dd_major;
335d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  int drm_dd_minor;
336655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng};
337655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengstruct drm_gem_close {
338d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  __u32 handle;
339d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  __u32 pad;
340655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng};
341655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengstruct drm_gem_flink {
342d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  __u32 handle;
343d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  __u32 name;
344655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng};
345655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengstruct drm_gem_open {
346d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  __u32 name;
347d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  __u32 handle;
348d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  __u64 size;
349655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng};
35038062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define DRM_CAP_DUMB_BUFFER 0x1
35138062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define DRM_CAP_VBLANK_HIGH_CRTC 0x2
35238062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define DRM_CAP_DUMB_PREFERRED_DEPTH 0x3
35338062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define DRM_CAP_DUMB_PREFER_SHADOW 0x4
35438062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define DRM_CAP_PRIME 0x5
35538062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define DRM_PRIME_CAP_IMPORT 0x1
35638062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define DRM_PRIME_CAP_EXPORT 0x2
35738062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define DRM_CAP_TIMESTAMP_MONOTONIC 0x6
35838062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define DRM_CAP_ASYNC_PAGE_FLIP 0x7
35938062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define DRM_CAP_CURSOR_WIDTH 0x8
36038062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define DRM_CAP_CURSOR_HEIGHT 0x9
36105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define DRM_CAP_ADDFB2_MODIFIERS 0x10
3626a9755d20a995756487bb1aafb7e954f4fd868a7Christopher Ferris#define DRM_CAP_PAGE_FLIP_TARGET 0x11
363525ce914edf136d2bd02ac8c404d56c52e737f4dChristopher Ferris#define DRM_CAP_CRTC_IN_VBLANK_EVENT 0x12
3641308ad3ab33294c3abfd96da12b6df58b381ce52Christopher Ferris#define DRM_CAP_SYNCOBJ 0x13
3656a9755d20a995756487bb1aafb7e954f4fd868a7Christopher Ferrisstruct drm_get_cap {
366d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  __u64 capability;
367d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  __u64 value;
36838062f954c637861348dd8078cefb73554e6f12cChristopher Ferris};
3696a9755d20a995756487bb1aafb7e954f4fd868a7Christopher Ferris#define DRM_CLIENT_CAP_STEREO_3D 1
370ba8d4f460b51161eb82cf1006cb34a3cc1389f47Christopher Ferris#define DRM_CLIENT_CAP_UNIVERSAL_PLANES 2
37105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define DRM_CLIENT_CAP_ATOMIC 3
37238062f954c637861348dd8078cefb73554e6f12cChristopher Ferrisstruct drm_set_client_cap {
3736a9755d20a995756487bb1aafb7e954f4fd868a7Christopher Ferris  __u64 capability;
374d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  __u64 value;
375ba8d4f460b51161eb82cf1006cb34a3cc1389f47Christopher Ferris};
376106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris#define DRM_RDWR O_RDWR
3776a9755d20a995756487bb1aafb7e954f4fd868a7Christopher Ferris#define DRM_CLOEXEC O_CLOEXEC
378655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengstruct drm_prime_handle {
379d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  __u32 handle;
380d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  __u32 flags;
3816a9755d20a995756487bb1aafb7e954f4fd868a7Christopher Ferris  __s32 fd;
382655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng};
3831308ad3ab33294c3abfd96da12b6df58b381ce52Christopher Ferrisstruct drm_syncobj_create {
3841308ad3ab33294c3abfd96da12b6df58b381ce52Christopher Ferris  __u32 handle;
3851308ad3ab33294c3abfd96da12b6df58b381ce52Christopher Ferris#define DRM_SYNCOBJ_CREATE_SIGNALED (1 << 0)
3861308ad3ab33294c3abfd96da12b6df58b381ce52Christopher Ferris  __u32 flags;
3871308ad3ab33294c3abfd96da12b6df58b381ce52Christopher Ferris};
3881308ad3ab33294c3abfd96da12b6df58b381ce52Christopher Ferrisstruct drm_syncobj_destroy {
3891308ad3ab33294c3abfd96da12b6df58b381ce52Christopher Ferris  __u32 handle;
3901308ad3ab33294c3abfd96da12b6df58b381ce52Christopher Ferris  __u32 pad;
3911308ad3ab33294c3abfd96da12b6df58b381ce52Christopher Ferris};
3921308ad3ab33294c3abfd96da12b6df58b381ce52Christopher Ferris#define DRM_SYNCOBJ_FD_TO_HANDLE_FLAGS_IMPORT_SYNC_FILE (1 << 0)
3931308ad3ab33294c3abfd96da12b6df58b381ce52Christopher Ferris#define DRM_SYNCOBJ_HANDLE_TO_FD_FLAGS_EXPORT_SYNC_FILE (1 << 0)
3941308ad3ab33294c3abfd96da12b6df58b381ce52Christopher Ferrisstruct drm_syncobj_handle {
3951308ad3ab33294c3abfd96da12b6df58b381ce52Christopher Ferris  __u32 handle;
3961308ad3ab33294c3abfd96da12b6df58b381ce52Christopher Ferris  __u32 flags;
3971308ad3ab33294c3abfd96da12b6df58b381ce52Christopher Ferris  __s32 fd;
3981308ad3ab33294c3abfd96da12b6df58b381ce52Christopher Ferris  __u32 pad;
3991308ad3ab33294c3abfd96da12b6df58b381ce52Christopher Ferris};
4001308ad3ab33294c3abfd96da12b6df58b381ce52Christopher Ferris#define DRM_SYNCOBJ_WAIT_FLAGS_WAIT_ALL (1 << 0)
4011308ad3ab33294c3abfd96da12b6df58b381ce52Christopher Ferris#define DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT (1 << 1)
4021308ad3ab33294c3abfd96da12b6df58b381ce52Christopher Ferrisstruct drm_syncobj_wait {
4031308ad3ab33294c3abfd96da12b6df58b381ce52Christopher Ferris  __u64 handles;
4041308ad3ab33294c3abfd96da12b6df58b381ce52Christopher Ferris  __s64 timeout_nsec;
4051308ad3ab33294c3abfd96da12b6df58b381ce52Christopher Ferris  __u32 count_handles;
4061308ad3ab33294c3abfd96da12b6df58b381ce52Christopher Ferris  __u32 flags;
4071308ad3ab33294c3abfd96da12b6df58b381ce52Christopher Ferris  __u32 first_signaled;
4081308ad3ab33294c3abfd96da12b6df58b381ce52Christopher Ferris  __u32 pad;
4091308ad3ab33294c3abfd96da12b6df58b381ce52Christopher Ferris};
4101308ad3ab33294c3abfd96da12b6df58b381ce52Christopher Ferrisstruct drm_syncobj_array {
4111308ad3ab33294c3abfd96da12b6df58b381ce52Christopher Ferris  __u64 handles;
4121308ad3ab33294c3abfd96da12b6df58b381ce52Christopher Ferris  __u32 count_handles;
4131308ad3ab33294c3abfd96da12b6df58b381ce52Christopher Ferris  __u32 pad;
4141308ad3ab33294c3abfd96da12b6df58b381ce52Christopher Ferris};
415934ec9495505d234b2c2fa284470c2f44aae9de9Christopher Ferrisstruct drm_crtc_get_sequence {
416934ec9495505d234b2c2fa284470c2f44aae9de9Christopher Ferris  __u32 crtc_id;
417934ec9495505d234b2c2fa284470c2f44aae9de9Christopher Ferris  __u32 active;
418934ec9495505d234b2c2fa284470c2f44aae9de9Christopher Ferris  __u64 sequence;
419934ec9495505d234b2c2fa284470c2f44aae9de9Christopher Ferris  __s64 sequence_ns;
420934ec9495505d234b2c2fa284470c2f44aae9de9Christopher Ferris};
421934ec9495505d234b2c2fa284470c2f44aae9de9Christopher Ferris#define DRM_CRTC_SEQUENCE_RELATIVE 0x00000001
422934ec9495505d234b2c2fa284470c2f44aae9de9Christopher Ferris#define DRM_CRTC_SEQUENCE_NEXT_ON_MISS 0x00000002
423934ec9495505d234b2c2fa284470c2f44aae9de9Christopher Ferrisstruct drm_crtc_queue_sequence {
424934ec9495505d234b2c2fa284470c2f44aae9de9Christopher Ferris  __u32 crtc_id;
425934ec9495505d234b2c2fa284470c2f44aae9de9Christopher Ferris  __u32 flags;
426934ec9495505d234b2c2fa284470c2f44aae9de9Christopher Ferris  __u64 sequence;
427934ec9495505d234b2c2fa284470c2f44aae9de9Christopher Ferris  __u64 user_data;
428934ec9495505d234b2c2fa284470c2f44aae9de9Christopher Ferris};
429106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris#ifdef __cplusplus
430106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris#endif
4316a9755d20a995756487bb1aafb7e954f4fd868a7Christopher Ferris#include "drm_mode.h"
432106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris#ifdef __cplusplus
433106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris#endif
434ba8d4f460b51161eb82cf1006cb34a3cc1389f47Christopher Ferris#define DRM_IOCTL_BASE 'd'
4356a9755d20a995756487bb1aafb7e954f4fd868a7Christopher Ferris#define DRM_IO(nr) _IO(DRM_IOCTL_BASE, nr)
436d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao#define DRM_IOR(nr,type) _IOR(DRM_IOCTL_BASE, nr, type)
437d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao#define DRM_IOW(nr,type) _IOW(DRM_IOCTL_BASE, nr, type)
438d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao#define DRM_IOWR(nr,type) _IOWR(DRM_IOCTL_BASE, nr, type)
4396a9755d20a995756487bb1aafb7e954f4fd868a7Christopher Ferris#define DRM_IOCTL_VERSION DRM_IOWR(0x00, struct drm_version)
440655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define DRM_IOCTL_GET_UNIQUE DRM_IOWR(0x01, struct drm_unique)
441d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao#define DRM_IOCTL_GET_MAGIC DRM_IOR(0x02, struct drm_auth)
442ba8d4f460b51161eb82cf1006cb34a3cc1389f47Christopher Ferris#define DRM_IOCTL_IRQ_BUSID DRM_IOWR(0x03, struct drm_irq_busid)
4436a9755d20a995756487bb1aafb7e954f4fd868a7Christopher Ferris#define DRM_IOCTL_GET_MAP DRM_IOWR(0x04, struct drm_map)
444655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define DRM_IOCTL_GET_CLIENT DRM_IOWR(0x05, struct drm_client)
445d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao#define DRM_IOCTL_GET_STATS DRM_IOR(0x06, struct drm_stats)
446ba8d4f460b51161eb82cf1006cb34a3cc1389f47Christopher Ferris#define DRM_IOCTL_SET_VERSION DRM_IOWR(0x07, struct drm_set_version)
4476a9755d20a995756487bb1aafb7e954f4fd868a7Christopher Ferris#define DRM_IOCTL_MODESET_CTL DRM_IOW(0x08, struct drm_modeset_ctl)
448d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao#define DRM_IOCTL_GEM_CLOSE DRM_IOW(0x09, struct drm_gem_close)
449655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define DRM_IOCTL_GEM_FLINK DRM_IOWR(0x0a, struct drm_gem_flink)
450ba8d4f460b51161eb82cf1006cb34a3cc1389f47Christopher Ferris#define DRM_IOCTL_GEM_OPEN DRM_IOWR(0x0b, struct drm_gem_open)
4516a9755d20a995756487bb1aafb7e954f4fd868a7Christopher Ferris#define DRM_IOCTL_GET_CAP DRM_IOWR(0x0c, struct drm_get_cap)
452d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao#define DRM_IOCTL_SET_CLIENT_CAP DRM_IOW(0x0d, struct drm_set_client_cap)
453d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao#define DRM_IOCTL_SET_UNIQUE DRM_IOW(0x10, struct drm_unique)
454d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao#define DRM_IOCTL_AUTH_MAGIC DRM_IOW(0x11, struct drm_auth)
4556a9755d20a995756487bb1aafb7e954f4fd868a7Christopher Ferris#define DRM_IOCTL_BLOCK DRM_IOWR(0x12, struct drm_block)
456655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define DRM_IOCTL_UNBLOCK DRM_IOWR(0x13, struct drm_block)
457d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao#define DRM_IOCTL_CONTROL DRM_IOW(0x14, struct drm_control)
458ba8d4f460b51161eb82cf1006cb34a3cc1389f47Christopher Ferris#define DRM_IOCTL_ADD_MAP DRM_IOWR(0x15, struct drm_map)
4596a9755d20a995756487bb1aafb7e954f4fd868a7Christopher Ferris#define DRM_IOCTL_ADD_BUFS DRM_IOWR(0x16, struct drm_buf_desc)
460d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao#define DRM_IOCTL_MARK_BUFS DRM_IOW(0x17, struct drm_buf_desc)
461655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define DRM_IOCTL_INFO_BUFS DRM_IOWR(0x18, struct drm_buf_info)
462ba8d4f460b51161eb82cf1006cb34a3cc1389f47Christopher Ferris#define DRM_IOCTL_MAP_BUFS DRM_IOWR(0x19, struct drm_buf_map)
4636a9755d20a995756487bb1aafb7e954f4fd868a7Christopher Ferris#define DRM_IOCTL_FREE_BUFS DRM_IOW(0x1a, struct drm_buf_free)
464d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao#define DRM_IOCTL_RM_MAP DRM_IOW(0x1b, struct drm_map)
465d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao#define DRM_IOCTL_SET_SAREA_CTX DRM_IOW(0x1c, struct drm_ctx_priv_map)
466ba8d4f460b51161eb82cf1006cb34a3cc1389f47Christopher Ferris#define DRM_IOCTL_GET_SAREA_CTX DRM_IOWR(0x1d, struct drm_ctx_priv_map)
4676a9755d20a995756487bb1aafb7e954f4fd868a7Christopher Ferris#define DRM_IOCTL_SET_MASTER DRM_IO(0x1e)
468655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define DRM_IOCTL_DROP_MASTER DRM_IO(0x1f)
469655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define DRM_IOCTL_ADD_CTX DRM_IOWR(0x20, struct drm_ctx)
470ba8d4f460b51161eb82cf1006cb34a3cc1389f47Christopher Ferris#define DRM_IOCTL_RM_CTX DRM_IOWR(0x21, struct drm_ctx)
4716a9755d20a995756487bb1aafb7e954f4fd868a7Christopher Ferris#define DRM_IOCTL_MOD_CTX DRM_IOW(0x22, struct drm_ctx)
472655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define DRM_IOCTL_GET_CTX DRM_IOWR(0x23, struct drm_ctx)
473d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao#define DRM_IOCTL_SWITCH_CTX DRM_IOW(0x24, struct drm_ctx)
474d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao#define DRM_IOCTL_NEW_CTX DRM_IOW(0x25, struct drm_ctx)
4756a9755d20a995756487bb1aafb7e954f4fd868a7Christopher Ferris#define DRM_IOCTL_RES_CTX DRM_IOWR(0x26, struct drm_ctx_res)
476655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define DRM_IOCTL_ADD_DRAW DRM_IOWR(0x27, struct drm_draw)
477655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define DRM_IOCTL_RM_DRAW DRM_IOWR(0x28, struct drm_draw)
478ba8d4f460b51161eb82cf1006cb34a3cc1389f47Christopher Ferris#define DRM_IOCTL_DMA DRM_IOWR(0x29, struct drm_dma)
4796a9755d20a995756487bb1aafb7e954f4fd868a7Christopher Ferris#define DRM_IOCTL_LOCK DRM_IOW(0x2a, struct drm_lock)
480d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao#define DRM_IOCTL_UNLOCK DRM_IOW(0x2b, struct drm_lock)
481d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao#define DRM_IOCTL_FINISH DRM_IOW(0x2c, struct drm_lock)
482ba8d4f460b51161eb82cf1006cb34a3cc1389f47Christopher Ferris#define DRM_IOCTL_PRIME_HANDLE_TO_FD DRM_IOWR(0x2d, struct drm_prime_handle)
4836a9755d20a995756487bb1aafb7e954f4fd868a7Christopher Ferris#define DRM_IOCTL_PRIME_FD_TO_HANDLE DRM_IOWR(0x2e, struct drm_prime_handle)
484d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao#define DRM_IOCTL_AGP_ACQUIRE DRM_IO(0x30)
485d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao#define DRM_IOCTL_AGP_RELEASE DRM_IO(0x31)
486d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao#define DRM_IOCTL_AGP_ENABLE DRM_IOW(0x32, struct drm_agp_mode)
4876a9755d20a995756487bb1aafb7e954f4fd868a7Christopher Ferris#define DRM_IOCTL_AGP_INFO DRM_IOR(0x33, struct drm_agp_info)
488655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define DRM_IOCTL_AGP_ALLOC DRM_IOWR(0x34, struct drm_agp_buffer)
489d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao#define DRM_IOCTL_AGP_FREE DRM_IOW(0x35, struct drm_agp_buffer)
490d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao#define DRM_IOCTL_AGP_BIND DRM_IOW(0x36, struct drm_agp_binding)
4916a9755d20a995756487bb1aafb7e954f4fd868a7Christopher Ferris#define DRM_IOCTL_AGP_UNBIND DRM_IOW(0x37, struct drm_agp_binding)
492655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define DRM_IOCTL_SG_ALLOC DRM_IOWR(0x38, struct drm_scatter_gather)
493d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao#define DRM_IOCTL_SG_FREE DRM_IOW(0x39, struct drm_scatter_gather)
494ba8d4f460b51161eb82cf1006cb34a3cc1389f47Christopher Ferris#define DRM_IOCTL_WAIT_VBLANK DRM_IOWR(0x3a, union drm_wait_vblank)
495934ec9495505d234b2c2fa284470c2f44aae9de9Christopher Ferris#define DRM_IOCTL_CRTC_GET_SEQUENCE DRM_IOWR(0x3b, struct drm_crtc_get_sequence)
496934ec9495505d234b2c2fa284470c2f44aae9de9Christopher Ferris#define DRM_IOCTL_CRTC_QUEUE_SEQUENCE DRM_IOWR(0x3c, struct drm_crtc_queue_sequence)
4976a9755d20a995756487bb1aafb7e954f4fd868a7Christopher Ferris#define DRM_IOCTL_UPDATE_DRAW DRM_IOW(0x3f, struct drm_update_draw)
498655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define DRM_IOCTL_MODE_GETRESOURCES DRM_IOWR(0xA0, struct drm_mode_card_res)
499655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define DRM_IOCTL_MODE_GETCRTC DRM_IOWR(0xA1, struct drm_mode_crtc)
500ba8d4f460b51161eb82cf1006cb34a3cc1389f47Christopher Ferris#define DRM_IOCTL_MODE_SETCRTC DRM_IOWR(0xA2, struct drm_mode_crtc)
5016a9755d20a995756487bb1aafb7e954f4fd868a7Christopher Ferris#define DRM_IOCTL_MODE_CURSOR DRM_IOWR(0xA3, struct drm_mode_cursor)
502655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define DRM_IOCTL_MODE_GETGAMMA DRM_IOWR(0xA4, struct drm_mode_crtc_lut)
503655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define DRM_IOCTL_MODE_SETGAMMA DRM_IOWR(0xA5, struct drm_mode_crtc_lut)
504ba8d4f460b51161eb82cf1006cb34a3cc1389f47Christopher Ferris#define DRM_IOCTL_MODE_GETENCODER DRM_IOWR(0xA6, struct drm_mode_get_encoder)
5056a9755d20a995756487bb1aafb7e954f4fd868a7Christopher Ferris#define DRM_IOCTL_MODE_GETCONNECTOR DRM_IOWR(0xA7, struct drm_mode_get_connector)
506655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define DRM_IOCTL_MODE_ATTACHMODE DRM_IOWR(0xA8, struct drm_mode_mode_cmd)
507655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define DRM_IOCTL_MODE_DETACHMODE DRM_IOWR(0xA9, struct drm_mode_mode_cmd)
508ba8d4f460b51161eb82cf1006cb34a3cc1389f47Christopher Ferris#define DRM_IOCTL_MODE_GETPROPERTY DRM_IOWR(0xAA, struct drm_mode_get_property)
5096a9755d20a995756487bb1aafb7e954f4fd868a7Christopher Ferris#define DRM_IOCTL_MODE_SETPROPERTY DRM_IOWR(0xAB, struct drm_mode_connector_set_property)
510655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define DRM_IOCTL_MODE_GETPROPBLOB DRM_IOWR(0xAC, struct drm_mode_get_blob)
511655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define DRM_IOCTL_MODE_GETFB DRM_IOWR(0xAD, struct drm_mode_fb_cmd)
512ba8d4f460b51161eb82cf1006cb34a3cc1389f47Christopher Ferris#define DRM_IOCTL_MODE_ADDFB DRM_IOWR(0xAE, struct drm_mode_fb_cmd)
5136a9755d20a995756487bb1aafb7e954f4fd868a7Christopher Ferris#define DRM_IOCTL_MODE_RMFB DRM_IOWR(0xAF, unsigned int)
514655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define DRM_IOCTL_MODE_PAGE_FLIP DRM_IOWR(0xB0, struct drm_mode_crtc_page_flip)
515655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define DRM_IOCTL_MODE_DIRTYFB DRM_IOWR(0xB1, struct drm_mode_fb_dirty_cmd)
516ba8d4f460b51161eb82cf1006cb34a3cc1389f47Christopher Ferris#define DRM_IOCTL_MODE_CREATE_DUMB DRM_IOWR(0xB2, struct drm_mode_create_dumb)
5176a9755d20a995756487bb1aafb7e954f4fd868a7Christopher Ferris#define DRM_IOCTL_MODE_MAP_DUMB DRM_IOWR(0xB3, struct drm_mode_map_dumb)
518655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define DRM_IOCTL_MODE_DESTROY_DUMB DRM_IOWR(0xB4, struct drm_mode_destroy_dumb)
519655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define DRM_IOCTL_MODE_GETPLANERESOURCES DRM_IOWR(0xB5, struct drm_mode_get_plane_res)
520ba8d4f460b51161eb82cf1006cb34a3cc1389f47Christopher Ferris#define DRM_IOCTL_MODE_GETPLANE DRM_IOWR(0xB6, struct drm_mode_get_plane)
5216a9755d20a995756487bb1aafb7e954f4fd868a7Christopher Ferris#define DRM_IOCTL_MODE_SETPLANE DRM_IOWR(0xB7, struct drm_mode_set_plane)
522655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define DRM_IOCTL_MODE_ADDFB2 DRM_IOWR(0xB8, struct drm_mode_fb_cmd2)
523655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define DRM_IOCTL_MODE_OBJ_GETPROPERTIES DRM_IOWR(0xB9, struct drm_mode_obj_get_properties)
524ba8d4f460b51161eb82cf1006cb34a3cc1389f47Christopher Ferris#define DRM_IOCTL_MODE_OBJ_SETPROPERTY DRM_IOWR(0xBA, struct drm_mode_obj_set_property)
5256a9755d20a995756487bb1aafb7e954f4fd868a7Christopher Ferris#define DRM_IOCTL_MODE_CURSOR2 DRM_IOWR(0xBB, struct drm_mode_cursor2)
52605d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define DRM_IOCTL_MODE_ATOMIC DRM_IOWR(0xBC, struct drm_mode_atomic)
52705d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define DRM_IOCTL_MODE_CREATEPROPBLOB DRM_IOWR(0xBD, struct drm_mode_create_blob)
52805d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define DRM_IOCTL_MODE_DESTROYPROPBLOB DRM_IOWR(0xBE, struct drm_mode_destroy_blob)
5291308ad3ab33294c3abfd96da12b6df58b381ce52Christopher Ferris#define DRM_IOCTL_SYNCOBJ_CREATE DRM_IOWR(0xBF, struct drm_syncobj_create)
5301308ad3ab33294c3abfd96da12b6df58b381ce52Christopher Ferris#define DRM_IOCTL_SYNCOBJ_DESTROY DRM_IOWR(0xC0, struct drm_syncobj_destroy)
5311308ad3ab33294c3abfd96da12b6df58b381ce52Christopher Ferris#define DRM_IOCTL_SYNCOBJ_HANDLE_TO_FD DRM_IOWR(0xC1, struct drm_syncobj_handle)
5321308ad3ab33294c3abfd96da12b6df58b381ce52Christopher Ferris#define DRM_IOCTL_SYNCOBJ_FD_TO_HANDLE DRM_IOWR(0xC2, struct drm_syncobj_handle)
5331308ad3ab33294c3abfd96da12b6df58b381ce52Christopher Ferris#define DRM_IOCTL_SYNCOBJ_WAIT DRM_IOWR(0xC3, struct drm_syncobj_wait)
5341308ad3ab33294c3abfd96da12b6df58b381ce52Christopher Ferris#define DRM_IOCTL_SYNCOBJ_RESET DRM_IOWR(0xC4, struct drm_syncobj_array)
5351308ad3ab33294c3abfd96da12b6df58b381ce52Christopher Ferris#define DRM_IOCTL_SYNCOBJ_SIGNAL DRM_IOWR(0xC5, struct drm_syncobj_array)
536934ec9495505d234b2c2fa284470c2f44aae9de9Christopher Ferris#define DRM_IOCTL_MODE_CREATE_LEASE DRM_IOWR(0xC6, struct drm_mode_create_lease)
537934ec9495505d234b2c2fa284470c2f44aae9de9Christopher Ferris#define DRM_IOCTL_MODE_LIST_LESSEES DRM_IOWR(0xC7, struct drm_mode_list_lessees)
538934ec9495505d234b2c2fa284470c2f44aae9de9Christopher Ferris#define DRM_IOCTL_MODE_GET_LEASE DRM_IOWR(0xC8, struct drm_mode_get_lease)
539934ec9495505d234b2c2fa284470c2f44aae9de9Christopher Ferris#define DRM_IOCTL_MODE_REVOKE_LEASE DRM_IOWR(0xC9, struct drm_mode_revoke_lease)
5406a9755d20a995756487bb1aafb7e954f4fd868a7Christopher Ferris#define DRM_COMMAND_BASE 0x40
54105d08e9716b5974d6ed08973f44930804890b902Christopher Ferris#define DRM_COMMAND_END 0xA0
542ba8d4f460b51161eb82cf1006cb34a3cc1389f47Christopher Ferrisstruct drm_event {
543d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  __u32 type;
5446a9755d20a995756487bb1aafb7e954f4fd868a7Christopher Ferris  __u32 length;
54505d08e9716b5974d6ed08973f44930804890b902Christopher Ferris};
546ba8d4f460b51161eb82cf1006cb34a3cc1389f47Christopher Ferris#define DRM_EVENT_VBLANK 0x01
54738062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define DRM_EVENT_FLIP_COMPLETE 0x02
548934ec9495505d234b2c2fa284470c2f44aae9de9Christopher Ferris#define DRM_EVENT_CRTC_SEQUENCE 0x03
5496a9755d20a995756487bb1aafb7e954f4fd868a7Christopher Ferrisstruct drm_event_vblank {
55005d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  struct drm_event base;
551d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  __u64 user_data;
552d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  __u32 tv_sec;
5536a9755d20a995756487bb1aafb7e954f4fd868a7Christopher Ferris  __u32 tv_usec;
55405d08e9716b5974d6ed08973f44930804890b902Christopher Ferris  __u32 sequence;
555525ce914edf136d2bd02ac8c404d56c52e737f4dChristopher Ferris  __u32 crtc_id;
55638062f954c637861348dd8078cefb73554e6f12cChristopher Ferris};
557934ec9495505d234b2c2fa284470c2f44aae9de9Christopher Ferrisstruct drm_event_crtc_sequence {
558934ec9495505d234b2c2fa284470c2f44aae9de9Christopher Ferris  struct drm_event base;
559934ec9495505d234b2c2fa284470c2f44aae9de9Christopher Ferris  __u64 user_data;
560934ec9495505d234b2c2fa284470c2f44aae9de9Christopher Ferris  __s64 time_ns;
561934ec9495505d234b2c2fa284470c2f44aae9de9Christopher Ferris  __u64 sequence;
562934ec9495505d234b2c2fa284470c2f44aae9de9Christopher Ferris};
5636a9755d20a995756487bb1aafb7e954f4fd868a7Christopher Ferristypedef struct drm_clip_rect drm_clip_rect_t;
56405d08e9716b5974d6ed08973f44930804890b902Christopher Ferristypedef struct drm_drawable_info drm_drawable_info_t;
565ba8d4f460b51161eb82cf1006cb34a3cc1389f47Christopher Ferristypedef struct drm_tex_region drm_tex_region_t;
56638062f954c637861348dd8078cefb73554e6f12cChristopher Ferristypedef struct drm_hw_lock drm_hw_lock_t;
5676a9755d20a995756487bb1aafb7e954f4fd868a7Christopher Ferristypedef struct drm_version drm_version_t;
56805d08e9716b5974d6ed08973f44930804890b902Christopher Ferristypedef struct drm_unique drm_unique_t;
569ba8d4f460b51161eb82cf1006cb34a3cc1389f47Christopher Ferristypedef struct drm_list drm_list_t;
57038062f954c637861348dd8078cefb73554e6f12cChristopher Ferristypedef struct drm_block drm_block_t;
5716a9755d20a995756487bb1aafb7e954f4fd868a7Christopher Ferristypedef struct drm_control drm_control_t;
57205d08e9716b5974d6ed08973f44930804890b902Christopher Ferristypedef enum drm_map_type drm_map_type_t;
573ba8d4f460b51161eb82cf1006cb34a3cc1389f47Christopher Ferristypedef enum drm_map_flags drm_map_flags_t;
57438062f954c637861348dd8078cefb73554e6f12cChristopher Ferristypedef struct drm_ctx_priv_map drm_ctx_priv_map_t;
5756a9755d20a995756487bb1aafb7e954f4fd868a7Christopher Ferristypedef struct drm_map drm_map_t;
57605d08e9716b5974d6ed08973f44930804890b902Christopher Ferristypedef struct drm_client drm_client_t;
577ba8d4f460b51161eb82cf1006cb34a3cc1389f47Christopher Ferristypedef enum drm_stat_type drm_stat_type_t;
57838062f954c637861348dd8078cefb73554e6f12cChristopher Ferristypedef struct drm_stats drm_stats_t;
5796a9755d20a995756487bb1aafb7e954f4fd868a7Christopher Ferristypedef enum drm_lock_flags drm_lock_flags_t;
58005d08e9716b5974d6ed08973f44930804890b902Christopher Ferristypedef struct drm_lock drm_lock_t;
581ba8d4f460b51161eb82cf1006cb34a3cc1389f47Christopher Ferristypedef enum drm_dma_flags drm_dma_flags_t;
58238062f954c637861348dd8078cefb73554e6f12cChristopher Ferristypedef struct drm_buf_desc drm_buf_desc_t;
5836a9755d20a995756487bb1aafb7e954f4fd868a7Christopher Ferristypedef struct drm_buf_info drm_buf_info_t;
58405d08e9716b5974d6ed08973f44930804890b902Christopher Ferristypedef struct drm_buf_free drm_buf_free_t;
585ba8d4f460b51161eb82cf1006cb34a3cc1389f47Christopher Ferristypedef struct drm_buf_pub drm_buf_pub_t;
58638062f954c637861348dd8078cefb73554e6f12cChristopher Ferristypedef struct drm_buf_map drm_buf_map_t;
5876a9755d20a995756487bb1aafb7e954f4fd868a7Christopher Ferristypedef struct drm_dma drm_dma_t;
58805d08e9716b5974d6ed08973f44930804890b902Christopher Ferristypedef union drm_wait_vblank drm_wait_vblank_t;
589ba8d4f460b51161eb82cf1006cb34a3cc1389f47Christopher Ferristypedef struct drm_agp_mode drm_agp_mode_t;
59038062f954c637861348dd8078cefb73554e6f12cChristopher Ferristypedef enum drm_ctx_flags drm_ctx_flags_t;
5916a9755d20a995756487bb1aafb7e954f4fd868a7Christopher Ferristypedef struct drm_ctx drm_ctx_t;
59205d08e9716b5974d6ed08973f44930804890b902Christopher Ferristypedef struct drm_ctx_res drm_ctx_res_t;
593ba8d4f460b51161eb82cf1006cb34a3cc1389f47Christopher Ferristypedef struct drm_draw drm_draw_t;
59438062f954c637861348dd8078cefb73554e6f12cChristopher Ferristypedef struct drm_update_draw drm_update_draw_t;
5956a9755d20a995756487bb1aafb7e954f4fd868a7Christopher Ferristypedef struct drm_auth drm_auth_t;
59605d08e9716b5974d6ed08973f44930804890b902Christopher Ferristypedef struct drm_irq_busid drm_irq_busid_t;
597ba8d4f460b51161eb82cf1006cb34a3cc1389f47Christopher Ferristypedef enum drm_vblank_seq_type drm_vblank_seq_type_t;
59838062f954c637861348dd8078cefb73554e6f12cChristopher Ferristypedef struct drm_agp_buffer drm_agp_buffer_t;
5996a9755d20a995756487bb1aafb7e954f4fd868a7Christopher Ferristypedef struct drm_agp_binding drm_agp_binding_t;
60005d08e9716b5974d6ed08973f44930804890b902Christopher Ferristypedef struct drm_agp_info drm_agp_info_t;
601ba8d4f460b51161eb82cf1006cb34a3cc1389f47Christopher Ferristypedef struct drm_scatter_gather drm_scatter_gather_t;
60238062f954c637861348dd8078cefb73554e6f12cChristopher Ferristypedef struct drm_set_version drm_set_version_t;
6036a9755d20a995756487bb1aafb7e954f4fd868a7Christopher Ferris#ifdef __cplusplus
604106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris#endif
605106b3a8a7dc03c19a45e322de425ac56aafac358Christopher Ferris#endif
606