Back to index

libdrm  2.4.37
drm.h
Go to the documentation of this file.
00001 
00011 /*
00012  * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
00013  * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
00014  * All rights reserved.
00015  *
00016  * Permission is hereby granted, free of charge, to any person obtaining a
00017  * copy of this software and associated documentation files (the "Software"),
00018  * to deal in the Software without restriction, including without limitation
00019  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
00020  * and/or sell copies of the Software, and to permit persons to whom the
00021  * Software is furnished to do so, subject to the following conditions:
00022  *
00023  * The above copyright notice and this permission notice (including the next
00024  * paragraph) shall be included in all copies or substantial portions of the
00025  * Software.
00026  *
00027  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
00028  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
00029  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
00030  * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
00031  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
00032  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
00033  * OTHER DEALINGS IN THE SOFTWARE.
00034  */
00035 
00036 #ifndef _DRM_H_
00037 #define _DRM_H_
00038 
00039 #if defined(__linux__)
00040 
00041 #include <linux/types.h>
00042 #include <asm/ioctl.h>
00043 typedef unsigned int drm_handle_t;
00044 
00045 #else /* One of the BSDs */
00046 
00047 #include <sys/ioccom.h>
00048 #include <sys/types.h>
00049 typedef int8_t   __s8;
00050 typedef uint8_t  __u8;
00051 typedef int16_t  __s16;
00052 typedef uint16_t __u16;
00053 typedef int32_t  __s32;
00054 typedef uint32_t __u32;
00055 typedef int64_t  __s64;
00056 typedef uint64_t __u64;
00057 typedef unsigned long drm_handle_t;
00058 
00059 #endif
00060 
00061 #define DRM_NAME     "drm"    
00062 #define DRM_MIN_ORDER       5        
00063 #define DRM_MAX_ORDER       22       
00064 #define DRM_RAM_PERCENT 10    
00066 #define _DRM_LOCK_HELD      0x80000000U 
00067 #define _DRM_LOCK_CONT      0x40000000U 
00068 #define _DRM_LOCK_IS_HELD(lock)       ((lock) & _DRM_LOCK_HELD)
00069 #define _DRM_LOCK_IS_CONT(lock)       ((lock) & _DRM_LOCK_CONT)
00070 #define _DRM_LOCKING_CONTEXT(lock) ((lock) & ~(_DRM_LOCK_HELD|_DRM_LOCK_CONT))
00071 
00072 typedef unsigned int drm_context_t;
00073 typedef unsigned int drm_drawable_t;
00074 typedef unsigned int drm_magic_t;
00075 
00085 struct drm_clip_rect {
00086        unsigned short x1;
00087        unsigned short y1;
00088        unsigned short x2;
00089        unsigned short y2;
00090 };
00091 
00095 struct drm_drawable_info {
00096        unsigned int num_rects;
00097        struct drm_clip_rect *rects;
00098 };
00099 
00103 struct drm_tex_region {
00104        unsigned char next;
00105        unsigned char prev;
00106        unsigned char in_use;
00107        unsigned char padding;
00108        unsigned int age;
00109 };
00110 
00118 struct drm_hw_lock {
00119        __volatile__ unsigned int lock;           
00120        char padding[60];                  
00121 };
00122 
00128 struct drm_version {
00129        int version_major;     
00130        int version_minor;     
00131        int version_patchlevel;       
00132        size_t name_len;       
00133        char *name;     
00134        size_t date_len;       
00135        char *date;     
00136        size_t desc_len;       
00137        char *desc;     
00138 };
00139 
00145 struct drm_unique {
00146        size_t unique_len;     
00147        char *unique;   
00148 };
00149 
00150 struct drm_list {
00151        int count;             
00152        struct drm_version *version;
00153 };
00154 
00155 struct drm_block {
00156        int unused;
00157 };
00158 
00164 struct drm_control {
00165        enum {
00166               DRM_ADD_COMMAND,
00167               DRM_RM_COMMAND,
00168               DRM_INST_HANDLER,
00169               DRM_UNINST_HANDLER
00170        } func;
00171        int irq;
00172 };
00173 
00177 enum drm_map_type {
00178        _DRM_FRAME_BUFFER = 0,        
00179        _DRM_REGISTERS = 1,    
00180        _DRM_SHM = 2,          
00181        _DRM_AGP = 3,          
00182        _DRM_SCATTER_GATHER = 4,  
00183        _DRM_CONSISTENT = 5,   
00184        _DRM_GEM = 6,          
00185 };
00186 
00190 enum drm_map_flags {
00191        _DRM_RESTRICTED = 0x01,          
00192        _DRM_READ_ONLY = 0x02,
00193        _DRM_LOCKED = 0x04,       
00194        _DRM_KERNEL = 0x08,       
00195        _DRM_WRITE_COMBINING = 0x10, 
00196        _DRM_CONTAINS_LOCK = 0x20,   
00197        _DRM_REMOVABLE = 0x40,           
00198        _DRM_DRIVER = 0x80        
00199 };
00200 
00201 struct drm_ctx_priv_map {
00202        unsigned int ctx_id;  
00203        void *handle;         
00204 };
00205 
00212 struct drm_map {
00213        unsigned long offset;        
00214        unsigned long size;   
00215        enum drm_map_type type;      
00216        enum drm_map_flags flags;    
00217        void *handle;         
00219        int mtrr;             
00220        /*   Private data */
00221 };
00222 
00226 struct drm_client {
00227        int idx;             
00228        int auth;            
00229        unsigned long pid;   
00230        unsigned long uid;   
00231        unsigned long magic; 
00232        unsigned long iocs;  
00233 };
00234 
00235 enum drm_stat_type {
00236        _DRM_STAT_LOCK,
00237        _DRM_STAT_OPENS,
00238        _DRM_STAT_CLOSES,
00239        _DRM_STAT_IOCTLS,
00240        _DRM_STAT_LOCKS,
00241        _DRM_STAT_UNLOCKS,
00242        _DRM_STAT_VALUE,     
00243        _DRM_STAT_BYTE,             
00244        _DRM_STAT_COUNT,     
00246        _DRM_STAT_IRQ,              
00247        _DRM_STAT_PRIMARY,   
00248        _DRM_STAT_SECONDARY, 
00249        _DRM_STAT_DMA,              
00250        _DRM_STAT_SPECIAL,   
00251        _DRM_STAT_MISSED     
00252            /* Add to the *END* of the list */
00253 };
00254 
00258 struct drm_stats {
00259        unsigned long count;
00260        struct {
00261               unsigned long value;
00262               enum drm_stat_type type;
00263        } data[15];
00264 };
00265 
00269 enum drm_lock_flags {
00270        _DRM_LOCK_READY = 0x01,          
00271        _DRM_LOCK_QUIESCENT = 0x02,  
00272        _DRM_LOCK_FLUSH = 0x04,          
00273        _DRM_LOCK_FLUSH_ALL = 0x08,  
00274        /* These *HALT* flags aren't supported yet
00275           -- they will be used to support the
00276           full-screen DGA-like mode. */
00277        _DRM_HALT_ALL_QUEUES = 0x10, 
00278        _DRM_HALT_CUR_QUEUES = 0x20  
00279 };
00280 
00286 struct drm_lock {
00287        int context;
00288        enum drm_lock_flags flags;
00289 };
00290 
00299 enum drm_dma_flags {
00300        /* Flags for DMA buffer dispatch */
00301        _DRM_DMA_BLOCK = 0x01,            
00311        _DRM_DMA_WHILE_LOCKED = 0x02, 
00312        _DRM_DMA_PRIORITY = 0x04,     
00314        /* Flags for DMA buffer request */
00315        _DRM_DMA_WAIT = 0x10,             
00316        _DRM_DMA_SMALLER_OK = 0x20,   
00317        _DRM_DMA_LARGER_OK = 0x40     
00318 };
00319 
00325 struct drm_buf_desc {
00326        int count;            
00327        int size;             
00328        int low_mark;         
00329        int high_mark;               
00330        enum {
00331               _DRM_PAGE_ALIGN = 0x01,     
00332               _DRM_AGP_BUFFER = 0x02,     
00333               _DRM_SG_BUFFER = 0x04,      
00334               _DRM_FB_BUFFER = 0x08,      
00335               _DRM_PCI_BUFFER_RO = 0x10 
00336        } flags;
00337        unsigned long agp_start; 
00341 };
00342 
00346 struct drm_buf_info {
00347        int count;           
00348        struct drm_buf_desc *list;
00349 };
00350 
00354 struct drm_buf_free {
00355        int count;
00356        int *list;
00357 };
00358 
00364 struct drm_buf_pub {
00365        int idx;                    
00366        int total;                  
00367        int used;                   
00368        void *address;              
00369 };
00370 
00374 struct drm_buf_map {
00375        int count;           
00376 #ifdef __cplusplus
00377        void *virt;
00378 #else
00379        void *virtual;              
00380 #endif
00381        struct drm_buf_pub *list;   
00382 };
00383 
00391 struct drm_dma {
00392        int context;                  
00393        int send_count;                      
00394        int *send_indices;     
00395        int *send_sizes;              
00396        enum drm_dma_flags flags;     
00397        int request_count;            
00398        int request_size;             
00399        int *request_indices;         
00400        int *request_sizes;
00401        int granted_count;            
00402 };
00403 
00404 enum drm_ctx_flags {
00405        _DRM_CONTEXT_PRESERVED = 0x01,
00406        _DRM_CONTEXT_2DONLY = 0x02
00407 };
00408 
00414 struct drm_ctx {
00415        drm_context_t handle;
00416        enum drm_ctx_flags flags;
00417 };
00418 
00422 struct drm_ctx_res {
00423        int count;
00424        struct drm_ctx *contexts;
00425 };
00426 
00430 struct drm_draw {
00431        drm_drawable_t handle;
00432 };
00433 
00437 typedef enum {
00438        DRM_DRAWABLE_CLIPRECTS,
00439 } drm_drawable_info_type_t;
00440 
00441 struct drm_update_draw {
00442        drm_drawable_t handle;
00443        unsigned int type;
00444        unsigned int num;
00445        unsigned long long data;
00446 };
00447 
00451 struct drm_auth {
00452        drm_magic_t magic;
00453 };
00454 
00460 struct drm_irq_busid {
00461        int irq;      
00462        int busnum;   
00463        int devnum;   
00464        int funcnum;  
00465 };
00466 
00467 enum drm_vblank_seq_type {
00468        _DRM_VBLANK_ABSOLUTE = 0x0, 
00469        _DRM_VBLANK_RELATIVE = 0x1, 
00470        _DRM_VBLANK_EVENT = 0x4000000,   
00471        _DRM_VBLANK_FLIP = 0x8000000,   
00472        _DRM_VBLANK_NEXTONMISS = 0x10000000,      
00473        _DRM_VBLANK_SECONDARY = 0x20000000,       
00474        _DRM_VBLANK_SIGNAL = 0x40000000    
00475 };
00476 
00477 #define _DRM_VBLANK_TYPES_MASK (_DRM_VBLANK_ABSOLUTE | _DRM_VBLANK_RELATIVE)
00478 #define _DRM_VBLANK_FLAGS_MASK (_DRM_VBLANK_EVENT | _DRM_VBLANK_SIGNAL | \
00479                             _DRM_VBLANK_SECONDARY | _DRM_VBLANK_NEXTONMISS)
00480 
00481 struct drm_wait_vblank_request {
00482        enum drm_vblank_seq_type type;
00483        unsigned int sequence;
00484        unsigned long signal;
00485 };
00486 
00487 struct drm_wait_vblank_reply {
00488        enum drm_vblank_seq_type type;
00489        unsigned int sequence;
00490        long tval_sec;
00491        long tval_usec;
00492 };
00493 
00499 union drm_wait_vblank {
00500        struct drm_wait_vblank_request request;
00501        struct drm_wait_vblank_reply reply;
00502 };
00503 
00504 #define _DRM_PRE_MODESET 1
00505 #define _DRM_POST_MODESET 2
00506 
00512 struct drm_modeset_ctl {
00513        __u32 crtc;
00514        __u32 cmd;
00515 };
00516 
00522 struct drm_agp_mode {
00523        unsigned long mode;  
00524 };
00525 
00531 struct drm_agp_buffer {
00532        unsigned long size;  
00533        unsigned long handle;       
00534        unsigned long type;  
00535        unsigned long physical;     
00536 };
00537 
00543 struct drm_agp_binding {
00544        unsigned long handle;       
00545        unsigned long offset;       
00546 };
00547 
00555 struct drm_agp_info {
00556        int agp_version_major;
00557        int agp_version_minor;
00558        unsigned long mode;
00559        unsigned long aperture_base;       /* physical address */
00560        unsigned long aperture_size;       /* bytes */
00561        unsigned long memory_allowed;      /* bytes */
00562        unsigned long memory_used;
00563 
00564        /* PCI information */
00565        unsigned short id_vendor;
00566        unsigned short id_device;
00567 };
00568 
00572 struct drm_scatter_gather {
00573        unsigned long size;  
00574        unsigned long handle;       
00575 };
00576 
00580 struct drm_set_version {
00581        int drm_di_major;
00582        int drm_di_minor;
00583        int drm_dd_major;
00584        int drm_dd_minor;
00585 };
00586 
00588 struct drm_gem_close {
00590        __u32 handle;
00591        __u32 pad;
00592 };
00593 
00595 struct drm_gem_flink {
00597        __u32 handle;
00598 
00600        __u32 name;
00601 };
00602 
00604 struct drm_gem_open {
00606        __u32 name;
00607 
00609        __u32 handle;
00610 
00612        __u64 size;
00613 };
00614 
00616 struct drm_get_cap {
00617        __u64 capability;
00618        __u64 value;
00619 };
00620 
00621 #define DRM_CLOEXEC O_CLOEXEC
00622 struct drm_prime_handle {
00623        __u32 handle;
00624 
00626        __u32 flags;
00627 
00629        __s32 fd;
00630 };
00631 
00632 #include "drm_mode.h"
00633 
00634 #define DRM_IOCTL_BASE                    'd'
00635 #define DRM_IO(nr)                 _IO(DRM_IOCTL_BASE,nr)
00636 #define DRM_IOR(nr,type)           _IOR(DRM_IOCTL_BASE,nr,type)
00637 #define DRM_IOW(nr,type)           _IOW(DRM_IOCTL_BASE,nr,type)
00638 #define DRM_IOWR(nr,type)          _IOWR(DRM_IOCTL_BASE,nr,type)
00639 
00640 #define DRM_IOCTL_VERSION          DRM_IOWR(0x00, struct drm_version)
00641 #define DRM_IOCTL_GET_UNIQUE              DRM_IOWR(0x01, struct drm_unique)
00642 #define DRM_IOCTL_GET_MAGIC        DRM_IOR( 0x02, struct drm_auth)
00643 #define DRM_IOCTL_IRQ_BUSID        DRM_IOWR(0x03, struct drm_irq_busid)
00644 #define DRM_IOCTL_GET_MAP               DRM_IOWR(0x04, struct drm_map)
00645 #define DRM_IOCTL_GET_CLIENT            DRM_IOWR(0x05, struct drm_client)
00646 #define DRM_IOCTL_GET_STATS             DRM_IOR( 0x06, struct drm_stats)
00647 #define DRM_IOCTL_SET_VERSION             DRM_IOWR(0x07, struct drm_set_version)
00648 #define DRM_IOCTL_MODESET_CTL           DRM_IOW(0x08, struct drm_modeset_ctl)
00649 #define DRM_IOCTL_GEM_CLOSE        DRM_IOW (0x09, struct drm_gem_close)
00650 #define DRM_IOCTL_GEM_FLINK        DRM_IOWR(0x0a, struct drm_gem_flink)
00651 #define DRM_IOCTL_GEM_OPEN         DRM_IOWR(0x0b, struct drm_gem_open)
00652 #define DRM_IOCTL_GET_CAP          DRM_IOWR(0x0c, struct drm_get_cap)
00653 
00654 #define DRM_IOCTL_SET_UNIQUE              DRM_IOW( 0x10, struct drm_unique)
00655 #define DRM_IOCTL_AUTH_MAGIC              DRM_IOW( 0x11, struct drm_auth)
00656 #define DRM_IOCTL_BLOCK                   DRM_IOWR(0x12, struct drm_block)
00657 #define DRM_IOCTL_UNBLOCK          DRM_IOWR(0x13, struct drm_block)
00658 #define DRM_IOCTL_CONTROL          DRM_IOW( 0x14, struct drm_control)
00659 #define DRM_IOCTL_ADD_MAP          DRM_IOWR(0x15, struct drm_map)
00660 #define DRM_IOCTL_ADD_BUFS         DRM_IOWR(0x16, struct drm_buf_desc)
00661 #define DRM_IOCTL_MARK_BUFS        DRM_IOW( 0x17, struct drm_buf_desc)
00662 #define DRM_IOCTL_INFO_BUFS        DRM_IOWR(0x18, struct drm_buf_info)
00663 #define DRM_IOCTL_MAP_BUFS         DRM_IOWR(0x19, struct drm_buf_map)
00664 #define DRM_IOCTL_FREE_BUFS        DRM_IOW( 0x1a, struct drm_buf_free)
00665 
00666 #define DRM_IOCTL_RM_MAP           DRM_IOW( 0x1b, struct drm_map)
00667 
00668 #define DRM_IOCTL_SET_SAREA_CTX           DRM_IOW( 0x1c, struct drm_ctx_priv_map)
00669 #define DRM_IOCTL_GET_SAREA_CTX    DRM_IOWR(0x1d, struct drm_ctx_priv_map)
00670 
00671 #define DRM_IOCTL_SET_MASTER            DRM_IO(0x1e)
00672 #define DRM_IOCTL_DROP_MASTER           DRM_IO(0x1f)
00673 
00674 #define DRM_IOCTL_ADD_CTX          DRM_IOWR(0x20, struct drm_ctx)
00675 #define DRM_IOCTL_RM_CTX           DRM_IOWR(0x21, struct drm_ctx)
00676 #define DRM_IOCTL_MOD_CTX          DRM_IOW( 0x22, struct drm_ctx)
00677 #define DRM_IOCTL_GET_CTX          DRM_IOWR(0x23, struct drm_ctx)
00678 #define DRM_IOCTL_SWITCH_CTX              DRM_IOW( 0x24, struct drm_ctx)
00679 #define DRM_IOCTL_NEW_CTX          DRM_IOW( 0x25, struct drm_ctx)
00680 #define DRM_IOCTL_RES_CTX          DRM_IOWR(0x26, struct drm_ctx_res)
00681 #define DRM_IOCTL_ADD_DRAW         DRM_IOWR(0x27, struct drm_draw)
00682 #define DRM_IOCTL_RM_DRAW          DRM_IOWR(0x28, struct drm_draw)
00683 #define DRM_IOCTL_DMA                     DRM_IOWR(0x29, struct drm_dma)
00684 #define DRM_IOCTL_LOCK                    DRM_IOW( 0x2a, struct drm_lock)
00685 #define DRM_IOCTL_UNLOCK           DRM_IOW( 0x2b, struct drm_lock)
00686 #define DRM_IOCTL_FINISH           DRM_IOW( 0x2c, struct drm_lock)
00687 
00688 #define DRM_IOCTL_AGP_ACQUIRE             DRM_IO(  0x30)
00689 #define DRM_IOCTL_AGP_RELEASE             DRM_IO(  0x31)
00690 #define DRM_IOCTL_AGP_ENABLE              DRM_IOW( 0x32, struct drm_agp_mode)
00691 #define DRM_IOCTL_AGP_INFO         DRM_IOR( 0x33, struct drm_agp_info)
00692 #define DRM_IOCTL_AGP_ALLOC        DRM_IOWR(0x34, struct drm_agp_buffer)
00693 #define DRM_IOCTL_AGP_FREE         DRM_IOW( 0x35, struct drm_agp_buffer)
00694 #define DRM_IOCTL_AGP_BIND         DRM_IOW( 0x36, struct drm_agp_binding)
00695 #define DRM_IOCTL_AGP_UNBIND              DRM_IOW( 0x37, struct drm_agp_binding)
00696 
00697 #define DRM_IOCTL_SG_ALLOC         DRM_IOWR(0x38, struct drm_scatter_gather)
00698 #define DRM_IOCTL_SG_FREE          DRM_IOW( 0x39, struct drm_scatter_gather)
00699 
00700 #define DRM_IOCTL_PRIME_HANDLE_TO_FD    DRM_IOWR(0x2d, struct drm_prime_handle)
00701 #define DRM_IOCTL_PRIME_FD_TO_HANDLE    DRM_IOWR(0x2e, struct drm_prime_handle)
00702 
00703 #define DRM_IOCTL_WAIT_VBLANK             DRM_IOWR(0x3a, union drm_wait_vblank)
00704 
00705 #define DRM_IOCTL_UPDATE_DRAW             DRM_IOW(0x3f, struct drm_update_draw)
00706 
00707 #define DRM_IOCTL_MODE_GETRESOURCES       DRM_IOWR(0xA0, struct drm_mode_card_res)
00708 #define DRM_IOCTL_MODE_GETCRTC            DRM_IOWR(0xA1, struct drm_mode_crtc)
00709 #define DRM_IOCTL_MODE_SETCRTC            DRM_IOWR(0xA2, struct drm_mode_crtc)
00710 #define DRM_IOCTL_MODE_CURSOR             DRM_IOWR(0xA3, struct drm_mode_cursor)
00711 #define DRM_IOCTL_MODE_GETGAMMA           DRM_IOWR(0xA4, struct drm_mode_crtc_lut)
00712 #define DRM_IOCTL_MODE_SETGAMMA           DRM_IOWR(0xA5, struct drm_mode_crtc_lut)
00713 #define DRM_IOCTL_MODE_GETENCODER  DRM_IOWR(0xA6, struct drm_mode_get_encoder)
00714 #define DRM_IOCTL_MODE_GETCONNECTOR       DRM_IOWR(0xA7, struct drm_mode_get_connector)
00715 #define DRM_IOCTL_MODE_ATTACHMODE  DRM_IOWR(0xA8, struct drm_mode_mode_cmd)
00716 #define DRM_IOCTL_MODE_DETACHMODE  DRM_IOWR(0xA9, struct drm_mode_mode_cmd)
00717 
00718 #define DRM_IOCTL_MODE_GETPROPERTY DRM_IOWR(0xAA, struct drm_mode_get_property)
00719 #define DRM_IOCTL_MODE_SETPROPERTY DRM_IOWR(0xAB, struct drm_mode_connector_set_property)
00720 #define DRM_IOCTL_MODE_GETPROPBLOB DRM_IOWR(0xAC, struct drm_mode_get_blob)
00721 #define DRM_IOCTL_MODE_GETFB              DRM_IOWR(0xAD, struct drm_mode_fb_cmd)
00722 #define DRM_IOCTL_MODE_ADDFB              DRM_IOWR(0xAE, struct drm_mode_fb_cmd)
00723 #define DRM_IOCTL_MODE_RMFB        DRM_IOWR(0xAF, unsigned int)
00724 #define DRM_IOCTL_MODE_PAGE_FLIP   DRM_IOWR(0xB0, struct drm_mode_crtc_page_flip)
00725 #define DRM_IOCTL_MODE_DIRTYFB            DRM_IOWR(0xB1, struct drm_mode_fb_dirty_cmd)
00726 
00727 #define DRM_IOCTL_MODE_CREATE_DUMB DRM_IOWR(0xB2, struct drm_mode_create_dumb)
00728 #define DRM_IOCTL_MODE_MAP_DUMB    DRM_IOWR(0xB3, struct drm_mode_map_dumb)
00729 #define DRM_IOCTL_MODE_DESTROY_DUMB    DRM_IOWR(0xB4, struct drm_mode_destroy_dumb)
00730 #define DRM_IOCTL_MODE_GETPLANERESOURCES DRM_IOWR(0xB5, struct drm_mode_get_plane_res)
00731 #define DRM_IOCTL_MODE_GETPLANE    DRM_IOWR(0xB6, struct drm_mode_get_plane)
00732 #define DRM_IOCTL_MODE_SETPLANE    DRM_IOWR(0xB7, struct drm_mode_set_plane)
00733 #define DRM_IOCTL_MODE_ADDFB2             DRM_IOWR(0xB8, struct drm_mode_fb_cmd2)
00734 #define DRM_IOCTL_MODE_OBJ_GETPROPERTIES  DRM_IOWR(0xB9, struct drm_mode_obj_get_properties)
00735 #define DRM_IOCTL_MODE_OBJ_SETPROPERTY    DRM_IOWR(0xBA, struct drm_mode_obj_set_property)
00736 
00745 #define DRM_COMMAND_BASE                0x40
00746 #define DRM_COMMAND_END                   0xA0
00747 
00760 struct drm_event {
00761        __u32 type;
00762        __u32 length;
00763 };
00764 
00765 #define DRM_EVENT_VBLANK 0x01
00766 #define DRM_EVENT_FLIP_COMPLETE 0x02
00767 
00768 struct drm_event_vblank {
00769        struct drm_event base;
00770        __u64 user_data;
00771        __u32 tv_sec;
00772        __u32 tv_usec;
00773        __u32 sequence;
00774        __u32 reserved;
00775 };
00776 
00777 #define DRM_CAP_DUMB_BUFFER 0x1
00778 #define DRM_CAP_VBLANK_HIGH_CRTC   0x2
00779 
00780 /* typedef area */
00781 typedef struct drm_clip_rect drm_clip_rect_t;
00782 typedef struct drm_drawable_info drm_drawable_info_t;
00783 typedef struct drm_tex_region drm_tex_region_t;
00784 typedef struct drm_hw_lock drm_hw_lock_t;
00785 typedef struct drm_version drm_version_t;
00786 typedef struct drm_unique drm_unique_t;
00787 typedef struct drm_list drm_list_t;
00788 typedef struct drm_block drm_block_t;
00789 typedef struct drm_control drm_control_t;
00790 typedef enum drm_map_type drm_map_type_t;
00791 typedef enum drm_map_flags drm_map_flags_t;
00792 typedef struct drm_ctx_priv_map drm_ctx_priv_map_t;
00793 typedef struct drm_map drm_map_t;
00794 typedef struct drm_client drm_client_t;
00795 typedef enum drm_stat_type drm_stat_type_t;
00796 typedef struct drm_stats drm_stats_t;
00797 typedef enum drm_lock_flags drm_lock_flags_t;
00798 typedef struct drm_lock drm_lock_t;
00799 typedef enum drm_dma_flags drm_dma_flags_t;
00800 typedef struct drm_buf_desc drm_buf_desc_t;
00801 typedef struct drm_buf_info drm_buf_info_t;
00802 typedef struct drm_buf_free drm_buf_free_t;
00803 typedef struct drm_buf_pub drm_buf_pub_t;
00804 typedef struct drm_buf_map drm_buf_map_t;
00805 typedef struct drm_dma drm_dma_t;
00806 typedef union drm_wait_vblank drm_wait_vblank_t;
00807 typedef struct drm_agp_mode drm_agp_mode_t;
00808 typedef enum drm_ctx_flags drm_ctx_flags_t;
00809 typedef struct drm_ctx drm_ctx_t;
00810 typedef struct drm_ctx_res drm_ctx_res_t;
00811 typedef struct drm_draw drm_draw_t;
00812 typedef struct drm_update_draw drm_update_draw_t;
00813 typedef struct drm_auth drm_auth_t;
00814 typedef struct drm_irq_busid drm_irq_busid_t;
00815 typedef enum drm_vblank_seq_type drm_vblank_seq_type_t;
00816 
00817 typedef struct drm_agp_buffer drm_agp_buffer_t;
00818 typedef struct drm_agp_binding drm_agp_binding_t;
00819 typedef struct drm_agp_info drm_agp_info_t;
00820 typedef struct drm_scatter_gather drm_scatter_gather_t;
00821 typedef struct drm_set_version drm_set_version_t;
00822 
00823 #endif