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.h"
22 #ifdef __cplusplus
23 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
24 #endif
25 #ifndef __SAVAGE_SAREA_DEFINES__
26 #define __SAVAGE_SAREA_DEFINES__
27 #define SAVAGE_CARD_HEAP 0
28 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
29 #define SAVAGE_AGP_HEAP 1
30 #define SAVAGE_NR_TEX_HEAPS 2
31 #define SAVAGE_NR_TEX_REGIONS 16
32 #define SAVAGE_LOG_MIN_TEX_REGION_SIZE 16
33 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
34 #endif
35 typedef struct _drm_savage_sarea {
36   struct drm_tex_region texList[SAVAGE_NR_TEX_HEAPS][SAVAGE_NR_TEX_REGIONS + 1];
37   unsigned int texAge[SAVAGE_NR_TEX_HEAPS];
38 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
39   int ctxOwner;
40 } drm_savage_sarea_t, * drm_savage_sarea_ptr;
41 #define DRM_SAVAGE_BCI_INIT 0x00
42 #define DRM_SAVAGE_BCI_CMDBUF 0x01
43 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
44 #define DRM_SAVAGE_BCI_EVENT_EMIT 0x02
45 #define DRM_SAVAGE_BCI_EVENT_WAIT 0x03
46 #define DRM_IOCTL_SAVAGE_BCI_INIT DRM_IOW(DRM_COMMAND_BASE + DRM_SAVAGE_BCI_INIT, drm_savage_init_t)
47 #define DRM_IOCTL_SAVAGE_BCI_CMDBUF DRM_IOW(DRM_COMMAND_BASE + DRM_SAVAGE_BCI_CMDBUF, drm_savage_cmdbuf_t)
48 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
49 #define DRM_IOCTL_SAVAGE_BCI_EVENT_EMIT DRM_IOWR(DRM_COMMAND_BASE + DRM_SAVAGE_BCI_EVENT_EMIT, drm_savage_event_emit_t)
50 #define DRM_IOCTL_SAVAGE_BCI_EVENT_WAIT DRM_IOW(DRM_COMMAND_BASE + DRM_SAVAGE_BCI_EVENT_WAIT, drm_savage_event_wait_t)
51 #define SAVAGE_DMA_PCI 1
52 #define SAVAGE_DMA_AGP 3
53 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
54 typedef struct drm_savage_init {
55   enum {
56     SAVAGE_INIT_BCI = 1,
57     SAVAGE_CLEANUP_BCI = 2
58 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
59   } func;
60   unsigned int sarea_priv_offset;
61   unsigned int cob_size;
62   unsigned int bci_threshold_lo, bci_threshold_hi;
63 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
64   unsigned int dma_type;
65   unsigned int fb_bpp;
66   unsigned int front_offset, front_pitch;
67   unsigned int back_offset, back_pitch;
68 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
69   unsigned int depth_bpp;
70   unsigned int depth_offset, depth_pitch;
71   unsigned int texture_offset;
72   unsigned int texture_size;
73 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
74   unsigned long status_offset;
75   unsigned long buffers_offset;
76   unsigned long agp_textures_offset;
77   unsigned long cmd_dma_offset;
78 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
79 } drm_savage_init_t;
80 typedef union drm_savage_cmd_header drm_savage_cmd_header_t;
81 typedef struct drm_savage_cmdbuf {
82   drm_savage_cmd_header_t __user * cmd_addr;
83 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
84   unsigned int size;
85   unsigned int dma_idx;
86   int discard;
87   unsigned int __user * vb_addr;
88 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
89   unsigned int vb_size;
90   unsigned int vb_stride;
91   struct drm_clip_rect __user * box_addr;
92   unsigned int nbox;
93 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
94 } drm_savage_cmdbuf_t;
95 #define SAVAGE_WAIT_2D 0x1
96 #define SAVAGE_WAIT_3D 0x2
97 #define SAVAGE_WAIT_IRQ 0x4
98 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
99 typedef struct drm_savage_event {
100   unsigned int count;
101   unsigned int flags;
102 } drm_savage_event_emit_t, drm_savage_event_wait_t;
103 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
104 #define SAVAGE_CMD_STATE 0
105 #define SAVAGE_CMD_DMA_PRIM 1
106 #define SAVAGE_CMD_VB_PRIM 2
107 #define SAVAGE_CMD_DMA_IDX 3
108 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
109 #define SAVAGE_CMD_VB_IDX 4
110 #define SAVAGE_CMD_CLEAR 5
111 #define SAVAGE_CMD_SWAP 6
112 #define SAVAGE_PRIM_TRILIST 0
113 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
114 #define SAVAGE_PRIM_TRISTRIP 1
115 #define SAVAGE_PRIM_TRIFAN 2
116 #define SAVAGE_PRIM_TRILIST_201 3
117 #define SAVAGE_SKIP_Z 0x01
118 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
119 #define SAVAGE_SKIP_W 0x02
120 #define SAVAGE_SKIP_C0 0x04
121 #define SAVAGE_SKIP_C1 0x08
122 #define SAVAGE_SKIP_S0 0x10
123 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
124 #define SAVAGE_SKIP_T0 0x20
125 #define SAVAGE_SKIP_ST0 0x30
126 #define SAVAGE_SKIP_S1 0x40
127 #define SAVAGE_SKIP_T1 0x80
128 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
129 #define SAVAGE_SKIP_ST1 0xc0
130 #define SAVAGE_SKIP_ALL_S3D 0x3f
131 #define SAVAGE_SKIP_ALL_S4 0xff
132 #define SAVAGE_FRONT 0x1
133 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
134 #define SAVAGE_BACK 0x2
135 #define SAVAGE_DEPTH 0x4
136 union drm_savage_cmd_header {
137   struct {
138 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
139     unsigned char cmd;
140     unsigned char pad0;
141     unsigned short pad1;
142     unsigned short pad2;
143 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
144     unsigned short pad3;
145   } cmd;
146   struct {
147     unsigned char cmd;
148 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
149     unsigned char global;
150     unsigned short count;
151     unsigned short start;
152     unsigned short pad3;
153 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
154   } state;
155   struct {
156     unsigned char cmd;
157     unsigned char prim;
158 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
159     unsigned short skip;
160     unsigned short count;
161     unsigned short start;
162   } prim;
163 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
164   struct {
165     unsigned char cmd;
166     unsigned char prim;
167     unsigned short skip;
168 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
169     unsigned short count;
170     unsigned short pad3;
171   } idx;
172   struct {
173 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
174     unsigned char cmd;
175     unsigned char pad0;
176     unsigned short pad1;
177     unsigned int flags;
178 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
179   } clear0;
180   struct {
181     unsigned int mask;
182     unsigned int value;
183 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
184   } clear1;
185 };
186 #ifdef __cplusplus
187 #endif
188 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
189 #endif
190