blob: ebe33325b78781ac2b444171a749980f2c8017ef [file] [log] [blame]
Ben Cheng655a7c02013-10-16 16:09:24 -07001/****************************************************************************
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#ifndef _I810_DEFINES_
22#define _I810_DEFINES_
23/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
24#define I810_DMA_BUF_ORDER 12
Tao Baod7db5942015-01-28 10:07:51 -080025#define I810_DMA_BUF_SZ (1 << I810_DMA_BUF_ORDER)
Ben Cheng655a7c02013-10-16 16:09:24 -070026#define I810_DMA_BUF_NR 256
27#define I810_NR_SAREA_CLIPRECTS 8
28/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
29#define I810_NR_TEX_REGIONS 64
30#define I810_LOG_MIN_TEX_REGION_SIZE 16
31#endif
32#define I810_UPLOAD_TEX0IMAGE 0x1
33/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
34#define I810_UPLOAD_TEX1IMAGE 0x2
35#define I810_UPLOAD_CTX 0x4
36#define I810_UPLOAD_BUFFERS 0x8
37#define I810_UPLOAD_TEX0 0x10
38/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
39#define I810_UPLOAD_TEX1 0x20
40#define I810_UPLOAD_CLIPRECTS 0x40
41#define I810_DESTREG_DI0 0
42#define I810_DESTREG_DI1 1
43/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
44#define I810_DESTREG_DV0 2
45#define I810_DESTREG_DV1 3
46#define I810_DESTREG_DR0 4
47#define I810_DESTREG_DR1 5
48/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
49#define I810_DESTREG_DR2 6
50#define I810_DESTREG_DR3 7
51#define I810_DESTREG_DR4 8
52#define I810_DEST_SETUP_SIZE 10
53/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
54#define I810_CTXREG_CF0 0
55#define I810_CTXREG_CF1 1
56#define I810_CTXREG_ST0 2
57#define I810_CTXREG_ST1 3
58/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
59#define I810_CTXREG_VF 4
60#define I810_CTXREG_MT 5
61#define I810_CTXREG_MC0 6
62#define I810_CTXREG_MC1 7
63/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
64#define I810_CTXREG_MC2 8
65#define I810_CTXREG_MA0 9
66#define I810_CTXREG_MA1 10
67#define I810_CTXREG_MA2 11
68/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
69#define I810_CTXREG_SDM 12
70#define I810_CTXREG_FOG 13
71#define I810_CTXREG_B1 14
72#define I810_CTXREG_B2 15
73/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
74#define I810_CTXREG_LCS 16
75#define I810_CTXREG_PV 17
76#define I810_CTXREG_ZA 18
77#define I810_CTXREG_AA 19
78/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
79#define I810_CTX_SETUP_SIZE 20
80#define I810_TEXREG_MI0 0
81#define I810_TEXREG_MI1 1
82#define I810_TEXREG_MI2 2
83/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
84#define I810_TEXREG_MI3 3
85#define I810_TEXREG_MF 4
86#define I810_TEXREG_MLC 5
87#define I810_TEXREG_MLL 6
88/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
89#define I810_TEXREG_MCS 7
90#define I810_TEX_SETUP_SIZE 8
91#define I810_FRONT 0x1
92#define I810_BACK 0x2
93/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
94#define I810_DEPTH 0x4
95typedef enum _drm_i810_init_func {
Tao Baod7db5942015-01-28 10:07:51 -080096 I810_INIT_DMA = 0x01,
97 I810_CLEANUP_DMA = 0x02,
Ben Cheng655a7c02013-10-16 16:09:24 -070098/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080099 I810_INIT_DMA_1_4 = 0x03
Ben Cheng655a7c02013-10-16 16:09:24 -0700100} drm_i810_init_func_t;
101typedef struct _drm_i810_init {
Tao Baod7db5942015-01-28 10:07:51 -0800102 drm_i810_init_func_t func;
Ben Cheng655a7c02013-10-16 16:09:24 -0700103/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800104 unsigned int mmio_offset;
105 unsigned int buffers_offset;
106 int sarea_priv_offset;
107 unsigned int ring_start;
Ben Cheng655a7c02013-10-16 16:09:24 -0700108/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800109 unsigned int ring_end;
110 unsigned int ring_size;
111 unsigned int front_offset;
112 unsigned int back_offset;
Ben Cheng655a7c02013-10-16 16:09:24 -0700113/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800114 unsigned int depth_offset;
115 unsigned int overlay_offset;
116 unsigned int overlay_physical;
117 unsigned int w;
Ben Cheng655a7c02013-10-16 16:09:24 -0700118/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800119 unsigned int h;
120 unsigned int pitch;
121 unsigned int pitch_bits;
Ben Cheng655a7c02013-10-16 16:09:24 -0700122} drm_i810_init_t;
123/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
124typedef struct _drm_i810_pre12_init {
Tao Baod7db5942015-01-28 10:07:51 -0800125 drm_i810_init_func_t func;
126 unsigned int mmio_offset;
127 unsigned int buffers_offset;
Ben Cheng655a7c02013-10-16 16:09:24 -0700128/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800129 int sarea_priv_offset;
130 unsigned int ring_start;
131 unsigned int ring_end;
132 unsigned int ring_size;
Ben Cheng655a7c02013-10-16 16:09:24 -0700133/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800134 unsigned int front_offset;
135 unsigned int back_offset;
136 unsigned int depth_offset;
137 unsigned int w;
Ben Cheng655a7c02013-10-16 16:09:24 -0700138/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800139 unsigned int h;
140 unsigned int pitch;
141 unsigned int pitch_bits;
Ben Cheng655a7c02013-10-16 16:09:24 -0700142} drm_i810_pre12_init_t;
143/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
144typedef struct _drm_i810_tex_region {
Tao Baod7db5942015-01-28 10:07:51 -0800145 unsigned char next, prev;
146 unsigned char in_use;
147 int age;
Ben Cheng655a7c02013-10-16 16:09:24 -0700148/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
149} drm_i810_tex_region_t;
150typedef struct _drm_i810_sarea {
Tao Baod7db5942015-01-28 10:07:51 -0800151 unsigned int ContextState[I810_CTX_SETUP_SIZE];
152 unsigned int BufferState[I810_DEST_SETUP_SIZE];
Ben Cheng655a7c02013-10-16 16:09:24 -0700153/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800154 unsigned int TexState[2][I810_TEX_SETUP_SIZE];
155 unsigned int dirty;
156 unsigned int nbox;
157 struct drm_clip_rect boxes[I810_NR_SAREA_CLIPRECTS];
Ben Cheng655a7c02013-10-16 16:09:24 -0700158/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800159 drm_i810_tex_region_t texList[I810_NR_TEX_REGIONS + 1];
160 int texAge;
161 int last_enqueue;
162 int last_dispatch;
Ben Cheng655a7c02013-10-16 16:09:24 -0700163/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800164 int last_quiescent;
165 int ctxOwner;
166 int vertex_prim;
167 int pf_enabled;
Ben Cheng655a7c02013-10-16 16:09:24 -0700168/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800169 int pf_active;
170 int pf_current_page;
Ben Cheng655a7c02013-10-16 16:09:24 -0700171} drm_i810_sarea_t;
172#define DRM_I810_INIT 0x00
173/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
174#define DRM_I810_VERTEX 0x01
175#define DRM_I810_CLEAR 0x02
176#define DRM_I810_FLUSH 0x03
177#define DRM_I810_GETAGE 0x04
178/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
179#define DRM_I810_GETBUF 0x05
180#define DRM_I810_SWAP 0x06
181#define DRM_I810_COPY 0x07
182#define DRM_I810_DOCOPY 0x08
183/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
184#define DRM_I810_OV0INFO 0x09
185#define DRM_I810_FSTATUS 0x0a
186#define DRM_I810_OV0FLIP 0x0b
187#define DRM_I810_MC 0x0c
188/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
189#define DRM_I810_RSTATUS 0x0d
190#define DRM_I810_FLIP 0x0e
Tao Baod7db5942015-01-28 10:07:51 -0800191#define DRM_IOCTL_I810_INIT DRM_IOW(DRM_COMMAND_BASE + DRM_I810_INIT, drm_i810_init_t)
192#define DRM_IOCTL_I810_VERTEX DRM_IOW(DRM_COMMAND_BASE + DRM_I810_VERTEX, drm_i810_vertex_t)
Ben Cheng655a7c02013-10-16 16:09:24 -0700193/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800194#define DRM_IOCTL_I810_CLEAR DRM_IOW(DRM_COMMAND_BASE + DRM_I810_CLEAR, drm_i810_clear_t)
195#define DRM_IOCTL_I810_FLUSH DRM_IO(DRM_COMMAND_BASE + DRM_I810_FLUSH)
196#define DRM_IOCTL_I810_GETAGE DRM_IO(DRM_COMMAND_BASE + DRM_I810_GETAGE)
Ben Cheng655a7c02013-10-16 16:09:24 -0700197#define DRM_IOCTL_I810_GETBUF DRM_IOWR(DRM_COMMAND_BASE + DRM_I810_GETBUF, drm_i810_dma_t)
198/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800199#define DRM_IOCTL_I810_SWAP DRM_IO(DRM_COMMAND_BASE + DRM_I810_SWAP)
200#define DRM_IOCTL_I810_COPY DRM_IOW(DRM_COMMAND_BASE + DRM_I810_COPY, drm_i810_copy_t)
201#define DRM_IOCTL_I810_DOCOPY DRM_IO(DRM_COMMAND_BASE + DRM_I810_DOCOPY)
202#define DRM_IOCTL_I810_OV0INFO DRM_IOR(DRM_COMMAND_BASE + DRM_I810_OV0INFO, drm_i810_overlay_t)
Ben Cheng655a7c02013-10-16 16:09:24 -0700203/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800204#define DRM_IOCTL_I810_FSTATUS DRM_IO(DRM_COMMAND_BASE + DRM_I810_FSTATUS)
205#define DRM_IOCTL_I810_OV0FLIP DRM_IO(DRM_COMMAND_BASE + DRM_I810_OV0FLIP)
206#define DRM_IOCTL_I810_MC DRM_IOW(DRM_COMMAND_BASE + DRM_I810_MC, drm_i810_mc_t)
207#define DRM_IOCTL_I810_RSTATUS DRM_IO(DRM_COMMAND_BASE + DRM_I810_RSTATUS)
Ben Cheng655a7c02013-10-16 16:09:24 -0700208/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800209#define DRM_IOCTL_I810_FLIP DRM_IO(DRM_COMMAND_BASE + DRM_I810_FLIP)
Ben Cheng655a7c02013-10-16 16:09:24 -0700210typedef struct _drm_i810_clear {
Tao Baod7db5942015-01-28 10:07:51 -0800211 int clear_color;
212 int clear_depth;
Ben Cheng655a7c02013-10-16 16:09:24 -0700213/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800214 int flags;
Ben Cheng655a7c02013-10-16 16:09:24 -0700215} drm_i810_clear_t;
216typedef struct _drm_i810_vertex {
Tao Baod7db5942015-01-28 10:07:51 -0800217 int idx;
Ben Cheng655a7c02013-10-16 16:09:24 -0700218/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800219 int used;
220 int discard;
Ben Cheng655a7c02013-10-16 16:09:24 -0700221} drm_i810_vertex_t;
222typedef struct _drm_i810_copy_t {
223/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800224 int idx;
225 int used;
226 void * address;
Ben Cheng655a7c02013-10-16 16:09:24 -0700227} drm_i810_copy_t;
228/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800229#define PR_TRIANGLES (0x0 << 18)
230#define PR_TRISTRIP_0 (0x1 << 18)
231#define PR_TRISTRIP_1 (0x2 << 18)
232#define PR_TRIFAN (0x3 << 18)
Ben Cheng655a7c02013-10-16 16:09:24 -0700233/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800234#define PR_POLYGON (0x4 << 18)
235#define PR_LINES (0x5 << 18)
236#define PR_LINESTRIP (0x6 << 18)
237#define PR_RECTS (0x7 << 18)
Ben Cheng655a7c02013-10-16 16:09:24 -0700238/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800239#define PR_MASK (0x7 << 18)
Ben Cheng655a7c02013-10-16 16:09:24 -0700240typedef struct drm_i810_dma {
Tao Baod7db5942015-01-28 10:07:51 -0800241 void * virtual;
242 int request_idx;
Ben Cheng655a7c02013-10-16 16:09:24 -0700243/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800244 int request_size;
245 int granted;
Ben Cheng655a7c02013-10-16 16:09:24 -0700246} drm_i810_dma_t;
247typedef struct _drm_i810_overlay_t {
248/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800249 unsigned int offset;
250 unsigned int physical;
Ben Cheng655a7c02013-10-16 16:09:24 -0700251} drm_i810_overlay_t;
252typedef struct _drm_i810_mc {
253/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800254 int idx;
255 int used;
256 int num_blocks;
257 int * length;
Ben Cheng655a7c02013-10-16 16:09:24 -0700258/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800259 unsigned int last_render;
Ben Cheng655a7c02013-10-16 16:09:24 -0700260} drm_i810_mc_t;
261#endif