1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36#ifndef _DRM_H_
37#define _DRM_H_
38
39#if defined(__KERNEL__)
40
41#include <linux/types.h>
42#include <asm/ioctl.h>
43typedef unsigned int drm_handle_t;
44
45#elif defined(__linux__)
46
47#include <linux/types.h>
48#include <asm/ioctl.h>
49typedef unsigned int drm_handle_t;
50
51#else
52
53#include <sys/ioccom.h>
54#include <sys/types.h>
55typedef int8_t __s8;
56typedef uint8_t __u8;
57typedef int16_t __s16;
58typedef uint16_t __u16;
59typedef int32_t __s32;
60typedef uint32_t __u32;
61typedef int64_t __s64;
62typedef uint64_t __u64;
63typedef size_t __kernel_size_t;
64typedef unsigned long drm_handle_t;
65
66#endif
67
68#if defined(__cplusplus)
69extern "C" {
70#endif
71
72#define DRM_NAME "drm"
73#define DRM_MIN_ORDER 5
74#define DRM_MAX_ORDER 22
75#define DRM_RAM_PERCENT 10
76
77#define _DRM_LOCK_HELD 0x80000000U
78#define _DRM_LOCK_CONT 0x40000000U
79#define _DRM_LOCK_IS_HELD(lock) ((lock) & _DRM_LOCK_HELD)
80#define _DRM_LOCK_IS_CONT(lock) ((lock) & _DRM_LOCK_CONT)
81#define _DRM_LOCKING_CONTEXT(lock) ((lock) & ~(_DRM_LOCK_HELD|_DRM_LOCK_CONT))
82
83typedef unsigned int drm_context_t;
84typedef unsigned int drm_drawable_t;
85typedef unsigned int drm_magic_t;
86
87
88
89
90
91
92
93
94
95
96struct drm_clip_rect {
97 unsigned short x1;
98 unsigned short y1;
99 unsigned short x2;
100 unsigned short y2;
101};
102
103
104
105
106struct drm_drawable_info {
107 unsigned int num_rects;
108 struct drm_clip_rect *rects;
109};
110
111
112
113
114struct drm_tex_region {
115 unsigned char next;
116 unsigned char prev;
117 unsigned char in_use;
118 unsigned char padding;
119 unsigned int age;
120};
121
122
123
124
125
126
127
128
129struct drm_hw_lock {
130 __volatile__ unsigned int lock;
131 char padding[60];
132};
133
134
135
136
137
138
139struct drm_version {
140 int version_major;
141 int version_minor;
142 int version_patchlevel;
143 __kernel_size_t name_len;
144 char __user *name;
145 __kernel_size_t date_len;
146 char __user *date;
147 __kernel_size_t desc_len;
148 char __user *desc;
149};
150
151
152
153
154
155
156struct drm_unique {
157 __kernel_size_t unique_len;
158 char __user *unique;
159};
160
161struct drm_list {
162 int count;
163 struct drm_version __user *version;
164};
165
166struct drm_block {
167 int unused;
168};
169
170
171
172
173
174
175struct drm_control {
176 enum {
177 DRM_ADD_COMMAND,
178 DRM_RM_COMMAND,
179 DRM_INST_HANDLER,
180 DRM_UNINST_HANDLER
181 } func;
182 int irq;
183};
184
185
186
187
188enum drm_map_type {
189 _DRM_FRAME_BUFFER = 0,
190 _DRM_REGISTERS = 1,
191 _DRM_SHM = 2,
192 _DRM_AGP = 3,
193 _DRM_SCATTER_GATHER = 4,
194 _DRM_CONSISTENT = 5
195};
196
197
198
199
200enum drm_map_flags {
201 _DRM_RESTRICTED = 0x01,
202 _DRM_READ_ONLY = 0x02,
203 _DRM_LOCKED = 0x04,
204 _DRM_KERNEL = 0x08,
205 _DRM_WRITE_COMBINING = 0x10,
206 _DRM_CONTAINS_LOCK = 0x20,
207 _DRM_REMOVABLE = 0x40,
208 _DRM_DRIVER = 0x80
209};
210
211struct drm_ctx_priv_map {
212 unsigned int ctx_id;
213 void *handle;
214};
215
216
217
218
219
220
221
222struct drm_map {
223 unsigned long offset;
224 unsigned long size;
225 enum drm_map_type type;
226 enum drm_map_flags flags;
227 void *handle;
228
229 int mtrr;
230
231};
232
233
234
235
236struct drm_client {
237 int idx;
238 int auth;
239 unsigned long pid;
240 unsigned long uid;
241 unsigned long magic;
242 unsigned long iocs;
243};
244
245enum drm_stat_type {
246 _DRM_STAT_LOCK,
247 _DRM_STAT_OPENS,
248 _DRM_STAT_CLOSES,
249 _DRM_STAT_IOCTLS,
250 _DRM_STAT_LOCKS,
251 _DRM_STAT_UNLOCKS,
252 _DRM_STAT_VALUE,
253 _DRM_STAT_BYTE,
254 _DRM_STAT_COUNT,
255
256 _DRM_STAT_IRQ,
257 _DRM_STAT_PRIMARY,
258 _DRM_STAT_SECONDARY,
259 _DRM_STAT_DMA,
260 _DRM_STAT_SPECIAL,
261 _DRM_STAT_MISSED
262
263};
264
265
266
267
268struct drm_stats {
269 unsigned long count;
270 struct {
271 unsigned long value;
272 enum drm_stat_type type;
273 } data[15];
274};
275
276
277
278
279enum drm_lock_flags {
280 _DRM_LOCK_READY = 0x01,
281 _DRM_LOCK_QUIESCENT = 0x02,
282 _DRM_LOCK_FLUSH = 0x04,
283 _DRM_LOCK_FLUSH_ALL = 0x08,
284
285
286
287 _DRM_HALT_ALL_QUEUES = 0x10,
288 _DRM_HALT_CUR_QUEUES = 0x20
289};
290
291
292
293
294
295
296struct drm_lock {
297 int context;
298 enum drm_lock_flags flags;
299};
300
301
302
303
304
305
306
307
308
309enum drm_dma_flags {
310
311 _DRM_DMA_BLOCK = 0x01,
312
313
314
315
316
317
318
319
320
321 _DRM_DMA_WHILE_LOCKED = 0x02,
322 _DRM_DMA_PRIORITY = 0x04,
323
324
325 _DRM_DMA_WAIT = 0x10,
326 _DRM_DMA_SMALLER_OK = 0x20,
327 _DRM_DMA_LARGER_OK = 0x40
328};
329
330
331
332
333
334
335struct drm_buf_desc {
336 int count;
337 int size;
338 int low_mark;
339 int high_mark;
340 enum {
341 _DRM_PAGE_ALIGN = 0x01,
342 _DRM_AGP_BUFFER = 0x02,
343 _DRM_SG_BUFFER = 0x04,
344 _DRM_FB_BUFFER = 0x08,
345 _DRM_PCI_BUFFER_RO = 0x10
346 } flags;
347 unsigned long agp_start;
348
349
350
351};
352
353
354
355
356struct drm_buf_info {
357 int count;
358 struct drm_buf_desc __user *list;
359};
360
361
362
363
364struct drm_buf_free {
365 int count;
366 int __user *list;
367};
368
369
370
371
372
373
374struct drm_buf_pub {
375 int idx;
376 int total;
377 int used;
378 void __user *address;
379};
380
381
382
383
384struct drm_buf_map {
385 int count;
386#ifdef __cplusplus
387 void __user *virt;
388#else
389 void __user *virtual;
390#endif
391 struct drm_buf_pub __user *list;
392};
393
394
395
396
397
398
399
400
401struct drm_dma {
402 int context;
403 int send_count;
404 int __user *send_indices;
405 int __user *send_sizes;
406 enum drm_dma_flags flags;
407 int request_count;
408 int request_size;
409 int __user *request_indices;
410 int __user *request_sizes;
411 int granted_count;
412};
413
414enum drm_ctx_flags {
415 _DRM_CONTEXT_PRESERVED = 0x01,
416 _DRM_CONTEXT_2DONLY = 0x02
417};
418
419
420
421
422
423
424struct drm_ctx {
425 drm_context_t handle;
426 enum drm_ctx_flags flags;
427};
428
429
430
431
432struct drm_ctx_res {
433 int count;
434 struct drm_ctx __user *contexts;
435};
436
437
438
439
440struct drm_draw {
441 drm_drawable_t handle;
442};
443
444
445
446
447typedef enum {
448 DRM_DRAWABLE_CLIPRECTS
449} drm_drawable_info_type_t;
450
451struct drm_update_draw {
452 drm_drawable_t handle;
453 unsigned int type;
454 unsigned int num;
455 unsigned long long data;
456};
457
458
459
460
461struct drm_auth {
462 drm_magic_t magic;
463};
464
465
466
467
468
469
470struct drm_irq_busid {
471 int irq;
472 int busnum;
473 int devnum;
474 int funcnum;
475};
476
477enum drm_vblank_seq_type {
478 _DRM_VBLANK_ABSOLUTE = 0x0,
479 _DRM_VBLANK_RELATIVE = 0x1,
480
481 _DRM_VBLANK_HIGH_CRTC_MASK = 0x0000003e,
482 _DRM_VBLANK_EVENT = 0x4000000,
483 _DRM_VBLANK_FLIP = 0x8000000,
484 _DRM_VBLANK_NEXTONMISS = 0x10000000,
485 _DRM_VBLANK_SECONDARY = 0x20000000,
486 _DRM_VBLANK_SIGNAL = 0x40000000
487};
488#define _DRM_VBLANK_HIGH_CRTC_SHIFT 1
489
490#define _DRM_VBLANK_TYPES_MASK (_DRM_VBLANK_ABSOLUTE | _DRM_VBLANK_RELATIVE)
491#define _DRM_VBLANK_FLAGS_MASK (_DRM_VBLANK_EVENT | _DRM_VBLANK_SIGNAL | \
492 _DRM_VBLANK_SECONDARY | _DRM_VBLANK_NEXTONMISS)
493
494struct drm_wait_vblank_request {
495 enum drm_vblank_seq_type type;
496 unsigned int sequence;
497 unsigned long signal;
498};
499
500struct drm_wait_vblank_reply {
501 enum drm_vblank_seq_type type;
502 unsigned int sequence;
503 long tval_sec;
504 long tval_usec;
505};
506
507
508
509
510
511
512union drm_wait_vblank {
513 struct drm_wait_vblank_request request;
514 struct drm_wait_vblank_reply reply;
515};
516
517#define _DRM_PRE_MODESET 1
518#define _DRM_POST_MODESET 2
519
520
521
522
523
524
525struct drm_modeset_ctl {
526 __u32 crtc;
527 __u32 cmd;
528};
529
530
531
532
533
534
535struct drm_agp_mode {
536 unsigned long mode;
537};
538
539
540
541
542
543
544struct drm_agp_buffer {
545 unsigned long size;
546 unsigned long handle;
547 unsigned long type;
548 unsigned long physical;
549};
550
551
552
553
554
555
556struct drm_agp_binding {
557 unsigned long handle;
558 unsigned long offset;
559};
560
561
562
563
564
565
566
567
568struct drm_agp_info {
569 int agp_version_major;
570 int agp_version_minor;
571 unsigned long mode;
572 unsigned long aperture_base;
573 unsigned long aperture_size;
574 unsigned long memory_allowed;
575 unsigned long memory_used;
576
577
578 unsigned short id_vendor;
579 unsigned short id_device;
580};
581
582
583
584
585struct drm_scatter_gather {
586 unsigned long size;
587 unsigned long handle;
588};
589
590
591
592
593struct drm_set_version {
594 int drm_di_major;
595 int drm_di_minor;
596 int drm_dd_major;
597 int drm_dd_minor;
598};
599
600
601struct drm_gem_close {
602
603 __u32 handle;
604 __u32 pad;
605};
606
607
608struct drm_gem_flink {
609
610 __u32 handle;
611
612
613 __u32 name;
614};
615
616
617struct drm_gem_open {
618
619 __u32 name;
620
621
622 __u32 handle;
623
624
625 __u64 size;
626};
627
628#define DRM_CAP_DUMB_BUFFER 0x1
629#define DRM_CAP_VBLANK_HIGH_CRTC 0x2
630#define DRM_CAP_DUMB_PREFERRED_DEPTH 0x3
631#define DRM_CAP_DUMB_PREFER_SHADOW 0x4
632#define DRM_CAP_PRIME 0x5
633#define DRM_PRIME_CAP_IMPORT 0x1
634#define DRM_PRIME_CAP_EXPORT 0x2
635#define DRM_CAP_TIMESTAMP_MONOTONIC 0x6
636#define DRM_CAP_ASYNC_PAGE_FLIP 0x7
637
638
639
640
641
642
643
644
645
646#define DRM_CAP_CURSOR_WIDTH 0x8
647#define DRM_CAP_CURSOR_HEIGHT 0x9
648#define DRM_CAP_ADDFB2_MODIFIERS 0x10
649
650
651struct drm_get_cap {
652 __u64 capability;
653 __u64 value;
654};
655
656
657
658
659
660
661
662
663#define DRM_CLIENT_CAP_STEREO_3D 1
664
665
666
667
668
669
670
671#define DRM_CLIENT_CAP_UNIVERSAL_PLANES 2
672
673
674
675
676
677
678#define DRM_CLIENT_CAP_ATOMIC 3
679
680
681struct drm_set_client_cap {
682 __u64 capability;
683 __u64 value;
684};
685
686#define DRM_RDWR O_RDWR
687#define DRM_CLOEXEC O_CLOEXEC
688struct drm_prime_handle {
689 __u32 handle;
690
691
692 __u32 flags;
693
694
695 __s32 fd;
696};
697
698#if defined(__cplusplus)
699}
700#endif
701
702#include "drm_mode.h"
703
704#if defined(__cplusplus)
705extern "C" {
706#endif
707
708#define DRM_IOCTL_BASE 'd'
709#define DRM_IO(nr) _IO(DRM_IOCTL_BASE,nr)
710#define DRM_IOR(nr,type) _IOR(DRM_IOCTL_BASE,nr,type)
711#define DRM_IOW(nr,type) _IOW(DRM_IOCTL_BASE,nr,type)
712#define DRM_IOWR(nr,type) _IOWR(DRM_IOCTL_BASE,nr,type)
713
714#define DRM_IOCTL_VERSION DRM_IOWR(0x00, struct drm_version)
715#define DRM_IOCTL_GET_UNIQUE DRM_IOWR(0x01, struct drm_unique)
716#define DRM_IOCTL_GET_MAGIC DRM_IOR( 0x02, struct drm_auth)
717#define DRM_IOCTL_IRQ_BUSID DRM_IOWR(0x03, struct drm_irq_busid)
718#define DRM_IOCTL_GET_MAP DRM_IOWR(0x04, struct drm_map)
719#define DRM_IOCTL_GET_CLIENT DRM_IOWR(0x05, struct drm_client)
720#define DRM_IOCTL_GET_STATS DRM_IOR( 0x06, struct drm_stats)
721#define DRM_IOCTL_SET_VERSION DRM_IOWR(0x07, struct drm_set_version)
722#define DRM_IOCTL_MODESET_CTL DRM_IOW(0x08, struct drm_modeset_ctl)
723#define DRM_IOCTL_GEM_CLOSE DRM_IOW (0x09, struct drm_gem_close)
724#define DRM_IOCTL_GEM_FLINK DRM_IOWR(0x0a, struct drm_gem_flink)
725#define DRM_IOCTL_GEM_OPEN DRM_IOWR(0x0b, struct drm_gem_open)
726#define DRM_IOCTL_GET_CAP DRM_IOWR(0x0c, struct drm_get_cap)
727#define DRM_IOCTL_SET_CLIENT_CAP DRM_IOW( 0x0d, struct drm_set_client_cap)
728
729#define DRM_IOCTL_SET_UNIQUE DRM_IOW( 0x10, struct drm_unique)
730#define DRM_IOCTL_AUTH_MAGIC DRM_IOW( 0x11, struct drm_auth)
731#define DRM_IOCTL_BLOCK DRM_IOWR(0x12, struct drm_block)
732#define DRM_IOCTL_UNBLOCK DRM_IOWR(0x13, struct drm_block)
733#define DRM_IOCTL_CONTROL DRM_IOW( 0x14, struct drm_control)
734#define DRM_IOCTL_ADD_MAP DRM_IOWR(0x15, struct drm_map)
735#define DRM_IOCTL_ADD_BUFS DRM_IOWR(0x16, struct drm_buf_desc)
736#define DRM_IOCTL_MARK_BUFS DRM_IOW( 0x17, struct drm_buf_desc)
737#define DRM_IOCTL_INFO_BUFS DRM_IOWR(0x18, struct drm_buf_info)
738#define DRM_IOCTL_MAP_BUFS DRM_IOWR(0x19, struct drm_buf_map)
739#define DRM_IOCTL_FREE_BUFS DRM_IOW( 0x1a, struct drm_buf_free)
740
741#define DRM_IOCTL_RM_MAP DRM_IOW( 0x1b, struct drm_map)
742
743#define DRM_IOCTL_SET_SAREA_CTX DRM_IOW( 0x1c, struct drm_ctx_priv_map)
744#define DRM_IOCTL_GET_SAREA_CTX DRM_IOWR(0x1d, struct drm_ctx_priv_map)
745
746#define DRM_IOCTL_SET_MASTER DRM_IO(0x1e)
747#define DRM_IOCTL_DROP_MASTER DRM_IO(0x1f)
748
749#define DRM_IOCTL_ADD_CTX DRM_IOWR(0x20, struct drm_ctx)
750#define DRM_IOCTL_RM_CTX DRM_IOWR(0x21, struct drm_ctx)
751#define DRM_IOCTL_MOD_CTX DRM_IOW( 0x22, struct drm_ctx)
752#define DRM_IOCTL_GET_CTX DRM_IOWR(0x23, struct drm_ctx)
753#define DRM_IOCTL_SWITCH_CTX DRM_IOW( 0x24, struct drm_ctx)
754#define DRM_IOCTL_NEW_CTX DRM_IOW( 0x25, struct drm_ctx)
755#define DRM_IOCTL_RES_CTX DRM_IOWR(0x26, struct drm_ctx_res)
756#define DRM_IOCTL_ADD_DRAW DRM_IOWR(0x27, struct drm_draw)
757#define DRM_IOCTL_RM_DRAW DRM_IOWR(0x28, struct drm_draw)
758#define DRM_IOCTL_DMA DRM_IOWR(0x29, struct drm_dma)
759#define DRM_IOCTL_LOCK DRM_IOW( 0x2a, struct drm_lock)
760#define DRM_IOCTL_UNLOCK DRM_IOW( 0x2b, struct drm_lock)
761#define DRM_IOCTL_FINISH DRM_IOW( 0x2c, struct drm_lock)
762
763#define DRM_IOCTL_PRIME_HANDLE_TO_FD DRM_IOWR(0x2d, struct drm_prime_handle)
764#define DRM_IOCTL_PRIME_FD_TO_HANDLE DRM_IOWR(0x2e, struct drm_prime_handle)
765
766#define DRM_IOCTL_AGP_ACQUIRE DRM_IO( 0x30)
767#define DRM_IOCTL_AGP_RELEASE DRM_IO( 0x31)
768#define DRM_IOCTL_AGP_ENABLE DRM_IOW( 0x32, struct drm_agp_mode)
769#define DRM_IOCTL_AGP_INFO DRM_IOR( 0x33, struct drm_agp_info)
770#define DRM_IOCTL_AGP_ALLOC DRM_IOWR(0x34, struct drm_agp_buffer)
771#define DRM_IOCTL_AGP_FREE DRM_IOW( 0x35, struct drm_agp_buffer)
772#define DRM_IOCTL_AGP_BIND DRM_IOW( 0x36, struct drm_agp_binding)
773#define DRM_IOCTL_AGP_UNBIND DRM_IOW( 0x37, struct drm_agp_binding)
774
775#define DRM_IOCTL_SG_ALLOC DRM_IOWR(0x38, struct drm_scatter_gather)
776#define DRM_IOCTL_SG_FREE DRM_IOW( 0x39, struct drm_scatter_gather)
777
778#define DRM_IOCTL_WAIT_VBLANK DRM_IOWR(0x3a, union drm_wait_vblank)
779
780#define DRM_IOCTL_UPDATE_DRAW DRM_IOW(0x3f, struct drm_update_draw)
781
782#define DRM_IOCTL_MODE_GETRESOURCES DRM_IOWR(0xA0, struct drm_mode_card_res)
783#define DRM_IOCTL_MODE_GETCRTC DRM_IOWR(0xA1, struct drm_mode_crtc)
784#define DRM_IOCTL_MODE_SETCRTC DRM_IOWR(0xA2, struct drm_mode_crtc)
785#define DRM_IOCTL_MODE_CURSOR DRM_IOWR(0xA3, struct drm_mode_cursor)
786#define DRM_IOCTL_MODE_GETGAMMA DRM_IOWR(0xA4, struct drm_mode_crtc_lut)
787#define DRM_IOCTL_MODE_SETGAMMA DRM_IOWR(0xA5, struct drm_mode_crtc_lut)
788#define DRM_IOCTL_MODE_GETENCODER DRM_IOWR(0xA6, struct drm_mode_get_encoder)
789#define DRM_IOCTL_MODE_GETCONNECTOR DRM_IOWR(0xA7, struct drm_mode_get_connector)
790#define DRM_IOCTL_MODE_ATTACHMODE DRM_IOWR(0xA8, struct drm_mode_mode_cmd)
791#define DRM_IOCTL_MODE_DETACHMODE DRM_IOWR(0xA9, struct drm_mode_mode_cmd)
792
793#define DRM_IOCTL_MODE_GETPROPERTY DRM_IOWR(0xAA, struct drm_mode_get_property)
794#define DRM_IOCTL_MODE_SETPROPERTY DRM_IOWR(0xAB, struct drm_mode_connector_set_property)
795#define DRM_IOCTL_MODE_GETPROPBLOB DRM_IOWR(0xAC, struct drm_mode_get_blob)
796#define DRM_IOCTL_MODE_GETFB DRM_IOWR(0xAD, struct drm_mode_fb_cmd)
797#define DRM_IOCTL_MODE_ADDFB DRM_IOWR(0xAE, struct drm_mode_fb_cmd)
798#define DRM_IOCTL_MODE_RMFB DRM_IOWR(0xAF, unsigned int)
799#define DRM_IOCTL_MODE_PAGE_FLIP DRM_IOWR(0xB0, struct drm_mode_crtc_page_flip)
800#define DRM_IOCTL_MODE_DIRTYFB DRM_IOWR(0xB1, struct drm_mode_fb_dirty_cmd)
801
802#define DRM_IOCTL_MODE_CREATE_DUMB DRM_IOWR(0xB2, struct drm_mode_create_dumb)
803#define DRM_IOCTL_MODE_MAP_DUMB DRM_IOWR(0xB3, struct drm_mode_map_dumb)
804#define DRM_IOCTL_MODE_DESTROY_DUMB DRM_IOWR(0xB4, struct drm_mode_destroy_dumb)
805#define DRM_IOCTL_MODE_GETPLANERESOURCES DRM_IOWR(0xB5, struct drm_mode_get_plane_res)
806#define DRM_IOCTL_MODE_GETPLANE DRM_IOWR(0xB6, struct drm_mode_get_plane)
807#define DRM_IOCTL_MODE_SETPLANE DRM_IOWR(0xB7, struct drm_mode_set_plane)
808#define DRM_IOCTL_MODE_ADDFB2 DRM_IOWR(0xB8, struct drm_mode_fb_cmd2)
809#define DRM_IOCTL_MODE_OBJ_GETPROPERTIES DRM_IOWR(0xB9, struct drm_mode_obj_get_properties)
810#define DRM_IOCTL_MODE_OBJ_SETPROPERTY DRM_IOWR(0xBA, struct drm_mode_obj_set_property)
811#define DRM_IOCTL_MODE_CURSOR2 DRM_IOWR(0xBB, struct drm_mode_cursor2)
812#define DRM_IOCTL_MODE_ATOMIC DRM_IOWR(0xBC, struct drm_mode_atomic)
813#define DRM_IOCTL_MODE_CREATEPROPBLOB DRM_IOWR(0xBD, struct drm_mode_create_blob)
814#define DRM_IOCTL_MODE_DESTROYPROPBLOB DRM_IOWR(0xBE, struct drm_mode_destroy_blob)
815
816
817
818
819
820
821
822
823
824#define DRM_COMMAND_BASE 0x40
825#define DRM_COMMAND_END 0xA0
826
827
828
829
830
831
832
833
834
835
836
837
838
839struct drm_event {
840 __u32 type;
841 __u32 length;
842};
843
844#define DRM_EVENT_VBLANK 0x01
845#define DRM_EVENT_FLIP_COMPLETE 0x02
846
847struct drm_event_vblank {
848 struct drm_event base;
849 __u64 user_data;
850 __u32 tv_sec;
851 __u32 tv_usec;
852 __u32 sequence;
853 __u32 reserved;
854};
855
856
857#ifndef __KERNEL__
858typedef struct drm_clip_rect drm_clip_rect_t;
859typedef struct drm_drawable_info drm_drawable_info_t;
860typedef struct drm_tex_region drm_tex_region_t;
861typedef struct drm_hw_lock drm_hw_lock_t;
862typedef struct drm_version drm_version_t;
863typedef struct drm_unique drm_unique_t;
864typedef struct drm_list drm_list_t;
865typedef struct drm_block drm_block_t;
866typedef struct drm_control drm_control_t;
867typedef enum drm_map_type drm_map_type_t;
868typedef enum drm_map_flags drm_map_flags_t;
869typedef struct drm_ctx_priv_map drm_ctx_priv_map_t;
870typedef struct drm_map drm_map_t;
871typedef struct drm_client drm_client_t;
872typedef enum drm_stat_type drm_stat_type_t;
873typedef struct drm_stats drm_stats_t;
874typedef enum drm_lock_flags drm_lock_flags_t;
875typedef struct drm_lock drm_lock_t;
876typedef enum drm_dma_flags drm_dma_flags_t;
877typedef struct drm_buf_desc drm_buf_desc_t;
878typedef struct drm_buf_info drm_buf_info_t;
879typedef struct drm_buf_free drm_buf_free_t;
880typedef struct drm_buf_pub drm_buf_pub_t;
881typedef struct drm_buf_map drm_buf_map_t;
882typedef struct drm_dma drm_dma_t;
883typedef union drm_wait_vblank drm_wait_vblank_t;
884typedef struct drm_agp_mode drm_agp_mode_t;
885typedef enum drm_ctx_flags drm_ctx_flags_t;
886typedef struct drm_ctx drm_ctx_t;
887typedef struct drm_ctx_res drm_ctx_res_t;
888typedef struct drm_draw drm_draw_t;
889typedef struct drm_update_draw drm_update_draw_t;
890typedef struct drm_auth drm_auth_t;
891typedef struct drm_irq_busid drm_irq_busid_t;
892typedef enum drm_vblank_seq_type drm_vblank_seq_type_t;
893
894typedef struct drm_agp_buffer drm_agp_buffer_t;
895typedef struct drm_agp_binding drm_agp_binding_t;
896typedef struct drm_agp_info drm_agp_info_t;
897typedef struct drm_scatter_gather drm_scatter_gather_t;
898typedef struct drm_set_version drm_set_version_t;
899#endif
900
901#if defined(__cplusplus)
902}
903#endif
904
905#endif
906