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 _I810_DRM_H_ 20 #define _I810_DRM_H_ 21 #include <drm/drm.h> 22 #ifndef _I810_DEFINES_ 23 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 24 #define _I810_DEFINES_ 25 #define I810_DMA_BUF_ORDER 12 26 #define I810_DMA_BUF_SZ (1 << I810_DMA_BUF_ORDER) 27 #define I810_DMA_BUF_NR 256 28 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 29 #define I810_NR_SAREA_CLIPRECTS 8 30 #define I810_NR_TEX_REGIONS 64 31 #define I810_LOG_MIN_TEX_REGION_SIZE 16 32 #endif 33 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 34 #define I810_UPLOAD_TEX0IMAGE 0x1 35 #define I810_UPLOAD_TEX1IMAGE 0x2 36 #define I810_UPLOAD_CTX 0x4 37 #define I810_UPLOAD_BUFFERS 0x8 38 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 39 #define I810_UPLOAD_TEX0 0x10 40 #define I810_UPLOAD_TEX1 0x20 41 #define I810_UPLOAD_CLIPRECTS 0x40 42 #define I810_DESTREG_DI0 0 43 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 44 #define I810_DESTREG_DI1 1 45 #define I810_DESTREG_DV0 2 46 #define I810_DESTREG_DV1 3 47 #define I810_DESTREG_DR0 4 48 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 49 #define I810_DESTREG_DR1 5 50 #define I810_DESTREG_DR2 6 51 #define I810_DESTREG_DR3 7 52 #define I810_DESTREG_DR4 8 53 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 54 #define I810_DEST_SETUP_SIZE 10 55 #define I810_CTXREG_CF0 0 56 #define I810_CTXREG_CF1 1 57 #define I810_CTXREG_ST0 2 58 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 59 #define I810_CTXREG_ST1 3 60 #define I810_CTXREG_VF 4 61 #define I810_CTXREG_MT 5 62 #define I810_CTXREG_MC0 6 63 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 64 #define I810_CTXREG_MC1 7 65 #define I810_CTXREG_MC2 8 66 #define I810_CTXREG_MA0 9 67 #define I810_CTXREG_MA1 10 68 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 69 #define I810_CTXREG_MA2 11 70 #define I810_CTXREG_SDM 12 71 #define I810_CTXREG_FOG 13 72 #define I810_CTXREG_B1 14 73 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 74 #define I810_CTXREG_B2 15 75 #define I810_CTXREG_LCS 16 76 #define I810_CTXREG_PV 17 77 #define I810_CTXREG_ZA 18 78 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 79 #define I810_CTXREG_AA 19 80 #define I810_CTX_SETUP_SIZE 20 81 #define I810_TEXREG_MI0 0 82 #define I810_TEXREG_MI1 1 83 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 84 #define I810_TEXREG_MI2 2 85 #define I810_TEXREG_MI3 3 86 #define I810_TEXREG_MF 4 87 #define I810_TEXREG_MLC 5 88 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 89 #define I810_TEXREG_MLL 6 90 #define I810_TEXREG_MCS 7 91 #define I810_TEX_SETUP_SIZE 8 92 #define I810_FRONT 0x1 93 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 94 #define I810_BACK 0x2 95 #define I810_DEPTH 0x4 96 typedef enum _drm_i810_init_func { 97 I810_INIT_DMA = 0x01, 98 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 99 I810_CLEANUP_DMA = 0x02, 100 I810_INIT_DMA_1_4 = 0x03 101 } drm_i810_init_func_t; 102 typedef struct _drm_i810_init { 103 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 104 drm_i810_init_func_t func; 105 unsigned int mmio_offset; 106 unsigned int buffers_offset; 107 int sarea_priv_offset; 108 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 109 unsigned int ring_start; 110 unsigned int ring_end; 111 unsigned int ring_size; 112 unsigned int front_offset; 113 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 114 unsigned int back_offset; 115 unsigned int depth_offset; 116 unsigned int overlay_offset; 117 unsigned int overlay_physical; 118 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 119 unsigned int w; 120 unsigned int h; 121 unsigned int pitch; 122 unsigned int pitch_bits; 123 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 124 } drm_i810_init_t; 125 typedef struct _drm_i810_pre12_init { 126 drm_i810_init_func_t func; 127 unsigned int mmio_offset; 128 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 129 unsigned int buffers_offset; 130 int sarea_priv_offset; 131 unsigned int ring_start; 132 unsigned int ring_end; 133 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 134 unsigned int ring_size; 135 unsigned int front_offset; 136 unsigned int back_offset; 137 unsigned int depth_offset; 138 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 139 unsigned int w; 140 unsigned int h; 141 unsigned int pitch; 142 unsigned int pitch_bits; 143 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 144 } drm_i810_pre12_init_t; 145 typedef struct _drm_i810_tex_region { 146 unsigned char next, prev; 147 unsigned char in_use; 148 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 149 int age; 150 } drm_i810_tex_region_t; 151 typedef struct _drm_i810_sarea { 152 unsigned int ContextState[I810_CTX_SETUP_SIZE]; 153 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 154 unsigned int BufferState[I810_DEST_SETUP_SIZE]; 155 unsigned int TexState[2][I810_TEX_SETUP_SIZE]; 156 unsigned int dirty; 157 unsigned int nbox; 158 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 159 struct drm_clip_rect boxes[I810_NR_SAREA_CLIPRECTS]; 160 drm_i810_tex_region_t texList[I810_NR_TEX_REGIONS + 1]; 161 int texAge; 162 int last_enqueue; 163 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 164 int last_dispatch; 165 int last_quiescent; 166 int ctxOwner; 167 int vertex_prim; 168 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 169 int pf_enabled; 170 int pf_active; 171 int pf_current_page; 172 } drm_i810_sarea_t; 173 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 174 #define DRM_I810_INIT 0x00 175 #define DRM_I810_VERTEX 0x01 176 #define DRM_I810_CLEAR 0x02 177 #define DRM_I810_FLUSH 0x03 178 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 179 #define DRM_I810_GETAGE 0x04 180 #define DRM_I810_GETBUF 0x05 181 #define DRM_I810_SWAP 0x06 182 #define DRM_I810_COPY 0x07 183 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 184 #define DRM_I810_DOCOPY 0x08 185 #define DRM_I810_OV0INFO 0x09 186 #define DRM_I810_FSTATUS 0x0a 187 #define DRM_I810_OV0FLIP 0x0b 188 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 189 #define DRM_I810_MC 0x0c 190 #define DRM_I810_RSTATUS 0x0d 191 #define DRM_I810_FLIP 0x0e 192 #define DRM_IOCTL_I810_INIT DRM_IOW(DRM_COMMAND_BASE + DRM_I810_INIT, drm_i810_init_t) 193 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 194 #define DRM_IOCTL_I810_VERTEX DRM_IOW(DRM_COMMAND_BASE + DRM_I810_VERTEX, drm_i810_vertex_t) 195 #define DRM_IOCTL_I810_CLEAR DRM_IOW(DRM_COMMAND_BASE + DRM_I810_CLEAR, drm_i810_clear_t) 196 #define DRM_IOCTL_I810_FLUSH DRM_IO(DRM_COMMAND_BASE + DRM_I810_FLUSH) 197 #define DRM_IOCTL_I810_GETAGE DRM_IO(DRM_COMMAND_BASE + DRM_I810_GETAGE) 198 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 199 #define DRM_IOCTL_I810_GETBUF DRM_IOWR(DRM_COMMAND_BASE + DRM_I810_GETBUF, drm_i810_dma_t) 200 #define DRM_IOCTL_I810_SWAP DRM_IO(DRM_COMMAND_BASE + DRM_I810_SWAP) 201 #define DRM_IOCTL_I810_COPY DRM_IOW(DRM_COMMAND_BASE + DRM_I810_COPY, drm_i810_copy_t) 202 #define DRM_IOCTL_I810_DOCOPY DRM_IO(DRM_COMMAND_BASE + DRM_I810_DOCOPY) 203 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 204 #define DRM_IOCTL_I810_OV0INFO DRM_IOR(DRM_COMMAND_BASE + DRM_I810_OV0INFO, drm_i810_overlay_t) 205 #define DRM_IOCTL_I810_FSTATUS DRM_IO(DRM_COMMAND_BASE + DRM_I810_FSTATUS) 206 #define DRM_IOCTL_I810_OV0FLIP DRM_IO(DRM_COMMAND_BASE + DRM_I810_OV0FLIP) 207 #define DRM_IOCTL_I810_MC DRM_IOW(DRM_COMMAND_BASE + DRM_I810_MC, drm_i810_mc_t) 208 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 209 #define DRM_IOCTL_I810_RSTATUS DRM_IO(DRM_COMMAND_BASE + DRM_I810_RSTATUS) 210 #define DRM_IOCTL_I810_FLIP DRM_IO(DRM_COMMAND_BASE + DRM_I810_FLIP) 211 typedef struct _drm_i810_clear { 212 int clear_color; 213 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 214 int clear_depth; 215 int flags; 216 } drm_i810_clear_t; 217 typedef struct _drm_i810_vertex { 218 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 219 int idx; 220 int used; 221 int discard; 222 } drm_i810_vertex_t; 223 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 224 typedef struct _drm_i810_copy_t { 225 int idx; 226 int used; 227 void * address; 228 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 229 } drm_i810_copy_t; 230 #define PR_TRIANGLES (0x0 << 18) 231 #define PR_TRISTRIP_0 (0x1 << 18) 232 #define PR_TRISTRIP_1 (0x2 << 18) 233 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 234 #define PR_TRIFAN (0x3 << 18) 235 #define PR_POLYGON (0x4 << 18) 236 #define PR_LINES (0x5 << 18) 237 #define PR_LINESTRIP (0x6 << 18) 238 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 239 #define PR_RECTS (0x7 << 18) 240 #define PR_MASK (0x7 << 18) 241 typedef struct drm_i810_dma { 242 void * virtual; 243 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 244 int request_idx; 245 int request_size; 246 int granted; 247 } drm_i810_dma_t; 248 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 249 typedef struct _drm_i810_overlay_t { 250 unsigned int offset; 251 unsigned int physical; 252 } drm_i810_overlay_t; 253 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 254 typedef struct _drm_i810_mc { 255 int idx; 256 int used; 257 int num_blocks; 258 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 259 int * length; 260 unsigned int last_render; 261 } drm_i810_mc_t; 262 #endif 263 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 264