blob: 6fb86f1aaf376d11828e526d05dd553fbfc82604 [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 __RADEON_DRM_H__
20#define __RADEON_DRM_H__
21#include <drm/drm.h>
22#ifndef __RADEON_SAREA_DEFINES__
23/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
24#define __RADEON_SAREA_DEFINES__
25#define RADEON_UPLOAD_CONTEXT 0x00000001
26#define RADEON_UPLOAD_VERTFMT 0x00000002
27#define RADEON_UPLOAD_LINE 0x00000004
28/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
29#define RADEON_UPLOAD_BUMPMAP 0x00000008
30#define RADEON_UPLOAD_MASKS 0x00000010
31#define RADEON_UPLOAD_VIEWPORT 0x00000020
32#define RADEON_UPLOAD_SETUP 0x00000040
33/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
34#define RADEON_UPLOAD_TCL 0x00000080
35#define RADEON_UPLOAD_MISC 0x00000100
36#define RADEON_UPLOAD_TEX0 0x00000200
37#define RADEON_UPLOAD_TEX1 0x00000400
38/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
39#define RADEON_UPLOAD_TEX2 0x00000800
40#define RADEON_UPLOAD_TEX0IMAGES 0x00001000
41#define RADEON_UPLOAD_TEX1IMAGES 0x00002000
42#define RADEON_UPLOAD_TEX2IMAGES 0x00004000
43/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
44#define RADEON_UPLOAD_CLIPRECTS 0x00008000
45#define RADEON_REQUIRE_QUIESCENCE 0x00010000
46#define RADEON_UPLOAD_ZBIAS 0x00020000
47#define RADEON_UPLOAD_ALL 0x003effff
48/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
49#define RADEON_UPLOAD_CONTEXT_ALL 0x003e01ff
50#define RADEON_EMIT_PP_MISC 0
51#define RADEON_EMIT_PP_CNTL 1
52#define RADEON_EMIT_RB3D_COLORPITCH 2
53/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
54#define RADEON_EMIT_RE_LINE_PATTERN 3
55#define RADEON_EMIT_SE_LINE_WIDTH 4
56#define RADEON_EMIT_PP_LUM_MATRIX 5
57#define RADEON_EMIT_PP_ROT_MATRIX_0 6
58/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
59#define RADEON_EMIT_RB3D_STENCILREFMASK 7
60#define RADEON_EMIT_SE_VPORT_XSCALE 8
61#define RADEON_EMIT_SE_CNTL 9
62#define RADEON_EMIT_SE_CNTL_STATUS 10
63/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
64#define RADEON_EMIT_RE_MISC 11
65#define RADEON_EMIT_PP_TXFILTER_0 12
66#define RADEON_EMIT_PP_BORDER_COLOR_0 13
67#define RADEON_EMIT_PP_TXFILTER_1 14
68/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
69#define RADEON_EMIT_PP_BORDER_COLOR_1 15
70#define RADEON_EMIT_PP_TXFILTER_2 16
71#define RADEON_EMIT_PP_BORDER_COLOR_2 17
72#define RADEON_EMIT_SE_ZBIAS_FACTOR 18
73/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
74#define RADEON_EMIT_SE_TCL_OUTPUT_VTX_FMT 19
75#define RADEON_EMIT_SE_TCL_MATERIAL_EMMISSIVE_RED 20
76#define R200_EMIT_PP_TXCBLEND_0 21
77#define R200_EMIT_PP_TXCBLEND_1 22
78/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
79#define R200_EMIT_PP_TXCBLEND_2 23
80#define R200_EMIT_PP_TXCBLEND_3 24
81#define R200_EMIT_PP_TXCBLEND_4 25
82#define R200_EMIT_PP_TXCBLEND_5 26
83/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
84#define R200_EMIT_PP_TXCBLEND_6 27
85#define R200_EMIT_PP_TXCBLEND_7 28
86#define R200_EMIT_TCL_LIGHT_MODEL_CTL_0 29
87#define R200_EMIT_TFACTOR_0 30
88/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
89#define R200_EMIT_VTX_FMT_0 31
90#define R200_EMIT_VAP_CTL 32
91#define R200_EMIT_MATRIX_SELECT_0 33
92#define R200_EMIT_TEX_PROC_CTL_2 34
93/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
94#define R200_EMIT_TCL_UCP_VERT_BLEND_CTL 35
95#define R200_EMIT_PP_TXFILTER_0 36
96#define R200_EMIT_PP_TXFILTER_1 37
97#define R200_EMIT_PP_TXFILTER_2 38
98/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
99#define R200_EMIT_PP_TXFILTER_3 39
100#define R200_EMIT_PP_TXFILTER_4 40
101#define R200_EMIT_PP_TXFILTER_5 41
102#define R200_EMIT_PP_TXOFFSET_0 42
103/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
104#define R200_EMIT_PP_TXOFFSET_1 43
105#define R200_EMIT_PP_TXOFFSET_2 44
106#define R200_EMIT_PP_TXOFFSET_3 45
107#define R200_EMIT_PP_TXOFFSET_4 46
108/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
109#define R200_EMIT_PP_TXOFFSET_5 47
110#define R200_EMIT_VTE_CNTL 48
111#define R200_EMIT_OUTPUT_VTX_COMP_SEL 49
112#define R200_EMIT_PP_TAM_DEBUG3 50
113/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
114#define R200_EMIT_PP_CNTL_X 51
115#define R200_EMIT_RB3D_DEPTHXY_OFFSET 52
116#define R200_EMIT_RE_AUX_SCISSOR_CNTL 53
117#define R200_EMIT_RE_SCISSOR_TL_0 54
118/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
119#define R200_EMIT_RE_SCISSOR_TL_1 55
120#define R200_EMIT_RE_SCISSOR_TL_2 56
121#define R200_EMIT_SE_VAP_CNTL_STATUS 57
122#define R200_EMIT_SE_VTX_STATE_CNTL 58
123/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
124#define R200_EMIT_RE_POINTSIZE 59
125#define R200_EMIT_TCL_INPUT_VTX_VECTOR_ADDR_0 60
126#define R200_EMIT_PP_CUBIC_FACES_0 61
127#define R200_EMIT_PP_CUBIC_OFFSETS_0 62
128/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
129#define R200_EMIT_PP_CUBIC_FACES_1 63
130#define R200_EMIT_PP_CUBIC_OFFSETS_1 64
131#define R200_EMIT_PP_CUBIC_FACES_2 65
132#define R200_EMIT_PP_CUBIC_OFFSETS_2 66
133/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
134#define R200_EMIT_PP_CUBIC_FACES_3 67
135#define R200_EMIT_PP_CUBIC_OFFSETS_3 68
136#define R200_EMIT_PP_CUBIC_FACES_4 69
137#define R200_EMIT_PP_CUBIC_OFFSETS_4 70
138/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
139#define R200_EMIT_PP_CUBIC_FACES_5 71
140#define R200_EMIT_PP_CUBIC_OFFSETS_5 72
141#define RADEON_EMIT_PP_TEX_SIZE_0 73
142#define RADEON_EMIT_PP_TEX_SIZE_1 74
143/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
144#define RADEON_EMIT_PP_TEX_SIZE_2 75
145#define R200_EMIT_RB3D_BLENDCOLOR 76
146#define R200_EMIT_TCL_POINT_SPRITE_CNTL 77
147#define RADEON_EMIT_PP_CUBIC_FACES_0 78
148/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
149#define RADEON_EMIT_PP_CUBIC_OFFSETS_T0 79
150#define RADEON_EMIT_PP_CUBIC_FACES_1 80
151#define RADEON_EMIT_PP_CUBIC_OFFSETS_T1 81
152#define RADEON_EMIT_PP_CUBIC_FACES_2 82
153/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
154#define RADEON_EMIT_PP_CUBIC_OFFSETS_T2 83
155#define R200_EMIT_PP_TRI_PERF_CNTL 84
156#define R200_EMIT_PP_AFS_0 85
157#define R200_EMIT_PP_AFS_1 86
158/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
159#define R200_EMIT_ATF_TFACTOR 87
160#define R200_EMIT_PP_TXCTLALL_0 88
161#define R200_EMIT_PP_TXCTLALL_1 89
162#define R200_EMIT_PP_TXCTLALL_2 90
163/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
164#define R200_EMIT_PP_TXCTLALL_3 91
165#define R200_EMIT_PP_TXCTLALL_4 92
166#define R200_EMIT_PP_TXCTLALL_5 93
167#define R200_EMIT_VAP_PVS_CNTL 94
168/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
169#define RADEON_MAX_STATE_PACKETS 95
170#define RADEON_CMD_PACKET 1
171#define RADEON_CMD_SCALARS 2
172#define RADEON_CMD_VECTORS 3
173/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
174#define RADEON_CMD_DMA_DISCARD 4
175#define RADEON_CMD_PACKET3 5
176#define RADEON_CMD_PACKET3_CLIP 6
177#define RADEON_CMD_SCALARS2 7
178/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
179#define RADEON_CMD_WAIT 8
180#define RADEON_CMD_VECLINEAR 9
181typedef union {
Tao Baod7db5942015-01-28 10:07:51 -0800182 int i;
Ben Cheng655a7c02013-10-16 16:09:24 -0700183/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800184 struct {
185 unsigned char cmd_type, pad0, pad1, pad2;
186 } header;
187 struct {
Ben Cheng655a7c02013-10-16 16:09:24 -0700188/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800189 unsigned char cmd_type, packet_id, pad0, pad1;
190 } packet;
191 struct {
192 unsigned char cmd_type, offset, stride, count;
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 } scalars;
195 struct {
196 unsigned char cmd_type, offset, stride, count;
197 } vectors;
Ben Cheng655a7c02013-10-16 16:09:24 -0700198/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800199 struct {
200 unsigned char cmd_type, addr_lo, addr_hi, count;
201 } veclinear;
202 struct {
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 unsigned char cmd_type, buf_idx, pad0, pad1;
205 } dma;
206 struct {
207 unsigned char cmd_type, flags, pad0, pad1;
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 } wait;
Ben Cheng655a7c02013-10-16 16:09:24 -0700210} drm_radeon_cmd_header_t;
211#define RADEON_WAIT_2D 0x1
212#define RADEON_WAIT_3D 0x2
213/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
214#define R300_CMD_PACKET3_CLEAR 0
215#define R300_CMD_PACKET3_RAW 1
216#define R300_CMD_PACKET0 1
217#define R300_CMD_VPU 2
218/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
219#define R300_CMD_PACKET3 3
220#define R300_CMD_END3D 4
221#define R300_CMD_CP_DELAY 5
222#define R300_CMD_DMA_DISCARD 6
223/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
224#define R300_CMD_WAIT 7
225#define R300_WAIT_2D 0x1
226#define R300_WAIT_3D 0x2
227#define R300_WAIT_2D_CLEAN 0x3
228/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
229#define R300_WAIT_3D_CLEAN 0x4
230#define R300_NEW_WAIT_2D_3D 0x3
231#define R300_NEW_WAIT_2D_2D_CLEAN 0x4
232#define R300_NEW_WAIT_3D_3D_CLEAN 0x6
233/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
234#define R300_NEW_WAIT_2D_2D_CLEAN_3D_3D_CLEAN 0x8
235#define R300_CMD_SCRATCH 8
236#define R300_CMD_R500FP 9
237typedef union {
238/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800239 unsigned int u;
240 struct {
241 unsigned char cmd_type, pad0, pad1, pad2;
242 } header;
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 struct {
245 unsigned char cmd_type, count, reglo, reghi;
246 } packet0;
247 struct {
Ben Cheng655a7c02013-10-16 16:09:24 -0700248/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800249 unsigned char cmd_type, count, adrlo, adrhi;
250 } vpu;
251 struct {
252 unsigned char cmd_type, packet, pad0, pad1;
Ben Cheng655a7c02013-10-16 16:09:24 -0700253/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800254 } packet3;
255 struct {
256 unsigned char cmd_type, packet;
257 unsigned short count;
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 } delay;
260 struct {
261 unsigned char cmd_type, buf_idx, pad0, pad1;
262 } dma;
Ben Cheng655a7c02013-10-16 16:09:24 -0700263/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800264 struct {
265 unsigned char cmd_type, flags, pad0, pad1;
266 } wait;
267 struct {
Ben Cheng655a7c02013-10-16 16:09:24 -0700268/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800269 unsigned char cmd_type, reg, n_bufs, flags;
270 } scratch;
271 struct {
272 unsigned char cmd_type, count, adrlo, adrhi_flags;
Ben Cheng655a7c02013-10-16 16:09:24 -0700273/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800274 } r500fp;
Ben Cheng655a7c02013-10-16 16:09:24 -0700275} drm_r300_cmd_header_t;
276#define RADEON_FRONT 0x1
277#define RADEON_BACK 0x2
278/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
279#define RADEON_DEPTH 0x4
280#define RADEON_STENCIL 0x8
281#define RADEON_CLEAR_FASTZ 0x80000000
282#define RADEON_USE_HIERZ 0x40000000
283/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
284#define RADEON_USE_COMP_ZBUF 0x20000000
285#define R500FP_CONSTANT_TYPE (1 << 1)
286#define R500FP_CONSTANT_CLAMP (1 << 2)
287#define RADEON_POINTS 0x1
288/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
289#define RADEON_LINES 0x2
290#define RADEON_LINE_STRIP 0x3
291#define RADEON_TRIANGLES 0x4
292#define RADEON_TRIANGLE_FAN 0x5
293/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
294#define RADEON_TRIANGLE_STRIP 0x6
295#define RADEON_BUFFER_SIZE 65536
296#define RADEON_INDEX_PRIM_OFFSET 20
297#define RADEON_SCRATCH_REG_OFFSET 32
298/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
299#define R600_SCRATCH_REG_OFFSET 256
300#define RADEON_NR_SAREA_CLIPRECTS 12
301#define RADEON_LOCAL_TEX_HEAP 0
302#define RADEON_GART_TEX_HEAP 1
303/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
304#define RADEON_NR_TEX_HEAPS 2
305#define RADEON_NR_TEX_REGIONS 64
306#define RADEON_LOG_TEX_GRANULARITY 16
307#define RADEON_MAX_TEXTURE_LEVELS 12
308/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
309#define RADEON_MAX_TEXTURE_UNITS 3
310#define RADEON_MAX_SURFACES 8
311#define RADEON_OFFSET_SHIFT 10
312#define RADEON_OFFSET_ALIGN (1 << RADEON_OFFSET_SHIFT)
313/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
314#define RADEON_OFFSET_MASK (RADEON_OFFSET_ALIGN - 1)
315#endif
316typedef struct {
Tao Baod7db5942015-01-28 10:07:51 -0800317 unsigned int red;
Ben Cheng655a7c02013-10-16 16:09:24 -0700318/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800319 unsigned int green;
320 unsigned int blue;
321 unsigned int alpha;
Ben Cheng655a7c02013-10-16 16:09:24 -0700322} radeon_color_regs_t;
323/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
324typedef struct {
Tao Baod7db5942015-01-28 10:07:51 -0800325 unsigned int pp_misc;
326 unsigned int pp_fog_color;
327 unsigned int re_solid_color;
Ben Cheng655a7c02013-10-16 16:09:24 -0700328/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800329 unsigned int rb3d_blendcntl;
330 unsigned int rb3d_depthoffset;
331 unsigned int rb3d_depthpitch;
332 unsigned int rb3d_zstencilcntl;
Ben Cheng655a7c02013-10-16 16:09:24 -0700333/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800334 unsigned int pp_cntl;
335 unsigned int rb3d_cntl;
336 unsigned int rb3d_coloroffset;
337 unsigned int re_width_height;
Ben Cheng655a7c02013-10-16 16:09:24 -0700338/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800339 unsigned int rb3d_colorpitch;
340 unsigned int se_cntl;
341 unsigned int se_coord_fmt;
342 unsigned int re_line_pattern;
Ben Cheng655a7c02013-10-16 16:09:24 -0700343/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800344 unsigned int re_line_state;
345 unsigned int se_line_width;
346 unsigned int pp_lum_matrix;
347 unsigned int pp_rot_matrix_0;
Ben Cheng655a7c02013-10-16 16:09:24 -0700348/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800349 unsigned int pp_rot_matrix_1;
350 unsigned int rb3d_stencilrefmask;
351 unsigned int rb3d_ropcntl;
352 unsigned int rb3d_planemask;
Ben Cheng655a7c02013-10-16 16:09:24 -0700353/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800354 unsigned int se_vport_xscale;
355 unsigned int se_vport_xoffset;
356 unsigned int se_vport_yscale;
357 unsigned int se_vport_yoffset;
Ben Cheng655a7c02013-10-16 16:09:24 -0700358/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800359 unsigned int se_vport_zscale;
360 unsigned int se_vport_zoffset;
361 unsigned int se_cntl_status;
362 unsigned int re_top_left;
Ben Cheng655a7c02013-10-16 16:09:24 -0700363/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800364 unsigned int re_misc;
Ben Cheng655a7c02013-10-16 16:09:24 -0700365} drm_radeon_context_regs_t;
366typedef struct {
Tao Baod7db5942015-01-28 10:07:51 -0800367 unsigned int se_zbias_factor;
Ben Cheng655a7c02013-10-16 16:09:24 -0700368/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800369 unsigned int se_zbias_constant;
Ben Cheng655a7c02013-10-16 16:09:24 -0700370} drm_radeon_context2_regs_t;
371typedef struct {
Tao Baod7db5942015-01-28 10:07:51 -0800372 unsigned int pp_txfilter;
Ben Cheng655a7c02013-10-16 16:09:24 -0700373/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800374 unsigned int pp_txformat;
375 unsigned int pp_txoffset;
376 unsigned int pp_txcblend;
377 unsigned int pp_txablend;
Ben Cheng655a7c02013-10-16 16:09:24 -0700378/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800379 unsigned int pp_tfactor;
380 unsigned int pp_border_color;
Ben Cheng655a7c02013-10-16 16:09:24 -0700381} drm_radeon_texture_regs_t;
382typedef struct {
383/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800384 unsigned int start;
385 unsigned int finish;
386 unsigned int prim : 8;
387 unsigned int stateidx : 8;
Ben Cheng655a7c02013-10-16 16:09:24 -0700388/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800389 unsigned int numverts : 16;
390 unsigned int vc_format;
Ben Cheng655a7c02013-10-16 16:09:24 -0700391} drm_radeon_prim_t;
392typedef struct {
393/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800394 drm_radeon_context_regs_t context;
395 drm_radeon_texture_regs_t tex[RADEON_MAX_TEXTURE_UNITS];
396 drm_radeon_context2_regs_t context2;
397 unsigned int dirty;
Ben Cheng655a7c02013-10-16 16:09:24 -0700398/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
399} drm_radeon_state_t;
400typedef struct {
Tao Baod7db5942015-01-28 10:07:51 -0800401 drm_radeon_context_regs_t context_state;
402 drm_radeon_texture_regs_t tex_state[RADEON_MAX_TEXTURE_UNITS];
Ben Cheng655a7c02013-10-16 16:09:24 -0700403/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800404 unsigned int dirty;
405 unsigned int vertsize;
406 unsigned int vc_format;
407 struct drm_clip_rect boxes[RADEON_NR_SAREA_CLIPRECTS];
Ben Cheng655a7c02013-10-16 16:09:24 -0700408/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800409 unsigned int nbox;
410 unsigned int last_frame;
411 unsigned int last_dispatch;
412 unsigned int last_clear;
Ben Cheng655a7c02013-10-16 16:09:24 -0700413/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800414 struct drm_tex_region tex_list[RADEON_NR_TEX_HEAPS][RADEON_NR_TEX_REGIONS + 1];
415 unsigned int tex_age[RADEON_NR_TEX_HEAPS];
416 int ctx_owner;
417 int pfState;
Ben Cheng655a7c02013-10-16 16:09:24 -0700418/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800419 int pfCurrentPage;
420 int crtc2_base;
421 int tiling_enabled;
Ben Cheng655a7c02013-10-16 16:09:24 -0700422} drm_radeon_sarea_t;
Tao Baod7db5942015-01-28 10:07:51 -0800423/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700424#define DRM_RADEON_CP_INIT 0x00
425#define DRM_RADEON_CP_START 0x01
426#define DRM_RADEON_CP_STOP 0x02
Ben Cheng655a7c02013-10-16 16:09:24 -0700427#define DRM_RADEON_CP_RESET 0x03
Tao Baod7db5942015-01-28 10:07:51 -0800428/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700429#define DRM_RADEON_CP_IDLE 0x04
430#define DRM_RADEON_RESET 0x05
431#define DRM_RADEON_FULLSCREEN 0x06
Ben Cheng655a7c02013-10-16 16:09:24 -0700432#define DRM_RADEON_SWAP 0x07
Tao Baod7db5942015-01-28 10:07:51 -0800433/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700434#define DRM_RADEON_CLEAR 0x08
435#define DRM_RADEON_VERTEX 0x09
436#define DRM_RADEON_INDICES 0x0A
Ben Cheng655a7c02013-10-16 16:09:24 -0700437#define DRM_RADEON_NOT_USED
Tao Baod7db5942015-01-28 10:07:51 -0800438/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700439#define DRM_RADEON_STIPPLE 0x0C
440#define DRM_RADEON_INDIRECT 0x0D
441#define DRM_RADEON_TEXTURE 0x0E
Ben Cheng655a7c02013-10-16 16:09:24 -0700442#define DRM_RADEON_VERTEX2 0x0F
Tao Baod7db5942015-01-28 10:07:51 -0800443/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700444#define DRM_RADEON_CMDBUF 0x10
445#define DRM_RADEON_GETPARAM 0x11
446#define DRM_RADEON_FLIP 0x12
Ben Cheng655a7c02013-10-16 16:09:24 -0700447#define DRM_RADEON_ALLOC 0x13
Tao Baod7db5942015-01-28 10:07:51 -0800448/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700449#define DRM_RADEON_FREE 0x14
450#define DRM_RADEON_INIT_HEAP 0x15
451#define DRM_RADEON_IRQ_EMIT 0x16
Ben Cheng655a7c02013-10-16 16:09:24 -0700452#define DRM_RADEON_IRQ_WAIT 0x17
Tao Baod7db5942015-01-28 10:07:51 -0800453/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700454#define DRM_RADEON_CP_RESUME 0x18
455#define DRM_RADEON_SETPARAM 0x19
456#define DRM_RADEON_SURF_ALLOC 0x1a
Ben Cheng655a7c02013-10-16 16:09:24 -0700457#define DRM_RADEON_SURF_FREE 0x1b
Tao Baod7db5942015-01-28 10:07:51 -0800458/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700459#define DRM_RADEON_GEM_INFO 0x1c
460#define DRM_RADEON_GEM_CREATE 0x1d
461#define DRM_RADEON_GEM_MMAP 0x1e
Ben Cheng655a7c02013-10-16 16:09:24 -0700462#define DRM_RADEON_GEM_PREAD 0x21
Tao Baod7db5942015-01-28 10:07:51 -0800463/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700464#define DRM_RADEON_GEM_PWRITE 0x22
465#define DRM_RADEON_GEM_SET_DOMAIN 0x23
466#define DRM_RADEON_GEM_WAIT_IDLE 0x24
Ben Cheng655a7c02013-10-16 16:09:24 -0700467#define DRM_RADEON_CS 0x26
Tao Baod7db5942015-01-28 10:07:51 -0800468/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700469#define DRM_RADEON_INFO 0x27
470#define DRM_RADEON_GEM_SET_TILING 0x28
471#define DRM_RADEON_GEM_GET_TILING 0x29
Ben Cheng655a7c02013-10-16 16:09:24 -0700472#define DRM_RADEON_GEM_BUSY 0x2a
Tao Baod7db5942015-01-28 10:07:51 -0800473/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700474#define DRM_RADEON_GEM_VA 0x2b
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700475#define DRM_RADEON_GEM_OP 0x2c
Christopher Ferris82d75042015-01-26 10:57:07 -0800476#define DRM_RADEON_GEM_USERPTR 0x2d
Tao Baod7db5942015-01-28 10:07:51 -0800477#define DRM_IOCTL_RADEON_CP_INIT DRM_IOW(DRM_COMMAND_BASE + DRM_RADEON_CP_INIT, drm_radeon_init_t)
Ben Cheng655a7c02013-10-16 16:09:24 -0700478/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800479#define DRM_IOCTL_RADEON_CP_START DRM_IO(DRM_COMMAND_BASE + DRM_RADEON_CP_START)
480#define DRM_IOCTL_RADEON_CP_STOP DRM_IOW(DRM_COMMAND_BASE + DRM_RADEON_CP_STOP, drm_radeon_cp_stop_t)
481#define DRM_IOCTL_RADEON_CP_RESET DRM_IO(DRM_COMMAND_BASE + DRM_RADEON_CP_RESET)
482#define DRM_IOCTL_RADEON_CP_IDLE DRM_IO(DRM_COMMAND_BASE + DRM_RADEON_CP_IDLE)
Ben Cheng655a7c02013-10-16 16:09:24 -0700483/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800484#define DRM_IOCTL_RADEON_RESET DRM_IO(DRM_COMMAND_BASE + DRM_RADEON_RESET)
485#define DRM_IOCTL_RADEON_FULLSCREEN DRM_IOW(DRM_COMMAND_BASE + DRM_RADEON_FULLSCREEN, drm_radeon_fullscreen_t)
486#define DRM_IOCTL_RADEON_SWAP DRM_IO(DRM_COMMAND_BASE + DRM_RADEON_SWAP)
487#define DRM_IOCTL_RADEON_CLEAR DRM_IOW(DRM_COMMAND_BASE + DRM_RADEON_CLEAR, drm_radeon_clear_t)
Ben Cheng655a7c02013-10-16 16:09:24 -0700488/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800489#define DRM_IOCTL_RADEON_VERTEX DRM_IOW(DRM_COMMAND_BASE + DRM_RADEON_VERTEX, drm_radeon_vertex_t)
490#define DRM_IOCTL_RADEON_INDICES DRM_IOW(DRM_COMMAND_BASE + DRM_RADEON_INDICES, drm_radeon_indices_t)
491#define DRM_IOCTL_RADEON_STIPPLE DRM_IOW(DRM_COMMAND_BASE + DRM_RADEON_STIPPLE, drm_radeon_stipple_t)
Christopher Ferris82d75042015-01-26 10:57:07 -0800492#define DRM_IOCTL_RADEON_INDIRECT DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_INDIRECT, drm_radeon_indirect_t)
Tao Baod7db5942015-01-28 10:07:51 -0800493/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700494#define DRM_IOCTL_RADEON_TEXTURE DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_TEXTURE, drm_radeon_texture_t)
Tao Baod7db5942015-01-28 10:07:51 -0800495#define DRM_IOCTL_RADEON_VERTEX2 DRM_IOW(DRM_COMMAND_BASE + DRM_RADEON_VERTEX2, drm_radeon_vertex2_t)
496#define DRM_IOCTL_RADEON_CMDBUF DRM_IOW(DRM_COMMAND_BASE + DRM_RADEON_CMDBUF, drm_radeon_cmd_buffer_t)
Christopher Ferris82d75042015-01-26 10:57:07 -0800497#define DRM_IOCTL_RADEON_GETPARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GETPARAM, drm_radeon_getparam_t)
Tao Baod7db5942015-01-28 10:07:51 -0800498/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
499#define DRM_IOCTL_RADEON_FLIP DRM_IO(DRM_COMMAND_BASE + DRM_RADEON_FLIP)
Ben Cheng655a7c02013-10-16 16:09:24 -0700500#define DRM_IOCTL_RADEON_ALLOC DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_ALLOC, drm_radeon_mem_alloc_t)
Tao Baod7db5942015-01-28 10:07:51 -0800501#define DRM_IOCTL_RADEON_FREE DRM_IOW(DRM_COMMAND_BASE + DRM_RADEON_FREE, drm_radeon_mem_free_t)
502#define DRM_IOCTL_RADEON_INIT_HEAP DRM_IOW(DRM_COMMAND_BASE + DRM_RADEON_INIT_HEAP, drm_radeon_mem_init_heap_t)
Ben Cheng655a7c02013-10-16 16:09:24 -0700503/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700504#define DRM_IOCTL_RADEON_IRQ_EMIT DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_IRQ_EMIT, drm_radeon_irq_emit_t)
Tao Baod7db5942015-01-28 10:07:51 -0800505#define DRM_IOCTL_RADEON_IRQ_WAIT DRM_IOW(DRM_COMMAND_BASE + DRM_RADEON_IRQ_WAIT, drm_radeon_irq_wait_t)
506#define DRM_IOCTL_RADEON_CP_RESUME DRM_IO(DRM_COMMAND_BASE + DRM_RADEON_CP_RESUME)
507#define DRM_IOCTL_RADEON_SETPARAM DRM_IOW(DRM_COMMAND_BASE + DRM_RADEON_SETPARAM, drm_radeon_setparam_t)
Ben Cheng655a7c02013-10-16 16:09:24 -0700508/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800509#define DRM_IOCTL_RADEON_SURF_ALLOC DRM_IOW(DRM_COMMAND_BASE + DRM_RADEON_SURF_ALLOC, drm_radeon_surface_alloc_t)
510#define DRM_IOCTL_RADEON_SURF_FREE DRM_IOW(DRM_COMMAND_BASE + DRM_RADEON_SURF_FREE, drm_radeon_surface_free_t)
Ben Cheng655a7c02013-10-16 16:09:24 -0700511#define DRM_IOCTL_RADEON_GEM_INFO DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_INFO, struct drm_radeon_gem_info)
Christopher Ferris82d75042015-01-26 10:57:07 -0800512#define DRM_IOCTL_RADEON_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_CREATE, struct drm_radeon_gem_create)
Tao Baod7db5942015-01-28 10:07:51 -0800513/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700514#define DRM_IOCTL_RADEON_GEM_MMAP DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_MMAP, struct drm_radeon_gem_mmap)
Ben Cheng655a7c02013-10-16 16:09:24 -0700515#define DRM_IOCTL_RADEON_GEM_PREAD DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_PREAD, struct drm_radeon_gem_pread)
516#define DRM_IOCTL_RADEON_GEM_PWRITE DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_PWRITE, struct drm_radeon_gem_pwrite)
Christopher Ferris82d75042015-01-26 10:57:07 -0800517#define DRM_IOCTL_RADEON_GEM_SET_DOMAIN DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_SET_DOMAIN, struct drm_radeon_gem_set_domain)
Tao Baod7db5942015-01-28 10:07:51 -0800518/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700519#define DRM_IOCTL_RADEON_GEM_WAIT_IDLE DRM_IOW(DRM_COMMAND_BASE + DRM_RADEON_GEM_WAIT_IDLE, struct drm_radeon_gem_wait_idle)
Ben Cheng655a7c02013-10-16 16:09:24 -0700520#define DRM_IOCTL_RADEON_CS DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_CS, struct drm_radeon_cs)
521#define DRM_IOCTL_RADEON_INFO DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_INFO, struct drm_radeon_info)
Christopher Ferris82d75042015-01-26 10:57:07 -0800522#define DRM_IOCTL_RADEON_GEM_SET_TILING DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_SET_TILING, struct drm_radeon_gem_set_tiling)
Tao Baod7db5942015-01-28 10:07:51 -0800523/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700524#define DRM_IOCTL_RADEON_GEM_GET_TILING DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_GET_TILING, struct drm_radeon_gem_get_tiling)
Ben Cheng655a7c02013-10-16 16:09:24 -0700525#define DRM_IOCTL_RADEON_GEM_BUSY DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_BUSY, struct drm_radeon_gem_busy)
526#define DRM_IOCTL_RADEON_GEM_VA DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_VA, struct drm_radeon_gem_va)
Christopher Ferris82d75042015-01-26 10:57:07 -0800527#define DRM_IOCTL_RADEON_GEM_OP DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_OP, struct drm_radeon_gem_op)
Tao Baod7db5942015-01-28 10:07:51 -0800528/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris82d75042015-01-26 10:57:07 -0800529#define DRM_IOCTL_RADEON_GEM_USERPTR DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_USERPTR, struct drm_radeon_gem_userptr)
Ben Cheng655a7c02013-10-16 16:09:24 -0700530typedef struct drm_radeon_init {
Tao Baod7db5942015-01-28 10:07:51 -0800531 enum {
532 RADEON_INIT_CP = 0x01,
Christopher Ferris82d75042015-01-26 10:57:07 -0800533/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800534 RADEON_CLEANUP_CP = 0x02,
535 RADEON_INIT_R200_CP = 0x03,
536 RADEON_INIT_R300_CP = 0x04,
537 RADEON_INIT_R600_CP = 0x05
Christopher Ferris82d75042015-01-26 10:57:07 -0800538/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800539 } func;
540 unsigned long sarea_priv_offset;
541 int is_pci;
542 int cp_mode;
Christopher Ferris82d75042015-01-26 10:57:07 -0800543/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800544 int gart_size;
545 int ring_size;
546 int usec_timeout;
547 unsigned int fb_bpp;
Christopher Ferris82d75042015-01-26 10:57:07 -0800548/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800549 unsigned int front_offset, front_pitch;
550 unsigned int back_offset, back_pitch;
551 unsigned int depth_bpp;
552 unsigned int depth_offset, depth_pitch;
Christopher Ferris82d75042015-01-26 10:57:07 -0800553/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800554 unsigned long fb_offset;
555 unsigned long mmio_offset;
556 unsigned long ring_offset;
557 unsigned long ring_rptr_offset;
Christopher Ferris82d75042015-01-26 10:57:07 -0800558/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800559 unsigned long buffers_offset;
560 unsigned long gart_textures_offset;
Ben Cheng655a7c02013-10-16 16:09:24 -0700561} drm_radeon_init_t;
Ben Cheng655a7c02013-10-16 16:09:24 -0700562typedef struct drm_radeon_cp_stop {
Tao Baod7db5942015-01-28 10:07:51 -0800563/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
564 int flush;
565 int idle;
Ben Cheng655a7c02013-10-16 16:09:24 -0700566} drm_radeon_cp_stop_t;
Ben Cheng655a7c02013-10-16 16:09:24 -0700567typedef struct drm_radeon_fullscreen {
Christopher Ferris82d75042015-01-26 10:57:07 -0800568/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800569 enum {
570 RADEON_INIT_FULLSCREEN = 0x01,
571 RADEON_CLEANUP_FULLSCREEN = 0x02
572 } func;
573/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700574} drm_radeon_fullscreen_t;
575#define CLEAR_X1 0
576#define CLEAR_Y1 1
Ben Cheng655a7c02013-10-16 16:09:24 -0700577#define CLEAR_X2 2
Tao Baod7db5942015-01-28 10:07:51 -0800578/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700579#define CLEAR_Y2 3
580#define CLEAR_DEPTH 4
581typedef union drm_radeon_clear_rect {
Tao Baod7db5942015-01-28 10:07:51 -0800582 float f[5];
Christopher Ferris82d75042015-01-26 10:57:07 -0800583/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800584 unsigned int ui[5];
Ben Cheng655a7c02013-10-16 16:09:24 -0700585} drm_radeon_clear_rect_t;
586typedef struct drm_radeon_clear {
Tao Baod7db5942015-01-28 10:07:51 -0800587 unsigned int flags;
Christopher Ferris82d75042015-01-26 10:57:07 -0800588/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800589 unsigned int clear_color;
590 unsigned int clear_depth;
591 unsigned int color_mask;
592 unsigned int depth_mask;
Christopher Ferris82d75042015-01-26 10:57:07 -0800593/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800594 drm_radeon_clear_rect_t __user * depth_boxes;
Ben Cheng655a7c02013-10-16 16:09:24 -0700595} drm_radeon_clear_t;
596typedef struct drm_radeon_vertex {
Tao Baod7db5942015-01-28 10:07:51 -0800597 int prim;
Christopher Ferris82d75042015-01-26 10:57:07 -0800598/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800599 int idx;
600 int count;
601 int discard;
Ben Cheng655a7c02013-10-16 16:09:24 -0700602} drm_radeon_vertex_t;
Tao Baod7db5942015-01-28 10:07:51 -0800603/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700604typedef struct drm_radeon_indices {
Tao Baod7db5942015-01-28 10:07:51 -0800605 int prim;
606 int idx;
607 int start;
Christopher Ferris82d75042015-01-26 10:57:07 -0800608/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800609 int end;
610 int discard;
Ben Cheng655a7c02013-10-16 16:09:24 -0700611} drm_radeon_indices_t;
Ben Cheng655a7c02013-10-16 16:09:24 -0700612typedef struct drm_radeon_vertex2 {
Christopher Ferris82d75042015-01-26 10:57:07 -0800613/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800614 int idx;
615 int discard;
616 int nr_states;
617 drm_radeon_state_t __user * state;
618/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
619 int nr_prims;
620 drm_radeon_prim_t __user * prim;
Ben Cheng655a7c02013-10-16 16:09:24 -0700621} drm_radeon_vertex2_t;
Ben Cheng655a7c02013-10-16 16:09:24 -0700622typedef struct drm_radeon_cmd_buffer {
Christopher Ferris82d75042015-01-26 10:57:07 -0800623/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800624 int bufsz;
625 char __user * buf;
626 int nbox;
627 struct drm_clip_rect __user * boxes;
628/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700629} drm_radeon_cmd_buffer_t;
630typedef struct drm_radeon_tex_image {
Tao Baod7db5942015-01-28 10:07:51 -0800631 unsigned int x, y;
632 unsigned int width, height;
Christopher Ferris82d75042015-01-26 10:57:07 -0800633/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800634 const void __user * data;
Ben Cheng655a7c02013-10-16 16:09:24 -0700635} drm_radeon_tex_image_t;
636typedef struct drm_radeon_texture {
Tao Baod7db5942015-01-28 10:07:51 -0800637 unsigned int offset;
Christopher Ferris82d75042015-01-26 10:57:07 -0800638/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800639 int pitch;
640 int format;
641 int width;
642 int height;
Christopher Ferris82d75042015-01-26 10:57:07 -0800643/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800644 drm_radeon_tex_image_t __user * image;
Ben Cheng655a7c02013-10-16 16:09:24 -0700645} drm_radeon_texture_t;
646typedef struct drm_radeon_stipple {
Tao Baod7db5942015-01-28 10:07:51 -0800647 unsigned int __user * mask;
Christopher Ferris82d75042015-01-26 10:57:07 -0800648/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700649} drm_radeon_stipple_t;
650typedef struct drm_radeon_indirect {
Tao Baod7db5942015-01-28 10:07:51 -0800651 int idx;
652 int start;
Christopher Ferris82d75042015-01-26 10:57:07 -0800653/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800654 int end;
655 int discard;
Ben Cheng655a7c02013-10-16 16:09:24 -0700656} drm_radeon_indirect_t;
Ben Cheng655a7c02013-10-16 16:09:24 -0700657#define RADEON_CARD_PCI 0
Tao Baod7db5942015-01-28 10:07:51 -0800658/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700659#define RADEON_CARD_AGP 1
660#define RADEON_CARD_PCIE 2
661#define RADEON_PARAM_GART_BUFFER_OFFSET 1
Ben Cheng655a7c02013-10-16 16:09:24 -0700662#define RADEON_PARAM_LAST_FRAME 2
Tao Baod7db5942015-01-28 10:07:51 -0800663/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700664#define RADEON_PARAM_LAST_DISPATCH 3
665#define RADEON_PARAM_LAST_CLEAR 4
666#define RADEON_PARAM_IRQ_NR 5
Ben Cheng655a7c02013-10-16 16:09:24 -0700667#define RADEON_PARAM_GART_BASE 6
Tao Baod7db5942015-01-28 10:07:51 -0800668/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700669#define RADEON_PARAM_REGISTER_HANDLE 7
670#define RADEON_PARAM_STATUS_HANDLE 8
671#define RADEON_PARAM_SAREA_HANDLE 9
Ben Cheng655a7c02013-10-16 16:09:24 -0700672#define RADEON_PARAM_GART_TEX_HANDLE 10
Tao Baod7db5942015-01-28 10:07:51 -0800673/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700674#define RADEON_PARAM_SCRATCH_OFFSET 11
675#define RADEON_PARAM_CARD_TYPE 12
676#define RADEON_PARAM_VBLANK_CRTC 13
Ben Cheng655a7c02013-10-16 16:09:24 -0700677#define RADEON_PARAM_FB_LOCATION 14
Tao Baod7db5942015-01-28 10:07:51 -0800678/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700679#define RADEON_PARAM_NUM_GB_PIPES 15
680#define RADEON_PARAM_DEVICE_ID 16
681#define RADEON_PARAM_NUM_Z_PIPES 17
Ben Cheng655a7c02013-10-16 16:09:24 -0700682typedef struct drm_radeon_getparam {
Christopher Ferris82d75042015-01-26 10:57:07 -0800683/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800684 int param;
685 void __user * value;
686} drm_radeon_getparam_t;
Ben Cheng655a7c02013-10-16 16:09:24 -0700687#define RADEON_MEM_REGION_GART 1
Tao Baod7db5942015-01-28 10:07:51 -0800688/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700689#define RADEON_MEM_REGION_FB 2
690typedef struct drm_radeon_mem_alloc {
Tao Baod7db5942015-01-28 10:07:51 -0800691 int region;
692 int alignment;
Christopher Ferris82d75042015-01-26 10:57:07 -0800693/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800694 int size;
695 int __user * region_offset;
Ben Cheng655a7c02013-10-16 16:09:24 -0700696} drm_radeon_mem_alloc_t;
Ben Cheng655a7c02013-10-16 16:09:24 -0700697typedef struct drm_radeon_mem_free {
Tao Baod7db5942015-01-28 10:07:51 -0800698/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
699 int region;
700 int region_offset;
Ben Cheng655a7c02013-10-16 16:09:24 -0700701} drm_radeon_mem_free_t;
Ben Cheng655a7c02013-10-16 16:09:24 -0700702typedef struct drm_radeon_mem_init_heap {
Christopher Ferris82d75042015-01-26 10:57:07 -0800703/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800704 int region;
705 int size;
706 int start;
Ben Cheng655a7c02013-10-16 16:09:24 -0700707} drm_radeon_mem_init_heap_t;
Christopher Ferris82d75042015-01-26 10:57:07 -0800708/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800709typedef struct drm_radeon_irq_emit {
710 int __user * irq_seq;
711} drm_radeon_irq_emit_t;
Ben Cheng655a7c02013-10-16 16:09:24 -0700712typedef struct drm_radeon_irq_wait {
Tao Baod7db5942015-01-28 10:07:51 -0800713/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
714 int irq_seq;
Ben Cheng655a7c02013-10-16 16:09:24 -0700715} drm_radeon_irq_wait_t;
716typedef struct drm_radeon_setparam {
Tao Baod7db5942015-01-28 10:07:51 -0800717 unsigned int param;
Christopher Ferris82d75042015-01-26 10:57:07 -0800718/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800719 __s64 value;
Ben Cheng655a7c02013-10-16 16:09:24 -0700720} drm_radeon_setparam_t;
721#define RADEON_SETPARAM_FB_LOCATION 1
Ben Cheng655a7c02013-10-16 16:09:24 -0700722#define RADEON_SETPARAM_SWITCH_TILING 2
Tao Baod7db5942015-01-28 10:07:51 -0800723/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700724#define RADEON_SETPARAM_PCIGART_LOCATION 3
725#define RADEON_SETPARAM_NEW_MEMMAP 4
726#define RADEON_SETPARAM_PCIGART_TABLE_SIZE 5
Ben Cheng655a7c02013-10-16 16:09:24 -0700727#define RADEON_SETPARAM_VBLANK_CRTC 6
Christopher Ferris82d75042015-01-26 10:57:07 -0800728/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800729typedef struct drm_radeon_surface_alloc {
730 unsigned int address;
731 unsigned int size;
732 unsigned int flags;
733/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700734} drm_radeon_surface_alloc_t;
735typedef struct drm_radeon_surface_free {
Tao Baod7db5942015-01-28 10:07:51 -0800736 unsigned int address;
Ben Cheng655a7c02013-10-16 16:09:24 -0700737} drm_radeon_surface_free_t;
Tao Baod7db5942015-01-28 10:07:51 -0800738/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700739#define DRM_RADEON_VBLANK_CRTC1 1
740#define DRM_RADEON_VBLANK_CRTC2 2
741#define RADEON_GEM_DOMAIN_CPU 0x1
Ben Cheng655a7c02013-10-16 16:09:24 -0700742#define RADEON_GEM_DOMAIN_GTT 0x2
Tao Baod7db5942015-01-28 10:07:51 -0800743/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700744#define RADEON_GEM_DOMAIN_VRAM 0x4
745struct drm_radeon_gem_info {
Tao Baod7db5942015-01-28 10:07:51 -0800746 uint64_t gart_size;
747 uint64_t vram_size;
Christopher Ferris82d75042015-01-26 10:57:07 -0800748/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800749 uint64_t vram_visible;
Ben Cheng655a7c02013-10-16 16:09:24 -0700750};
Christopher Ferris82d75042015-01-26 10:57:07 -0800751#define RADEON_GEM_NO_BACKING_STORE (1 << 0)
Christopher Ferris82d75042015-01-26 10:57:07 -0800752#define RADEON_GEM_GTT_UC (1 << 1)
Tao Baod7db5942015-01-28 10:07:51 -0800753/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris82d75042015-01-26 10:57:07 -0800754#define RADEON_GEM_GTT_WC (1 << 2)
755#define RADEON_GEM_CPU_ACCESS (1 << 3)
756#define RADEON_GEM_NO_CPU_ACCESS (1 << 4)
Ben Cheng655a7c02013-10-16 16:09:24 -0700757struct drm_radeon_gem_create {
Christopher Ferris82d75042015-01-26 10:57:07 -0800758/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800759 uint64_t size;
760 uint64_t alignment;
761 uint32_t handle;
762 uint32_t initial_domain;
763/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
764 uint32_t flags;
Christopher Ferris82d75042015-01-26 10:57:07 -0800765};
766#define RADEON_GEM_USERPTR_READONLY (1 << 0)
Christopher Ferris82d75042015-01-26 10:57:07 -0800767#define RADEON_GEM_USERPTR_ANONONLY (1 << 1)
Tao Baod7db5942015-01-28 10:07:51 -0800768/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris82d75042015-01-26 10:57:07 -0800769#define RADEON_GEM_USERPTR_VALIDATE (1 << 2)
770#define RADEON_GEM_USERPTR_REGISTER (1 << 3)
771struct drm_radeon_gem_userptr {
Tao Baod7db5942015-01-28 10:07:51 -0800772 uint64_t addr;
Christopher Ferris82d75042015-01-26 10:57:07 -0800773/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800774 uint64_t size;
775 uint32_t flags;
776 uint32_t handle;
Ben Cheng655a7c02013-10-16 16:09:24 -0700777};
Tao Baod7db5942015-01-28 10:07:51 -0800778/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700779#define RADEON_TILING_MACRO 0x1
Ben Cheng655a7c02013-10-16 16:09:24 -0700780#define RADEON_TILING_MICRO 0x2
781#define RADEON_TILING_SWAP_16BIT 0x4
782#define RADEON_TILING_SWAP_32BIT 0x8
Tao Baod7db5942015-01-28 10:07:51 -0800783/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700784#define RADEON_TILING_SURFACE 0x10
Ben Cheng655a7c02013-10-16 16:09:24 -0700785#define RADEON_TILING_MICRO_SQUARE 0x20
786#define RADEON_TILING_EG_BANKW_SHIFT 8
787#define RADEON_TILING_EG_BANKW_MASK 0xf
Tao Baod7db5942015-01-28 10:07:51 -0800788/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700789#define RADEON_TILING_EG_BANKH_SHIFT 12
Ben Cheng655a7c02013-10-16 16:09:24 -0700790#define RADEON_TILING_EG_BANKH_MASK 0xf
791#define RADEON_TILING_EG_MACRO_TILE_ASPECT_SHIFT 16
792#define RADEON_TILING_EG_MACRO_TILE_ASPECT_MASK 0xf
Tao Baod7db5942015-01-28 10:07:51 -0800793/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700794#define RADEON_TILING_EG_TILE_SPLIT_SHIFT 24
Ben Cheng655a7c02013-10-16 16:09:24 -0700795#define RADEON_TILING_EG_TILE_SPLIT_MASK 0xf
796#define RADEON_TILING_EG_STENCIL_TILE_SPLIT_SHIFT 28
797#define RADEON_TILING_EG_STENCIL_TILE_SPLIT_MASK 0xf
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700798/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800799struct drm_radeon_gem_set_tiling {
800 uint32_t handle;
801 uint32_t tiling_flags;
802 uint32_t pitch;
803/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700804};
Ben Cheng655a7c02013-10-16 16:09:24 -0700805struct drm_radeon_gem_get_tiling {
Tao Baod7db5942015-01-28 10:07:51 -0800806 uint32_t handle;
807 uint32_t tiling_flags;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700808/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800809 uint32_t pitch;
Ben Cheng655a7c02013-10-16 16:09:24 -0700810};
811struct drm_radeon_gem_mmap {
Tao Baod7db5942015-01-28 10:07:51 -0800812 uint32_t handle;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700813/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800814 uint32_t pad;
815 uint64_t offset;
816 uint64_t size;
817 uint64_t addr_ptr;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700818/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700819};
Ben Cheng655a7c02013-10-16 16:09:24 -0700820struct drm_radeon_gem_set_domain {
Tao Baod7db5942015-01-28 10:07:51 -0800821 uint32_t handle;
822 uint32_t read_domains;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700823/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800824 uint32_t write_domain;
Ben Cheng655a7c02013-10-16 16:09:24 -0700825};
826struct drm_radeon_gem_wait_idle {
Tao Baod7db5942015-01-28 10:07:51 -0800827 uint32_t handle;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700828/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800829 uint32_t pad;
Ben Cheng655a7c02013-10-16 16:09:24 -0700830};
831struct drm_radeon_gem_busy {
Tao Baod7db5942015-01-28 10:07:51 -0800832 uint32_t handle;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700833/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800834 uint32_t domain;
Ben Cheng655a7c02013-10-16 16:09:24 -0700835};
836struct drm_radeon_gem_pread {
Tao Baod7db5942015-01-28 10:07:51 -0800837 uint32_t handle;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700838/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800839 uint32_t pad;
840 uint64_t offset;
841 uint64_t size;
842 uint64_t data_ptr;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700843/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700844};
Ben Cheng655a7c02013-10-16 16:09:24 -0700845struct drm_radeon_gem_pwrite {
Tao Baod7db5942015-01-28 10:07:51 -0800846 uint32_t handle;
847 uint32_t pad;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700848/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800849 uint64_t offset;
850 uint64_t size;
851 uint64_t data_ptr;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700852};
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700853/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800854struct drm_radeon_gem_op {
855 uint32_t handle;
856 uint32_t op;
857 uint64_t value;
858/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700859};
860#define RADEON_GEM_OP_GET_INITIAL_DOMAIN 0
861#define RADEON_GEM_OP_SET_INITIAL_DOMAIN 1
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700862#define RADEON_VA_MAP 1
Tao Baod7db5942015-01-28 10:07:51 -0800863/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700864#define RADEON_VA_UNMAP 2
865#define RADEON_VA_RESULT_OK 0
866#define RADEON_VA_RESULT_ERROR 1
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700867#define RADEON_VA_RESULT_VA_EXIST 2
Tao Baod7db5942015-01-28 10:07:51 -0800868/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700869#define RADEON_VM_PAGE_VALID (1 << 0)
870#define RADEON_VM_PAGE_READABLE (1 << 1)
871#define RADEON_VM_PAGE_WRITEABLE (1 << 2)
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700872#define RADEON_VM_PAGE_SYSTEM (1 << 3)
Tao Baod7db5942015-01-28 10:07:51 -0800873/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700874#define RADEON_VM_PAGE_SNOOPED (1 << 4)
875struct drm_radeon_gem_va {
Tao Baod7db5942015-01-28 10:07:51 -0800876 uint32_t handle;
877 uint32_t operation;
Ben Cheng655a7c02013-10-16 16:09:24 -0700878/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800879 uint32_t vm_id;
880 uint32_t flags;
881 uint64_t offset;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700882};
Tao Baod7db5942015-01-28 10:07:51 -0800883/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700884#define RADEON_CHUNK_ID_RELOCS 0x01
885#define RADEON_CHUNK_ID_IB 0x02
886#define RADEON_CHUNK_ID_FLAGS 0x03
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700887#define RADEON_CHUNK_ID_CONST_IB 0x04
Tao Baod7db5942015-01-28 10:07:51 -0800888/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700889#define RADEON_CS_KEEP_TILING_FLAGS 0x01
890#define RADEON_CS_USE_VM 0x02
891#define RADEON_CS_END_OF_FRAME 0x04
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700892#define RADEON_CS_RING_GFX 0
Tao Baod7db5942015-01-28 10:07:51 -0800893/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700894#define RADEON_CS_RING_COMPUTE 1
895#define RADEON_CS_RING_DMA 2
896#define RADEON_CS_RING_UVD 3
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700897#define RADEON_CS_RING_VCE 4
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700898/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800899struct drm_radeon_cs_chunk {
900 uint32_t chunk_id;
901 uint32_t length_dw;
902 uint64_t chunk_data;
903/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700904};
Christopher Ferris82d75042015-01-26 10:57:07 -0800905#define RADEON_RELOC_PRIO_MASK (0xf << 0)
Ben Cheng655a7c02013-10-16 16:09:24 -0700906struct drm_radeon_cs_reloc {
Tao Baod7db5942015-01-28 10:07:51 -0800907 uint32_t handle;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700908/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800909 uint32_t read_domains;
910 uint32_t write_domain;
911 uint32_t flags;
Christopher Ferris82d75042015-01-26 10:57:07 -0800912};
Tao Baod7db5942015-01-28 10:07:51 -0800913/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700914struct drm_radeon_cs {
Tao Baod7db5942015-01-28 10:07:51 -0800915 uint32_t num_chunks;
916 uint32_t cs_id;
917 uint64_t chunks;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700918/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800919 uint64_t gart_limit;
920 uint64_t vram_limit;
Ben Cheng655a7c02013-10-16 16:09:24 -0700921};
Christopher Ferris82d75042015-01-26 10:57:07 -0800922#define RADEON_INFO_DEVICE_ID 0x00
Tao Baod7db5942015-01-28 10:07:51 -0800923/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700924#define RADEON_INFO_NUM_GB_PIPES 0x01
925#define RADEON_INFO_NUM_Z_PIPES 0x02
Ben Cheng655a7c02013-10-16 16:09:24 -0700926#define RADEON_INFO_ACCEL_WORKING 0x03
Christopher Ferris82d75042015-01-26 10:57:07 -0800927#define RADEON_INFO_CRTC_FROM_ID 0x04
Tao Baod7db5942015-01-28 10:07:51 -0800928/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700929#define RADEON_INFO_ACCEL_WORKING2 0x05
930#define RADEON_INFO_TILING_CONFIG 0x06
Ben Cheng655a7c02013-10-16 16:09:24 -0700931#define RADEON_INFO_WANT_HYPERZ 0x07
Christopher Ferris82d75042015-01-26 10:57:07 -0800932#define RADEON_INFO_WANT_CMASK 0x08
Tao Baod7db5942015-01-28 10:07:51 -0800933/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700934#define RADEON_INFO_CLOCK_CRYSTAL_FREQ 0x09
935#define RADEON_INFO_NUM_BACKENDS 0x0a
Ben Cheng655a7c02013-10-16 16:09:24 -0700936#define RADEON_INFO_NUM_TILE_PIPES 0x0b
Christopher Ferris82d75042015-01-26 10:57:07 -0800937#define RADEON_INFO_FUSION_GART_WORKING 0x0c
Tao Baod7db5942015-01-28 10:07:51 -0800938/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700939#define RADEON_INFO_BACKEND_MAP 0x0d
940#define RADEON_INFO_VA_START 0x0e
Ben Cheng655a7c02013-10-16 16:09:24 -0700941#define RADEON_INFO_IB_VM_MAX_SIZE 0x0f
Christopher Ferris82d75042015-01-26 10:57:07 -0800942#define RADEON_INFO_MAX_PIPES 0x10
Tao Baod7db5942015-01-28 10:07:51 -0800943/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700944#define RADEON_INFO_TIMESTAMP 0x11
945#define RADEON_INFO_MAX_SE 0x12
Ben Cheng655a7c02013-10-16 16:09:24 -0700946#define RADEON_INFO_MAX_SH_PER_SE 0x13
Christopher Ferris82d75042015-01-26 10:57:07 -0800947#define RADEON_INFO_FASTFB_WORKING 0x14
Tao Baod7db5942015-01-28 10:07:51 -0800948/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700949#define RADEON_INFO_RING_WORKING 0x15
950#define RADEON_INFO_SI_TILE_MODE_ARRAY 0x16
Christopher Ferris38062f92014-07-09 15:33:25 -0700951#define RADEON_INFO_SI_CP_DMA_COMPUTE 0x17
Christopher Ferris82d75042015-01-26 10:57:07 -0800952#define RADEON_INFO_CIK_MACROTILE_MODE_ARRAY 0x18
Tao Baod7db5942015-01-28 10:07:51 -0800953/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris38062f92014-07-09 15:33:25 -0700954#define RADEON_INFO_SI_BACKEND_ENABLED_MASK 0x19
955#define RADEON_INFO_MAX_SCLK 0x1a
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700956#define RADEON_INFO_VCE_FW_VERSION 0x1b
Christopher Ferris82d75042015-01-26 10:57:07 -0800957#define RADEON_INFO_VCE_FB_VERSION 0x1c
Tao Baod7db5942015-01-28 10:07:51 -0800958/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700959#define RADEON_INFO_NUM_BYTES_MOVED 0x1d
960#define RADEON_INFO_VRAM_USAGE 0x1e
961#define RADEON_INFO_GTT_USAGE 0x1f
Christopher Ferris82d75042015-01-26 10:57:07 -0800962#define RADEON_INFO_ACTIVE_CU_COUNT 0x20
Elliott Hughes8cb52b02013-11-21 13:43:23 -0800963/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800964struct drm_radeon_info {
965 uint32_t request;
966 uint32_t pad;
967 uint64_t value;
968/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700969};
970#define SI_TILE_MODE_COLOR_LINEAR_ALIGNED 8
971#define SI_TILE_MODE_COLOR_1D 13
Christopher Ferris82d75042015-01-26 10:57:07 -0800972#define SI_TILE_MODE_COLOR_1D_SCANOUT 9
Tao Baod7db5942015-01-28 10:07:51 -0800973/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700974#define SI_TILE_MODE_COLOR_2D_8BPP 14
975#define SI_TILE_MODE_COLOR_2D_16BPP 15
976#define SI_TILE_MODE_COLOR_2D_32BPP 16
Christopher Ferris82d75042015-01-26 10:57:07 -0800977#define SI_TILE_MODE_COLOR_2D_64BPP 17
Tao Baod7db5942015-01-28 10:07:51 -0800978/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700979#define SI_TILE_MODE_COLOR_2D_SCANOUT_16BPP 11
980#define SI_TILE_MODE_COLOR_2D_SCANOUT_32BPP 12
981#define SI_TILE_MODE_DEPTH_STENCIL_1D 4
Christopher Ferris82d75042015-01-26 10:57:07 -0800982#define SI_TILE_MODE_DEPTH_STENCIL_2D 0
Tao Baod7db5942015-01-28 10:07:51 -0800983/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700984#define SI_TILE_MODE_DEPTH_STENCIL_2D_2AA 3
985#define SI_TILE_MODE_DEPTH_STENCIL_2D_4AA 3
986#define SI_TILE_MODE_DEPTH_STENCIL_2D_8AA 2
Christopher Ferris82d75042015-01-26 10:57:07 -0800987#define CIK_TILE_MODE_DEPTH_STENCIL_1D 5
Tao Baod7db5942015-01-28 10:07:51 -0800988/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris38062f92014-07-09 15:33:25 -0700989#endif