1 /**********************************************************************
3 * Copyright(c) 2008 Imagination Technologies Ltd. All rights reserved.
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms and conditions of the GNU General Public License,
7 * version 2, as published by the Free Software Foundation.
9 * This program is distributed in the hope it will be useful but, except
10 * as otherwise stated in writing, without any warranty; without even the
11 * implied warranty of merchantability or fitness for a particular purpose.
12 * See the GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License along with
15 * this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
18 * The full GNU General Public License is included in this distribution in
19 * the file called "COPYING".
21 * Contact Information:
22 * Imagination Technologies Ltd. <gpl-support@imgtec.com>
23 * Home Park Estate, Kings Langley, Herts, WD4 8LZ, UK
25 ******************************************************************************/
27 #ifndef __PVR_BRIDGE_H__
28 #define __PVR_BRIDGE_H__
31 #include "servicesint.h"
34 #include <linux/ioctl.h>
36 #define PVRSRV_IOC_GID 'g'
37 #define PVRSRV_IO(INDEX) \
38 _IO(PVRSRV_IOC_GID, INDEX, struct PVRSRV_BRIDGE_PACKAGE)
39 #define PVRSRV_IOW(INDEX) \
40 _IOW(PVRSRV_IOC_GID, INDEX, struct PVRSRV_BRIDGE_PACKAGE)
41 #define PVRSRV_IOR(INDEX) \
42 _IOR(PVRSRV_IOC_GID, INDEX, struct PVRSRV_BRIDGE_PACKAGE)
43 #define PVRSRV_IOWR(INDEX) \
44 _IOWR(PVRSRV_IOC_GID, INDEX, struct PVRSRV_BRIDGE_PACKAGE)
47 #define PVRSRV_BRIDGE_CORE_CMD_FIRST 0
48 #define PVRSRV_BRIDGE_ENUM_DEVICES \
49 PVRSRV_IOWR(PVRSRV_BRIDGE_CORE_CMD_FIRST+0)
50 #define PVRSRV_BRIDGE_ACQUIRE_DEVICEINFO \
51 PVRSRV_IOWR(PVRSRV_BRIDGE_CORE_CMD_FIRST+1)
52 #define PVRSRV_BRIDGE_RELEASE_DEVICEINFO \
53 PVRSRV_IOWR(PVRSRV_BRIDGE_CORE_CMD_FIRST+2)
54 #define PVRSRV_BRIDGE_CREATE_DEVMEMCONTEXT \
55 PVRSRV_IOWR(PVRSRV_BRIDGE_CORE_CMD_FIRST+3)
56 #define PVRSRV_BRIDGE_DESTROY_DEVMEMCONTEXT \
57 PVRSRV_IOWR(PVRSRV_BRIDGE_CORE_CMD_FIRST+4)
58 #define PVRSRV_BRIDGE_GET_DEVMEM_HEAPINFO \
59 PVRSRV_IOWR(PVRSRV_BRIDGE_CORE_CMD_FIRST+5)
60 #define PVRSRV_BRIDGE_ALLOC_DEVICEMEM \
61 PVRSRV_IOWR(PVRSRV_BRIDGE_CORE_CMD_FIRST+6)
62 #define PVRSRV_BRIDGE_FREE_DEVICEMEM \
63 PVRSRV_IOWR(PVRSRV_BRIDGE_CORE_CMD_FIRST+7)
64 #define PVRSRV_BRIDGE_GETFREE_DEVICEMEM \
65 PVRSRV_IOWR(PVRSRV_BRIDGE_CORE_CMD_FIRST+8)
66 #define PVRSRV_BRIDGE_CREATE_COMMANDQUEUE \
67 PVRSRV_IOWR(PVRSRV_BRIDGE_CORE_CMD_FIRST+9)
68 #define PVRSRV_BRIDGE_DESTROY_COMMANDQUEUE \
69 PVRSRV_IOWR(PVRSRV_BRIDGE_CORE_CMD_FIRST+10)
70 #define PVRSRV_BRIDGE_MHANDLE_TO_MMAP_DATA \
71 PVRSRV_IOWR(PVRSRV_BRIDGE_CORE_CMD_FIRST+11)
72 #define PVRSRV_BRIDGE_CONNECT_SERVICES \
73 PVRSRV_IOWR(PVRSRV_BRIDGE_CORE_CMD_FIRST+12)
74 #define PVRSRV_BRIDGE_DISCONNECT_SERVICES \
75 PVRSRV_IOWR(PVRSRV_BRIDGE_CORE_CMD_FIRST+13)
76 #define PVRSRV_BRIDGE_WRAP_DEVICE_MEM \
77 PVRSRV_IOWR(PVRSRV_BRIDGE_CORE_CMD_FIRST+14)
78 #define PVRSRV_BRIDGE_GET_DEVICEMEMINFO \
79 PVRSRV_IOWR(PVRSRV_BRIDGE_CORE_CMD_FIRST+15)
80 #define PVRSRV_BRIDGE_RESERVE_DEV_VIRTMEM \
81 PVRSRV_IOWR(PVRSRV_BRIDGE_CORE_CMD_FIRST+16)
82 #define PVRSRV_BRIDGE_FREE_DEV_VIRTMEM \
83 PVRSRV_IOWR(PVRSRV_BRIDGE_CORE_CMD_FIRST+17)
84 #define PVRSRV_BRIDGE_MAP_EXT_MEMORY \
85 PVRSRV_IOWR(PVRSRV_BRIDGE_CORE_CMD_FIRST+18)
86 #define PVRSRV_BRIDGE_UNMAP_EXT_MEMORY \
87 PVRSRV_IOWR(PVRSRV_BRIDGE_CORE_CMD_FIRST+19)
88 #define PVRSRV_BRIDGE_MAP_DEV_MEMORY \
89 PVRSRV_IOWR(PVRSRV_BRIDGE_CORE_CMD_FIRST+20)
90 #define PVRSRV_BRIDGE_UNMAP_DEV_MEMORY \
91 PVRSRV_IOWR(PVRSRV_BRIDGE_CORE_CMD_FIRST+21)
92 #define PVRSRV_BRIDGE_MAP_DEVICECLASS_MEMORY \
93 PVRSRV_IOWR(PVRSRV_BRIDGE_CORE_CMD_FIRST+22)
94 #define PVRSRV_BRIDGE_UNMAP_DEVICECLASS_MEMORY \
95 PVRSRV_IOWR(PVRSRV_BRIDGE_CORE_CMD_FIRST+23)
96 #define PVRSRV_BRIDGE_MAP_MEM_INFO_TO_USER \
97 PVRSRV_IOWR(PVRSRV_BRIDGE_CORE_CMD_FIRST+24)
98 #define PVRSRV_BRIDGE_UNMAP_MEM_INFO_FROM_USER \
99 PVRSRV_IOWR(PVRSRV_BRIDGE_CORE_CMD_FIRST+25)
100 #define PVRSRV_BRIDGE_EXPORT_DEVICEMEM \
101 PVRSRV_IOWR(PVRSRV_BRIDGE_CORE_CMD_FIRST+26)
102 #define PVRSRV_BRIDGE_RELEASE_MMAP_DATA \
103 PVRSRV_IOWR(PVRSRV_BRIDGE_CORE_CMD_FIRST+27)
104 #define PVRSRV_BRIDGE_CACHE_FLUSH_DRM \
105 PVRSRV_IOWR(PVRSRV_BRIDGE_CORE_CMD_FIRST+28)
106 #define PVRSRV_BRIDGE_CORE_CMD_LAST \
107 (PVRSRV_BRIDGE_CORE_CMD_FIRST+28)
109 #define PVRSRV_BRIDGE_SIM_CMD_FIRST \
110 (PVRSRV_BRIDGE_CORE_CMD_LAST+1)
111 #define PVRSRV_BRIDGE_PROCESS_SIMISR_EVENT \
112 PVRSRV_IOWR(PVRSRV_BRIDGE_SIM_CMD_FIRST+0)
113 #define PVRSRV_BRIDGE_REGISTER_SIM_PROCESS \
114 PVRSRV_IOWR(PVRSRV_BRIDGE_SIM_CMD_FIRST+1)
115 #define PVRSRV_BRIDGE_UNREGISTER_SIM_PROCESS \
116 PVRSRV_IOWR(PVRSRV_BRIDGE_SIM_CMD_FIRST+2)
117 #define PVRSRV_BRIDGE_SIM_CMD_LAST \
118 (PVRSRV_BRIDGE_SIM_CMD_FIRST+2)
120 #define PVRSRV_BRIDGE_MAPPING_CMD_FIRST \
121 (PVRSRV_BRIDGE_SIM_CMD_LAST+1)
122 #define PVRSRV_BRIDGE_MAPPHYSTOUSERSPACE \
123 PVRSRV_IOWR(PVRSRV_BRIDGE_MAPPING_CMD_FIRST+0)
124 #define PVRSRV_BRIDGE_UNMAPPHYSTOUSERSPACE \
125 PVRSRV_IOWR(PVRSRV_BRIDGE_MAPPING_CMD_FIRST+1)
126 #define PVRSRV_BRIDGE_GETPHYSTOUSERSPACEMAP \
127 PVRSRV_IOWR(PVRSRV_BRIDGE_MAPPING_CMD_FIRST+2)
128 #define PVRSRV_BRIDGE_MAPPING_CMD_LAST \
129 (PVRSRV_BRIDGE_MAPPING_CMD_FIRST+2)
131 #define PVRSRV_BRIDGE_STATS_CMD_FIRST \
132 (PVRSRV_BRIDGE_MAPPING_CMD_LAST+1)
133 #define PVRSRV_BRIDGE_GET_FB_STATS \
134 PVRSRV_IOWR(PVRSRV_BRIDGE_STATS_CMD_FIRST+0)
135 #define PVRSRV_BRIDGE_STATS_CMD_LAST \
136 (PVRSRV_BRIDGE_STATS_CMD_FIRST+0)
138 #define PVRSRV_BRIDGE_MISC_CMD_FIRST \
139 (PVRSRV_BRIDGE_STATS_CMD_LAST+1)
140 #define PVRSRV_BRIDGE_GET_MISC_INFO \
141 PVRSRV_IOWR(PVRSRV_BRIDGE_MISC_CMD_FIRST+0)
142 #define PVRSRV_BRIDGE_RELEASE_MISC_INFO \
143 PVRSRV_IOWR(PVRSRV_BRIDGE_MISC_CMD_FIRST+1)
144 #define PVRSRV_BRIDGE_MISC_CMD_LAST \
145 (PVRSRV_BRIDGE_MISC_CMD_FIRST+1)
147 #define PVRSRV_BRIDGE_OVERLAY_CMD_FIRST \
148 (PVRSRV_BRIDGE_MISC_CMD_LAST+1)
149 #define PVRSRV_BRIDGE_OVERLAY_CMD_LAST \
150 (PVRSRV_BRIDGE_OVERLAY_CMD_FIRST+1)
153 #define PVRSRV_BRIDGE_PDUMP_CMD_FIRST \
154 (PVRSRV_BRIDGE_OVERLAY_CMD_FIRST+1)
155 #define PVRSRV_BRIDGE_PDUMP_INIT \
156 PVRSRV_IOWR(PVRSRV_BRIDGE_PDUMP_CMD_FIRST+0)
157 #define PVRSRV_BRIDGE_PDUMP_MEMPOL \
158 PVRSRV_IOWR(PVRSRV_BRIDGE_PDUMP_CMD_FIRST+1)
159 #define PVRSRV_BRIDGE_PDUMP_DUMPMEM \
160 PVRSRV_IOWR(PVRSRV_BRIDGE_PDUMP_CMD_FIRST+2)
161 #define PVRSRV_BRIDGE_PDUMP_REG \
162 PVRSRV_IOWR(PVRSRV_BRIDGE_PDUMP_CMD_FIRST+3)
163 #define PVRSRV_BRIDGE_PDUMP_REGPOL \
164 PVRSRV_IOWR(PVRSRV_BRIDGE_PDUMP_CMD_FIRST+4)
165 #define PVRSRV_BRIDGE_PDUMP_COMMENT \
166 PVRSRV_IOWR(PVRSRV_BRIDGE_PDUMP_CMD_FIRST+5)
167 #define PVRSRV_BRIDGE_PDUMP_SETFRAME \
168 PVRSRV_IOWR(PVRSRV_BRIDGE_PDUMP_CMD_FIRST+6)
169 #define PVRSRV_BRIDGE_PDUMP_ISCAPTURING \
170 PVRSRV_IOWR(PVRSRV_BRIDGE_PDUMP_CMD_FIRST+7)
171 #define PVRSRV_BRIDGE_PDUMP_DUMPBITMAP \
172 PVRSRV_IOWR(PVRSRV_BRIDGE_PDUMP_CMD_FIRST+8)
173 #define PVRSRV_BRIDGE_PDUMP_DUMPREADREG \
174 PVRSRV_IOWR(PVRSRV_BRIDGE_PDUMP_CMD_FIRST+9)
175 #define PVRSRV_BRIDGE_PDUMP_SYNCPOL \
176 PVRSRV_IOWR(PVRSRV_BRIDGE_PDUMP_CMD_FIRST+10)
177 #define PVRSRV_BRIDGE_PDUMP_DUMPSYNC \
178 PVRSRV_IOWR(PVRSRV_BRIDGE_PDUMP_CMD_FIRST+11)
179 #define PVRSRV_BRIDGE_PDUMP_MEMPAGES \
180 PVRSRV_IOWR(PVRSRV_BRIDGE_PDUMP_CMD_FIRST+12)
181 #define PVRSRV_BRIDGE_PDUMP_DRIVERINFO \
182 PVRSRV_IOWR(PVRSRV_BRIDGE_PDUMP_CMD_FIRST+13)
183 #define PVRSRV_BRIDGE_PDUMP_PDREG \
184 PVRSRV_IOWR(PVRSRV_BRIDGE_PDUMP_CMD_FIRST+14)
185 #define PVRSRV_BRIDGE_PDUMP_DUMPPDDEVPADDR \
186 PVRSRV_IOWR(PVRSRV_BRIDGE_PDUMP_CMD_FIRST+15)
187 #define PVRSRV_BRIDGE_PDUMP_CYCLE_COUNT_REG_READ \
188 PVRSRV_IOWR(PVRSRV_BRIDGE_PDUMP_CMD_FIRST+16)
189 #define PVRSRV_BRIDGE_PDUMP_STARTINITPHASE \
190 PVRSRV_IOWR(PVRSRV_BRIDGE_PDUMP_CMD_FIRST+17)
191 #define PVRSRV_BRIDGE_PDUMP_STOPINITPHASE \
192 PVRSRV_IOWR(PVRSRV_BRIDGE_PDUMP_CMD_FIRST+18)
193 #define PVRSRV_BRIDGE_PDUMP_CMD_LAST \
194 (PVRSRV_BRIDGE_PDUMP_CMD_FIRST+18)
196 #define PVRSRV_BRIDGE_PDUMP_CMD_LAST PVRSRV_BRIDGE_OVERLAY_CMD_LAST
199 #define PVRSRV_BRIDGE_OEM_CMD_FIRST \
200 (PVRSRV_BRIDGE_PDUMP_CMD_LAST+1)
201 #define PVRSRV_BRIDGE_GET_OEMJTABLE \
202 PVRSRV_IOWR(PVRSRV_BRIDGE_OEM_CMD_FIRST+0)
203 #define PVRSRV_BRIDGE_OEM_CMD_LAST \
204 (PVRSRV_BRIDGE_OEM_CMD_FIRST+0)
206 #define PVRSRV_BRIDGE_DEVCLASS_CMD_FIRST \
207 (PVRSRV_BRIDGE_OEM_CMD_LAST+1)
208 #define PVRSRV_BRIDGE_ENUM_CLASS \
209 PVRSRV_IOWR(PVRSRV_BRIDGE_DEVCLASS_CMD_FIRST+0)
210 #define PVRSRV_BRIDGE_DEVCLASS_CMD_LAST \
211 (PVRSRV_BRIDGE_DEVCLASS_CMD_FIRST+0)
213 #define PVRSRV_BRIDGE_DISPCLASS_CMD_FIRST \
214 (PVRSRV_BRIDGE_DEVCLASS_CMD_LAST+1)
215 #define PVRSRV_BRIDGE_OPEN_DISPCLASS_DEVICE \
216 PVRSRV_IOWR(PVRSRV_BRIDGE_DISPCLASS_CMD_FIRST+0)
217 #define PVRSRV_BRIDGE_CLOSE_DISPCLASS_DEVICE \
218 PVRSRV_IOWR(PVRSRV_BRIDGE_DISPCLASS_CMD_FIRST+1)
219 #define PVRSRV_BRIDGE_ENUM_DISPCLASS_FORMATS \
220 PVRSRV_IOWR(PVRSRV_BRIDGE_DISPCLASS_CMD_FIRST+2)
221 #define PVRSRV_BRIDGE_ENUM_DISPCLASS_DIMS \
222 PVRSRV_IOWR(PVRSRV_BRIDGE_DISPCLASS_CMD_FIRST+3)
223 #define PVRSRV_BRIDGE_GET_DISPCLASS_SYSBUFFER \
224 PVRSRV_IOWR(PVRSRV_BRIDGE_DISPCLASS_CMD_FIRST+4)
225 #define PVRSRV_BRIDGE_GET_DISPCLASS_INFO \
226 PVRSRV_IOWR(PVRSRV_BRIDGE_DISPCLASS_CMD_FIRST+5)
227 #define PVRSRV_BRIDGE_CREATE_DISPCLASS_SWAPCHAIN \
228 PVRSRV_IOWR(PVRSRV_BRIDGE_DISPCLASS_CMD_FIRST+6)
229 #define PVRSRV_BRIDGE_DESTROY_DISPCLASS_SWAPCHAIN \
230 PVRSRV_IOWR(PVRSRV_BRIDGE_DISPCLASS_CMD_FIRST+7)
231 #define PVRSRV_BRIDGE_SET_DISPCLASS_DSTRECT \
232 PVRSRV_IOWR(PVRSRV_BRIDGE_DISPCLASS_CMD_FIRST+8)
233 #define PVRSRV_BRIDGE_SET_DISPCLASS_SRCRECT \
234 PVRSRV_IOWR(PVRSRV_BRIDGE_DISPCLASS_CMD_FIRST+9)
235 #define PVRSRV_BRIDGE_SET_DISPCLASS_DSTCOLOURKEY \
236 PVRSRV_IOWR(PVRSRV_BRIDGE_DISPCLASS_CMD_FIRST+10)
237 #define PVRSRV_BRIDGE_SET_DISPCLASS_SRCCOLOURKEY \
238 PVRSRV_IOWR(PVRSRV_BRIDGE_DISPCLASS_CMD_FIRST+11)
239 #define PVRSRV_BRIDGE_GET_DISPCLASS_BUFFERS \
240 PVRSRV_IOWR(PVRSRV_BRIDGE_DISPCLASS_CMD_FIRST+12)
241 #define PVRSRV_BRIDGE_SWAP_DISPCLASS_TO_BUFFER \
242 PVRSRV_IOWR(PVRSRV_BRIDGE_DISPCLASS_CMD_FIRST+13)
243 #define PVRSRV_BRIDGE_SWAP_DISPCLASS_TO_SYSTEM \
244 PVRSRV_IOWR(PVRSRV_BRIDGE_DISPCLASS_CMD_FIRST+14)
245 #define PVRSRV_BRIDGE_DISPCLASS_CMD_LAST \
246 (PVRSRV_BRIDGE_DISPCLASS_CMD_FIRST+14)
248 #define PVRSRV_BRIDGE_BUFCLASS_CMD_FIRST \
249 (PVRSRV_BRIDGE_DISPCLASS_CMD_LAST+1)
250 #define PVRSRV_BRIDGE_OPEN_BUFFERCLASS_DEVICE \
251 PVRSRV_IOWR(PVRSRV_BRIDGE_BUFCLASS_CMD_FIRST+0)
252 #define PVRSRV_BRIDGE_CLOSE_BUFFERCLASS_DEVICE \
253 PVRSRV_IOWR(PVRSRV_BRIDGE_BUFCLASS_CMD_FIRST+1)
254 #define PVRSRV_BRIDGE_GET_BUFFERCLASS_INFO \
255 PVRSRV_IOWR(PVRSRV_BRIDGE_BUFCLASS_CMD_FIRST+2)
256 #define PVRSRV_BRIDGE_GET_BUFFERCLASS_BUFFER \
257 PVRSRV_IOWR(PVRSRV_BRIDGE_BUFCLASS_CMD_FIRST+3)
258 #define PVRSRV_BRIDGE_BUFCLASS_CMD_LAST \
259 (PVRSRV_BRIDGE_BUFCLASS_CMD_FIRST+3)
261 #define PVRSRV_BRIDGE_WRAP_CMD_FIRST \
262 (PVRSRV_BRIDGE_BUFCLASS_CMD_LAST+1)
263 #define PVRSRV_BRIDGE_WRAP_EXT_MEMORY \
264 PVRSRV_IOWR(PVRSRV_BRIDGE_WRAP_CMD_FIRST+0)
265 #define PVRSRV_BRIDGE_UNWRAP_EXT_MEMORY \
266 PVRSRV_IOWR(PVRSRV_BRIDGE_WRAP_CMD_FIRST+1)
267 #define PVRSRV_BRIDGE_WRAP_CMD_LAST \
268 (PVRSRV_BRIDGE_WRAP_CMD_FIRST+1)
270 #define PVRSRV_BRIDGE_SHAREDMEM_CMD_FIRST \
271 (PVRSRV_BRIDGE_WRAP_CMD_LAST+1)
272 #define PVRSRV_BRIDGE_ALLOC_SHARED_SYS_MEM \
273 PVRSRV_IOWR(PVRSRV_BRIDGE_SHAREDMEM_CMD_FIRST+0)
274 #define PVRSRV_BRIDGE_FREE_SHARED_SYS_MEM \
275 PVRSRV_IOWR(PVRSRV_BRIDGE_SHAREDMEM_CMD_FIRST+1)
276 #define PVRSRV_BRIDGE_MAP_MEMINFO_MEM \
277 PVRSRV_IOWR(PVRSRV_BRIDGE_SHAREDMEM_CMD_FIRST+2)
278 #define PVRSRV_BRIDGE_UNMAP_MEMINFO_MEM \
279 PVRSRV_IOWR(PVRSRV_BRIDGE_SHAREDMEM_CMD_FIRST+3)
280 #define PVRSRV_BRIDGE_SHAREDMEM_CMD_LAST \
281 (PVRSRV_BRIDGE_SHAREDMEM_CMD_FIRST+3)
283 #define PVRSRV_BRIDGE_SERVICES4_TMP_CMD_FIRST \
284 (PVRSRV_BRIDGE_SHAREDMEM_CMD_LAST+1)
285 #define PVRSRV_BRIDGE_GETMMU_PD_DEVPADDR \
286 PVRSRV_IOWR(PVRSRV_BRIDGE_SERVICES4_TMP_CMD_FIRST+0)
287 #define PVRSRV_BRIDGE_SERVICES4_TMP_CMD_LAST \
288 (PVRSRV_BRIDGE_SERVICES4_TMP_CMD_FIRST+0)
290 #define PVRSRV_BRIDGE_INITSRV_CMD_FIRST \
291 (PVRSRV_BRIDGE_SERVICES4_TMP_CMD_LAST+1)
292 #define PVRSRV_BRIDGE_INITSRV_CONNECT \
293 PVRSRV_IOWR(PVRSRV_BRIDGE_INITSRV_CMD_FIRST+0)
294 #define PVRSRV_BRIDGE_INITSRV_DISCONNECT \
295 PVRSRV_IOWR(PVRSRV_BRIDGE_INITSRV_CMD_FIRST+1)
296 #define PVRSRV_BRIDGE_INITSRV_CMD_LAST \
297 (PVRSRV_BRIDGE_INITSRV_CMD_FIRST+1)
299 #define PVRSRV_BRIDGE_EVENT_OBJECT_CMD_FIRST \
300 (PVRSRV_BRIDGE_INITSRV_CMD_LAST+1)
301 #define PVRSRV_BRIDGE_EVENT_OBJECT_WAIT \
302 PVRSRV_IOWR(PVRSRV_BRIDGE_EVENT_OBJECT_CMD_FIRST+0)
303 #define PVRSRV_BRIDGE_EVENT_OBJECT_OPEN \
304 PVRSRV_IOWR(PVRSRV_BRIDGE_EVENT_OBJECT_CMD_FIRST+1)
305 #define PVRSRV_BRIDGE_EVENT_OBJECT_CLOSE \
306 PVRSRV_IOWR(PVRSRV_BRIDGE_EVENT_OBJECT_CMD_FIRST+2)
307 #define PVRSRV_BRIDGE_EVENT_OBJECT_CMD_LAST \
308 (PVRSRV_BRIDGE_EVENT_OBJECT_CMD_FIRST+2)
310 #define PVRSRV_BRIDGE_SYNC_OPS_CMD_FIRST \
311 (PVRSRV_BRIDGE_EVENT_OBJECT_CMD_LAST+1)
312 #define PVRSRV_BRIDGE_MODIFY_SYNC_OPS \
313 PVRSRV_IOWR(PVRSRV_BRIDGE_SYNC_OPS_CMD_FIRST+0)
314 #define PVRSRV_BRIDGE_SYNC_OPS_CMD_LAST \
315 (PVRSRV_BRIDGE_SYNC_OPS_CMD_FIRST+0)
317 #define PVRSRV_BRIDGE_LAST_NON_DEVICE_CMD \
318 (PVRSRV_BRIDGE_SYNC_OPS_CMD_LAST+1)
320 #define PVRSRV_KERNEL_MODE_CLIENT 1
322 struct PVRSRV_BRIDGE_RETURN {
323 enum PVRSRV_ERROR eError;
327 struct PVRSRV_BRIDGE_PACKAGE {
330 void __user *pvParamIn;
331 u32 ui32InBufferSize;
332 void __user *pvParamOut;
333 u32 ui32OutBufferSize;
335 void *hKernelServices;
338 struct PVRSRV_BRIDGE_IN_ACQUIRE_DEVICEINFO {
341 enum PVRSRV_DEVICE_TYPE eDeviceType;
344 struct PVRSRV_BRIDGE_IN_ENUMCLASS {
346 enum PVRSRV_DEVICE_CLASS sDeviceClass;
349 struct PVRSRV_BRIDGE_IN_CLOSE_DISPCLASS_DEVICE {
354 struct PVRSRV_BRIDGE_IN_ENUM_DISPCLASS_FORMATS {
359 struct PVRSRV_BRIDGE_IN_GET_DISPCLASS_SYSBUFFER {
364 struct PVRSRV_BRIDGE_IN_GET_DISPCLASS_INFO {
369 struct PVRSRV_BRIDGE_IN_CLOSE_BUFFERCLASS_DEVICE {
374 struct PVRSRV_BRIDGE_IN_GET_BUFFERCLASS_INFO {
379 struct PVRSRV_BRIDGE_IN_RELEASE_DEVICEINFO {
384 struct PVRSRV_BRIDGE_IN_FREE_CLASSDEVICEINFO {
386 enum PVRSRV_DEVICE_CLASS DeviceClass;
390 struct PVRSRV_BRIDGE_IN_GET_DEVMEM_HEAPINFO {
393 void *hDevMemContext;
396 struct PVRSRV_BRIDGE_IN_CREATE_DEVMEMCONTEXT {
401 struct PVRSRV_BRIDGE_IN_DESTROY_DEVMEMCONTEXT {
404 void *hDevMemContext;
407 struct PVRSRV_BRIDGE_IN_ALLOCDEVICEMEM {
416 struct PVRSRV_BRIDGE_IN_MAPMEMINFOTOUSER {
418 struct PVRSRV_KERNEL_MEM_INFO *psKernelMemInfo;
421 struct PVRSRV_BRIDGE_IN_UNMAPMEMINFOFROMUSER {
423 struct PVRSRV_KERNEL_MEM_INFO *psKernelMemInfo;
428 #define DRM_PVR2D_CFLUSH_FROM_GPU 1
429 #define DRM_PVR2D_CFLUSH_TO_GPU 2
431 struct PVRSRV_BRIDGE_IN_CACHEFLUSHDRMFROMUSER {
439 struct PVRSRV_BRIDGE_IN_FREEDEVICEMEM {
442 struct PVRSRV_KERNEL_MEM_INFO *psKernelMemInfo;
443 struct PVRSRV_CLIENT_MEM_INFO sClientMemInfo;
447 struct PVRSRV_BRIDGE_IN_EXPORTDEVICEMEM {
450 struct PVRSRV_KERNEL_MEM_INFO *psKernelMemInfo;
454 struct PVRSRV_BRIDGE_IN_GETFREEDEVICEMEM {
459 struct PVRSRV_BRIDGE_IN_CREATECOMMANDQUEUE {
465 struct PVRSRV_BRIDGE_IN_DESTROYCOMMANDQUEUE {
468 struct PVRSRV_QUEUE_INFO *psQueueInfo;
472 struct PVRSRV_BRIDGE_IN_MHANDLE_TO_MMAP_DATA {
477 struct PVRSRV_BRIDGE_IN_RELEASE_MMAP_DATA {
482 struct PVRSRV_BRIDGE_IN_RESERVE_DEV_VIRTMEM {
485 struct IMG_DEV_VIRTADDR *psDevVAddr;
490 struct PVRSRV_BRIDGE_OUT_CONNECT_SERVICES {
491 enum PVRSRV_ERROR eError;
492 void *hKernelServices;
495 struct PVRSRV_BRIDGE_OUT_RESERVE_DEV_VIRTMEM {
496 enum PVRSRV_ERROR eError;
497 struct PVRSRV_KERNEL_MEM_INFO *psKernelMemInfo;
498 struct PVRSRV_KERNEL_SYNC_INFO *psKernelSyncInfo;
499 struct PVRSRV_CLIENT_MEM_INFO sClientMemInfo;
500 struct PVRSRV_CLIENT_SYNC_INFO sClientSyncInfo;
503 struct PVRSRV_BRIDGE_IN_FREE_DEV_VIRTMEM {
505 struct PVRSRV_KERNEL_MEM_INFO *psKernelMemInfo;
506 struct PVRSRV_CLIENT_MEM_INFO sClientMemInfo;
507 struct PVRSRV_CLIENT_SYNC_INFO sClientSyncInfo;
510 struct PVRSRV_BRIDGE_IN_MAP_DEV_MEMORY {
512 void *hKernelMemInfo;
513 void *hDstDevMemHeap;
516 struct PVRSRV_BRIDGE_OUT_MAP_DEV_MEMORY {
517 enum PVRSRV_ERROR eError;
518 struct PVRSRV_KERNEL_MEM_INFO *psDstKernelMemInfo;
519 struct PVRSRV_KERNEL_SYNC_INFO *psDstKernelSyncInfo;
520 struct PVRSRV_CLIENT_MEM_INFO sDstClientMemInfo;
521 struct PVRSRV_CLIENT_SYNC_INFO sDstClientSyncInfo;
524 struct PVRSRV_BRIDGE_IN_UNMAP_DEV_MEMORY {
526 struct PVRSRV_KERNEL_MEM_INFO *psKernelMemInfo;
527 struct PVRSRV_CLIENT_MEM_INFO sClientMemInfo;
528 struct PVRSRV_CLIENT_SYNC_INFO sClientSyncInfo;
531 struct PVRSRV_BRIDGE_IN_MAP_EXT_MEMORY {
533 struct PVRSRV_KERNEL_MEM_INFO *psKernelMemInfo;
534 struct IMG_SYS_PHYADDR *psSysPAddr;
538 struct PVRSRV_BRIDGE_IN_UNMAP_EXT_MEMORY {
540 struct PVRSRV_CLIENT_MEM_INFO sClientMemInfo;
541 struct PVRSRV_CLIENT_SYNC_INFO sClientSyncInfo;
545 struct PVRSRV_BRIDGE_IN_MAP_DEVICECLASS_MEMORY {
547 void *hDeviceClassBuffer;
548 void *hDevMemContext;
552 struct PVRSRV_BRIDGE_OUT_MAP_DEVICECLASS_MEMORY {
553 enum PVRSRV_ERROR eError;
554 struct PVRSRV_CLIENT_MEM_INFO sClientMemInfo;
555 struct PVRSRV_CLIENT_SYNC_INFO sClientSyncInfo;
556 struct PVRSRV_KERNEL_MEM_INFO *psKernelMemInfo;
557 struct PVRSRV_KERNEL_SYNC_INFO *psKernelSyncInfo;
561 struct PVRSRV_BRIDGE_IN_UNMAP_DEVICECLASS_MEMORY {
563 struct PVRSRV_KERNEL_MEM_INFO *psKernelMemInfo;
564 struct PVRSRV_CLIENT_MEM_INFO sClientMemInfo;
565 struct PVRSRV_CLIENT_SYNC_INFO sClientSyncInfo;
568 struct PVRSRV_BRIDGE_IN_PDUMP_MEMPOL {
570 struct PVRSRV_KERNEL_MEM_INFO *psKernelMemInfo;
578 struct PVRSRV_BRIDGE_IN_PDUMP_SYNCPOL {
580 struct PVRSRV_KERNEL_SYNC_INFO *psKernelSyncInfo;
586 struct PVRSRV_BRIDGE_IN_PDUMP_DUMPMEM {
590 struct PVRSRV_KERNEL_MEM_INFO *psKernelMemInfo;
596 struct PVRSRV_BRIDGE_IN_PDUMP_DUMPSYNC {
599 struct PVRSRV_KERNEL_SYNC_INFO *psKernelSyncInfo;
604 struct PVRSRV_BRIDGE_IN_PDUMP_DUMPREG {
606 struct PVRSRV_HWREG sHWReg;
610 struct PVRSRV_BRIDGE_IN_PDUMP_REGPOL {
612 struct PVRSRV_HWREG sHWReg;
617 struct PVRSRV_BRIDGE_IN_PDUMP_DUMPPDREG {
619 struct PVRSRV_HWREG sHWReg;
623 struct PVRSRV_BRIDGE_IN_PDUMP_MEMPAGES {
625 void *hKernelMemInfo;
626 struct IMG_DEV_PHYADDR *pPages;
628 struct IMG_DEV_VIRTADDR sDevAddr;
631 IMG_BOOL bContinuous;
634 struct PVRSRV_BRIDGE_IN_PDUMP_COMMENT {
636 char szComment[PVRSRV_PDUMP_MAX_COMMENT_SIZE];
640 struct PVRSRV_BRIDGE_IN_PDUMP_SETFRAME {
645 struct PVRSRV_BRIDGE_IN_PDUMP_BITMAP {
647 char szFileName[PVRSRV_PDUMP_MAX_FILENAME_SIZE];
651 u32 ui32StrideInBytes;
652 struct IMG_DEV_VIRTADDR sDevBaseAddr;
654 enum PDUMP_PIXEL_FORMAT ePixelFormat;
655 enum PDUMP_MEM_FORMAT eMemFormat;
659 struct PVRSRV_BRIDGE_IN_PDUMP_READREG {
661 char szFileName[PVRSRV_PDUMP_MAX_FILENAME_SIZE];
668 struct PVRSRV_BRIDGE_IN_PDUMP_DRIVERINFO {
670 char szString[PVRSRV_PDUMP_MAX_COMMENT_SIZE];
671 IMG_BOOL bContinuous;
674 struct PVRSRV_BRIDGE_IN_PDUMP_DUMPPDDEVPADDR {
676 void *hKernelMemInfo;
678 struct IMG_DEV_PHYADDR sPDDevPAddr;
681 struct PVRSRV_BRIDGE_IN_PDUMP_CYCLE_COUNT_REG_READ {
687 struct PVRSRV_BRIDGE_OUT_ENUMDEVICE {
688 enum PVRSRV_ERROR eError;
690 struct PVRSRV_DEVICE_IDENTIFIER asDeviceIdentifier[PVRSRV_MAX_DEVICES];
693 struct PVRSRV_BRIDGE_OUT_ACQUIRE_DEVICEINFO {
695 enum PVRSRV_ERROR eError;
699 struct PVRSRV_BRIDGE_OUT_ENUMCLASS {
700 enum PVRSRV_ERROR eError;
702 u32 ui32DevID[PVRSRV_MAX_DEVICES];
705 struct PVRSRV_BRIDGE_IN_OPEN_DISPCLASS_DEVICE {
711 struct PVRSRV_BRIDGE_OUT_OPEN_DISPCLASS_DEVICE {
712 enum PVRSRV_ERROR eError;
716 struct PVRSRV_BRIDGE_IN_WRAP_EXT_MEMORY {
719 void *hDevMemContext;
723 IMG_BOOL bPhysContig;
724 u32 ui32NumPageTableEntries;
725 struct IMG_SYS_PHYADDR __user *psSysPAddr;
728 struct PVRSRV_BRIDGE_OUT_WRAP_EXT_MEMORY {
729 enum PVRSRV_ERROR eError;
730 struct PVRSRV_CLIENT_MEM_INFO sClientMemInfo;
731 struct PVRSRV_CLIENT_SYNC_INFO sClientSyncInfo;
734 struct PVRSRV_BRIDGE_IN_UNWRAP_EXT_MEMORY {
736 void *hKernelMemInfo;
737 struct PVRSRV_CLIENT_MEM_INFO sClientMemInfo;
738 struct PVRSRV_CLIENT_SYNC_INFO sClientSyncInfo;
742 #define PVRSRV_MAX_DC_DISPLAY_FORMATS 10
743 #define PVRSRV_MAX_DC_DISPLAY_DIMENSIONS 10
744 #define PVRSRV_MAX_DC_SWAPCHAIN_BUFFERS 4
745 #define PVRSRV_MAX_DC_CLIP_RECTS 32
747 struct PVRSRV_BRIDGE_OUT_ENUM_DISPCLASS_FORMATS {
748 enum PVRSRV_ERROR eError;
750 struct DISPLAY_FORMAT asFormat[PVRSRV_MAX_DC_DISPLAY_FORMATS];
753 struct PVRSRV_BRIDGE_IN_ENUM_DISPCLASS_DIMS {
756 struct DISPLAY_FORMAT sFormat;
759 struct PVRSRV_BRIDGE_OUT_ENUM_DISPCLASS_DIMS {
760 enum PVRSRV_ERROR eError;
762 struct DISPLAY_DIMS asDim[PVRSRV_MAX_DC_DISPLAY_DIMENSIONS];
765 struct PVRSRV_BRIDGE_OUT_GET_DISPCLASS_INFO {
766 enum PVRSRV_ERROR eError;
767 struct DISPLAY_INFO sDisplayInfo;
770 struct PVRSRV_BRIDGE_OUT_GET_DISPCLASS_SYSBUFFER {
771 enum PVRSRV_ERROR eError;
775 struct PVRSRV_BRIDGE_IN_CREATE_DISPCLASS_SWAPCHAIN {
779 struct DISPLAY_SURF_ATTRIBUTES sDstSurfAttrib;
780 struct DISPLAY_SURF_ATTRIBUTES sSrcSurfAttrib;
786 struct PVRSRV_BRIDGE_OUT_CREATE_DISPCLASS_SWAPCHAIN {
787 enum PVRSRV_ERROR eError;
792 struct PVRSRV_BRIDGE_IN_DESTROY_DISPCLASS_SWAPCHAIN {
798 struct PVRSRV_BRIDGE_IN_SET_DISPCLASS_RECT {
802 struct IMG_RECT sRect;
805 struct PVRSRV_BRIDGE_IN_SET_DISPCLASS_COLOURKEY {
812 struct PVRSRV_BRIDGE_IN_GET_DISPCLASS_BUFFERS {
818 struct PVRSRV_BRIDGE_OUT_GET_DISPCLASS_BUFFERS {
819 enum PVRSRV_ERROR eError;
821 void *ahBuffer[PVRSRV_MAX_DC_SWAPCHAIN_BUFFERS];
824 struct PVRSRV_BRIDGE_IN_SWAP_DISPCLASS_TO_BUFFER {
828 u32 ui32SwapInterval;
830 u32 ui32ClipRectCount;
831 struct IMG_RECT sClipRect[PVRSRV_MAX_DC_CLIP_RECTS];
834 struct PVRSRV_BRIDGE_IN_SWAP_DISPCLASS_TO_SYSTEM {
840 struct PVRSRV_BRIDGE_IN_OPEN_BUFFERCLASS_DEVICE {
846 struct PVRSRV_BRIDGE_OUT_OPEN_BUFFERCLASS_DEVICE {
847 enum PVRSRV_ERROR eError;
851 struct PVRSRV_BRIDGE_OUT_GET_BUFFERCLASS_INFO {
852 enum PVRSRV_ERROR eError;
853 struct BUFFER_INFO sBufferInfo;
856 struct PVRSRV_BRIDGE_IN_GET_BUFFERCLASS_BUFFER {
862 struct PVRSRV_BRIDGE_OUT_GET_BUFFERCLASS_BUFFER {
863 enum PVRSRV_ERROR eError;
867 struct PVRSRV_BRIDGE_OUT_GET_DEVMEM_HEAPINFO {
868 enum PVRSRV_ERROR eError;
869 u32 ui32ClientHeapCount;
870 struct PVRSRV_HEAP_INFO sHeapInfo[PVRSRV_MAX_CLIENT_HEAPS];
873 struct PVRSRV_BRIDGE_OUT_CREATE_DEVMEMCONTEXT {
874 enum PVRSRV_ERROR eError;
875 void *hDevMemContext;
876 u32 ui32ClientHeapCount;
877 struct PVRSRV_HEAP_INFO sHeapInfo[PVRSRV_MAX_CLIENT_HEAPS];
880 struct PVRSRV_BRIDGE_OUT_CREATE_DEVMEMHEAP {
881 enum PVRSRV_ERROR eError;
885 struct PVRSRV_BRIDGE_OUT_ALLOCDEVICEMEM {
886 enum PVRSRV_ERROR eError;
887 struct PVRSRV_KERNEL_MEM_INFO *psKernelMemInfo;
888 struct PVRSRV_KERNEL_SYNC_INFO *psKernelSyncInfo;
889 struct PVRSRV_CLIENT_MEM_INFO sClientMemInfo;
890 struct PVRSRV_CLIENT_SYNC_INFO sClientSyncInfo;
894 struct PVRSRV_BRIDGE_OUT_EXPORTDEVICEMEM {
895 enum PVRSRV_ERROR eError;
900 struct PVRSRV_BRIDGE_OUT_MAPMEMINFOTOUSER {
901 enum PVRSRV_ERROR eError;
906 struct PVRSRV_BRIDGE_OUT_GETFREEDEVICEMEM {
907 enum PVRSRV_ERROR eError;
910 u32 ui32LargestBlock;
914 struct PVRSRV_BRIDGE_OUT_MHANDLE_TO_MMAP_DATA {
915 enum PVRSRV_ERROR eError;
918 u32 ui32RealByteSize;
922 struct PVRSRV_BRIDGE_OUT_RELEASE_MMAP_DATA {
923 enum PVRSRV_ERROR eError;
926 u32 ui32RealByteSize;
929 struct PVRSRV_BRIDGE_IN_GET_MISC_INFO {
931 struct PVRSRV_MISC_INFO sMiscInfo;
934 struct PVRSRV_BRIDGE_OUT_GET_MISC_INFO {
935 enum PVRSRV_ERROR eError;
936 struct PVRSRV_MISC_INFO sMiscInfo;
939 struct PVRSRV_BRIDGE_IN_RELEASE_MISC_INFO {
941 struct PVRSRV_MISC_INFO sMiscInfo;
944 struct PVRSRV_BRIDGE_OUT_RELEASE_MISC_INFO {
945 enum PVRSRV_ERROR eError;
946 struct PVRSRV_MISC_INFO sMiscInfo;
949 struct PVRSRV_BRIDGE_OUT_PDUMP_ISCAPTURING {
950 enum PVRSRV_ERROR eError;
951 IMG_BOOL bIsCapturing;
954 struct PVRSRV_BRIDGE_IN_GET_FB_STATS {
960 struct PVRSRV_BRIDGE_IN_MAPPHYSTOUSERSPACE {
963 struct IMG_SYS_PHYADDR sSysPhysAddr;
967 struct PVRSRV_BRIDGE_OUT_MAPPHYSTOUSERSPACE {
973 struct PVRSRV_BRIDGE_IN_UNMAPPHYSTOUSERSPACE {
980 struct PVRSRV_BRIDGE_OUT_GETPHYSTOUSERSPACEMAP {
985 struct PVRSRV_BRIDGE_IN_REGISTER_SIM_PROCESS {
991 struct PVRSRV_BRIDGE_OUT_REGISTER_SIM_PROCESS {
992 struct IMG_SYS_PHYADDR sRegsPhysBase;
999 struct PVRSRV_BRIDGE_IN_UNREGISTER_SIM_PROCESS {
1000 u32 ui32BridgeFlags;
1006 struct PVRSRV_BRIDGE_IN_PROCESS_SIMISR_EVENT {
1007 u32 ui32BridgeFlags;
1009 u32 ui32StatusAndMask;
1010 enum PVRSRV_ERROR eError;
1013 struct PVRSRV_BRIDGE_IN_INITSRV_DISCONNECT {
1014 u32 ui32BridgeFlags;
1015 IMG_BOOL bInitSuccesful;
1018 struct PVRSRV_BRIDGE_IN_ALLOC_SHARED_SYS_MEM {
1019 u32 ui32BridgeFlags;
1024 struct PVRSRV_BRIDGE_OUT_ALLOC_SHARED_SYS_MEM {
1025 enum PVRSRV_ERROR eError;
1026 struct PVRSRV_KERNEL_MEM_INFO *psKernelMemInfo;
1027 struct PVRSRV_CLIENT_MEM_INFO sClientMemInfo;
1030 struct PVRSRV_BRIDGE_IN_FREE_SHARED_SYS_MEM {
1031 u32 ui32BridgeFlags;
1032 struct PVRSRV_KERNEL_MEM_INFO *psKernelMemInfo;
1033 struct PVRSRV_CLIENT_MEM_INFO sClientMemInfo;
1036 struct PVRSRV_BRIDGE_OUT_FREE_SHARED_SYS_MEM {
1037 enum PVRSRV_ERROR eError;
1040 struct PVRSRV_BRIDGE_IN_MAP_MEMINFO_MEM {
1041 u32 ui32BridgeFlags;
1042 void *hKernelMemInfo;
1045 struct PVRSRV_BRIDGE_OUT_MAP_MEMINFO_MEM {
1046 struct PVRSRV_CLIENT_MEM_INFO sClientMemInfo;
1047 struct PVRSRV_CLIENT_SYNC_INFO sClientSyncInfo;
1048 struct PVRSRV_KERNEL_MEM_INFO *psKernelMemInfo;
1049 struct PVRSRV_KERNEL_SYNC_INFO *psKernelSyncInfo;
1050 enum PVRSRV_ERROR eError;
1053 struct PVRSRV_BRIDGE_IN_UNMAP_MEMINFO_MEM {
1054 u32 ui32BridgeFlags;
1055 struct PVRSRV_CLIENT_MEM_INFO sClientMemInfo;
1058 struct PVRSRV_BRIDGE_OUT_UNMAP_MEMINFO_MEM {
1059 enum PVRSRV_ERROR eError;
1062 struct PVRSRV_BRIDGE_IN_GETMMU_PD_DEVPADDR {
1063 u32 ui32BridgeFlags;
1064 void *hDevMemContext;
1067 struct PVRSRV_BRIDGE_OUT_GETMMU_PD_DEVPADDR {
1068 struct IMG_DEV_PHYADDR sPDDevPAddr;
1069 enum PVRSRV_ERROR eError;
1072 struct PVRSRV_BRIDGE_IN_EVENT_OBJECT_WAIT {
1073 u32 ui32BridgeFlags;
1077 struct PVRSRV_BRIDGE_IN_EVENT_OBJECT_OPEN {
1078 struct PVRSRV_EVENTOBJECT sEventObject;
1081 struct PVRSRV_BRIDGE_OUT_EVENT_OBJECT_OPEN {
1083 enum PVRSRV_ERROR eError;
1086 struct PVRSRV_BRIDGE_IN_EVENT_OBJECT_CLOSE {
1087 struct PVRSRV_EVENTOBJECT sEventObject;
1091 struct PVRSRV_BRIDGE_IN_MODIFY_SYNC_OPS {
1092 u32 ui32BridgeFlags;
1093 void *hKernelSyncInfo;
1094 u32 ui32ModifyFlags;
1098 struct PVRSRV_BRIDGE_OUT_MODIFY_SYNC_OPS {
1099 enum PVRSRV_ERROR eError;
1100 u32 ui32ReadOpsPending;
1101 u32 ui32ReadOpsComplete;
1102 u32 ui32WriteOpsPending;
1103 u32 ui32WriteOpsComplete;