1 /**************************************************************************** 2 **************************************************************************** 3 *** 4 *** This header was automatically generated from a Linux kernel header 5 *** of the same name, to make information necessary for userspace to 6 *** call into the kernel available to libc. It contains only constants, 7 *** structures, and macros generated from the original header, and thus, 8 *** contains no copyrightable information. 9 *** 10 *** To edit the content of this header, modify the corresponding 11 *** source file (e.g. under external/kernel-headers/original/) then 12 *** run bionic/libc/kernel/tools/update_all.py 13 *** 14 *** Any manual change here will be lost the next time this script will 15 *** be run. You've been warned! 16 *** 17 **************************************************************************** 18 ****************************************************************************/ 19 #ifndef __SAVAGE_DRM_H__ 20 #define __SAVAGE_DRM_H__ 21 #include <drm/drm.h> 22 #ifndef __SAVAGE_SAREA_DEFINES__ 23 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 24 #define __SAVAGE_SAREA_DEFINES__ 25 #define SAVAGE_CARD_HEAP 0 26 #define SAVAGE_AGP_HEAP 1 27 #define SAVAGE_NR_TEX_HEAPS 2 28 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 29 #define SAVAGE_NR_TEX_REGIONS 16 30 #define SAVAGE_LOG_MIN_TEX_REGION_SIZE 16 31 #endif 32 typedef struct _drm_savage_sarea { 33 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 34 struct drm_tex_region texList[SAVAGE_NR_TEX_HEAPS][SAVAGE_NR_TEX_REGIONS + 1]; 35 unsigned int texAge[SAVAGE_NR_TEX_HEAPS]; 36 int ctxOwner; 37 } drm_savage_sarea_t, * drm_savage_sarea_ptr; 38 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 39 #define DRM_SAVAGE_BCI_INIT 0x00 40 #define DRM_SAVAGE_BCI_CMDBUF 0x01 41 #define DRM_SAVAGE_BCI_EVENT_EMIT 0x02 42 #define DRM_SAVAGE_BCI_EVENT_WAIT 0x03 43 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 44 #define DRM_IOCTL_SAVAGE_BCI_INIT DRM_IOW(DRM_COMMAND_BASE + DRM_SAVAGE_BCI_INIT, drm_savage_init_t) 45 #define DRM_IOCTL_SAVAGE_BCI_CMDBUF DRM_IOW(DRM_COMMAND_BASE + DRM_SAVAGE_BCI_CMDBUF, drm_savage_cmdbuf_t) 46 #define DRM_IOCTL_SAVAGE_BCI_EVENT_EMIT DRM_IOWR(DRM_COMMAND_BASE + DRM_SAVAGE_BCI_EVENT_EMIT, drm_savage_event_emit_t) 47 #define DRM_IOCTL_SAVAGE_BCI_EVENT_WAIT DRM_IOW(DRM_COMMAND_BASE + DRM_SAVAGE_BCI_EVENT_WAIT, drm_savage_event_wait_t) 48 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 49 #define SAVAGE_DMA_PCI 1 50 #define SAVAGE_DMA_AGP 3 51 typedef struct drm_savage_init { 52 enum { 53 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 54 SAVAGE_INIT_BCI = 1, 55 SAVAGE_CLEANUP_BCI = 2 56 } func; 57 unsigned int sarea_priv_offset; 58 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 59 unsigned int cob_size; 60 unsigned int bci_threshold_lo, bci_threshold_hi; 61 unsigned int dma_type; 62 unsigned int fb_bpp; 63 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 64 unsigned int front_offset, front_pitch; 65 unsigned int back_offset, back_pitch; 66 unsigned int depth_bpp; 67 unsigned int depth_offset, depth_pitch; 68 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 69 unsigned int texture_offset; 70 unsigned int texture_size; 71 unsigned long status_offset; 72 unsigned long buffers_offset; 73 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 74 unsigned long agp_textures_offset; 75 unsigned long cmd_dma_offset; 76 } drm_savage_init_t; 77 typedef union drm_savage_cmd_header drm_savage_cmd_header_t; 78 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 79 typedef struct drm_savage_cmdbuf { 80 drm_savage_cmd_header_t __user * cmd_addr; 81 unsigned int size; 82 unsigned int dma_idx; 83 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 84 int discard; 85 unsigned int __user * vb_addr; 86 unsigned int vb_size; 87 unsigned int vb_stride; 88 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 89 struct drm_clip_rect __user * box_addr; 90 unsigned int nbox; 91 } drm_savage_cmdbuf_t; 92 #define SAVAGE_WAIT_2D 0x1 93 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 94 #define SAVAGE_WAIT_3D 0x2 95 #define SAVAGE_WAIT_IRQ 0x4 96 typedef struct drm_savage_event { 97 unsigned int count; 98 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 99 unsigned int flags; 100 } drm_savage_event_emit_t, drm_savage_event_wait_t; 101 #define SAVAGE_CMD_STATE 0 102 #define SAVAGE_CMD_DMA_PRIM 1 103 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 104 #define SAVAGE_CMD_VB_PRIM 2 105 #define SAVAGE_CMD_DMA_IDX 3 106 #define SAVAGE_CMD_VB_IDX 4 107 #define SAVAGE_CMD_CLEAR 5 108 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 109 #define SAVAGE_CMD_SWAP 6 110 #define SAVAGE_PRIM_TRILIST 0 111 #define SAVAGE_PRIM_TRISTRIP 1 112 #define SAVAGE_PRIM_TRIFAN 2 113 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 114 #define SAVAGE_PRIM_TRILIST_201 3 115 #define SAVAGE_SKIP_Z 0x01 116 #define SAVAGE_SKIP_W 0x02 117 #define SAVAGE_SKIP_C0 0x04 118 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 119 #define SAVAGE_SKIP_C1 0x08 120 #define SAVAGE_SKIP_S0 0x10 121 #define SAVAGE_SKIP_T0 0x20 122 #define SAVAGE_SKIP_ST0 0x30 123 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 124 #define SAVAGE_SKIP_S1 0x40 125 #define SAVAGE_SKIP_T1 0x80 126 #define SAVAGE_SKIP_ST1 0xc0 127 #define SAVAGE_SKIP_ALL_S3D 0x3f 128 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 129 #define SAVAGE_SKIP_ALL_S4 0xff 130 #define SAVAGE_FRONT 0x1 131 #define SAVAGE_BACK 0x2 132 #define SAVAGE_DEPTH 0x4 133 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 134 union drm_savage_cmd_header { 135 struct { 136 unsigned char cmd; 137 unsigned char pad0; 138 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 139 unsigned short pad1; 140 unsigned short pad2; 141 unsigned short pad3; 142 } cmd; 143 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 144 struct { 145 unsigned char cmd; 146 unsigned char global; 147 unsigned short count; 148 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 149 unsigned short start; 150 unsigned short pad3; 151 } state; 152 struct { 153 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 154 unsigned char cmd; 155 unsigned char prim; 156 unsigned short skip; 157 unsigned short count; 158 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 159 unsigned short start; 160 } prim; 161 struct { 162 unsigned char cmd; 163 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 164 unsigned char prim; 165 unsigned short skip; 166 unsigned short count; 167 unsigned short pad3; 168 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 169 } idx; 170 struct { 171 unsigned char cmd; 172 unsigned char pad0; 173 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 174 unsigned short pad1; 175 unsigned int flags; 176 } clear0; 177 struct { 178 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 179 unsigned int mask; 180 unsigned int value; 181 } clear1; 182 }; 183 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 184 #endif 185