1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
|
/**********************************************************************
*
* Copyright (C) Imagination Technologies Ltd. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful but, except
* as otherwise stated in writing, without any warranty; without even the
* implied warranty of merchantability or fitness for a particular purpose.
* See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
*
* The full GNU General Public License is included in this distribution in
* the file called "COPYING".
*
* Contact Information:
* Imagination Technologies Ltd. <gpl-support@imgtec.com>
* Home Park Estate, Kings Langley, Herts, WD4 8LZ, UK
*
******************************************************************************/
#if !defined(__SGX_BRIDGE_H__)
#define __SGX_BRIDGE_H__
#if defined (SUPPORT_SID_INTERFACE)
#include "sgxapi.h"
#else
#include "sgxapi_km.h"
#endif
#include "sgxinfo.h"
#include "pvr_bridge.h"
#if defined (__cplusplus)
extern "C" {
#endif
#define PVRSRV_BRIDGE_SGX_CMD_BASE (PVRSRV_BRIDGE_LAST_NON_DEVICE_CMD+1)
#define PVRSRV_BRIDGE_SGX_GETCLIENTINFO PVRSRV_IOWR(PVRSRV_BRIDGE_SGX_CMD_BASE+0)
#define PVRSRV_BRIDGE_SGX_RELEASECLIENTINFO PVRSRV_IOWR(PVRSRV_BRIDGE_SGX_CMD_BASE+1)
#define PVRSRV_BRIDGE_SGX_GETINTERNALDEVINFO PVRSRV_IOWR(PVRSRV_BRIDGE_SGX_CMD_BASE+2)
#define PVRSRV_BRIDGE_SGX_DOKICK PVRSRV_IOWR(PVRSRV_BRIDGE_SGX_CMD_BASE+3)
#define PVRSRV_BRIDGE_SGX_GETPHYSPAGEADDR PVRSRV_IOWR(PVRSRV_BRIDGE_SGX_CMD_BASE+4)
#define PVRSRV_BRIDGE_SGX_READREGISTRYDWORD PVRSRV_IOWR(PVRSRV_BRIDGE_SGX_CMD_BASE+5)
#define PVRSRV_BRIDGE_SGX_2DQUERYBLTSCOMPLETE PVRSRV_IOWR(PVRSRV_BRIDGE_SGX_CMD_BASE+9)
#define PVRSRV_BRIDGE_SGX_GETMMUPDADDR PVRSRV_IOWR(PVRSRV_BRIDGE_SGX_CMD_BASE+10)
#if defined(TRANSFER_QUEUE)
#define PVRSRV_BRIDGE_SGX_SUBMITTRANSFER PVRSRV_IOWR(PVRSRV_BRIDGE_SGX_CMD_BASE+13)
#endif
#define PVRSRV_BRIDGE_SGX_GETMISCINFO PVRSRV_IOWR(PVRSRV_BRIDGE_SGX_CMD_BASE+14)
#define PVRSRV_BRIDGE_SGXINFO_FOR_SRVINIT PVRSRV_IOWR(PVRSRV_BRIDGE_SGX_CMD_BASE+15)
#define PVRSRV_BRIDGE_SGX_DEVINITPART2 PVRSRV_IOWR(PVRSRV_BRIDGE_SGX_CMD_BASE+16)
#define PVRSRV_BRIDGE_SGX_FINDSHAREDPBDESC PVRSRV_IOWR(PVRSRV_BRIDGE_SGX_CMD_BASE+17)
#define PVRSRV_BRIDGE_SGX_UNREFSHAREDPBDESC PVRSRV_IOWR(PVRSRV_BRIDGE_SGX_CMD_BASE+18)
#define PVRSRV_BRIDGE_SGX_ADDSHAREDPBDESC PVRSRV_IOWR(PVRSRV_BRIDGE_SGX_CMD_BASE+19)
#define PVRSRV_BRIDGE_SGX_REGISTER_HW_RENDER_CONTEXT PVRSRV_IOWR(PVRSRV_BRIDGE_SGX_CMD_BASE+20)
#define PVRSRV_BRIDGE_SGX_FLUSH_HW_RENDER_TARGET PVRSRV_IOWR(PVRSRV_BRIDGE_SGX_CMD_BASE+21)
#define PVRSRV_BRIDGE_SGX_UNREGISTER_HW_RENDER_CONTEXT PVRSRV_IOWR(PVRSRV_BRIDGE_SGX_CMD_BASE+22)
#if defined(SGX_FEATURE_2D_HARDWARE)
#define PVRSRV_BRIDGE_SGX_SUBMIT2D PVRSRV_IOWR(PVRSRV_BRIDGE_SGX_CMD_BASE+23)
#define PVRSRV_BRIDGE_SGX_REGISTER_HW_2D_CONTEXT PVRSRV_IOWR(PVRSRV_BRIDGE_SGX_CMD_BASE+24)
#define PVRSRV_BRIDGE_SGX_UNREGISTER_HW_2D_CONTEXT PVRSRV_IOWR(PVRSRV_BRIDGE_SGX_CMD_BASE+25)
#endif
#define PVRSRV_BRIDGE_SGX_REGISTER_HW_TRANSFER_CONTEXT PVRSRV_IOWR(PVRSRV_BRIDGE_SGX_CMD_BASE+26)
#define PVRSRV_BRIDGE_SGX_UNREGISTER_HW_TRANSFER_CONTEXT PVRSRV_IOWR(PVRSRV_BRIDGE_SGX_CMD_BASE+27)
#define PVRSRV_BRIDGE_SGX_SCHEDULE_PROCESS_QUEUES PVRSRV_IOWR(PVRSRV_BRIDGE_SGX_CMD_BASE+28)
#define PVRSRV_BRIDGE_SGX_READ_HWPERF_CB PVRSRV_IOWR(PVRSRV_BRIDGE_SGX_CMD_BASE+30)
#if defined(PDUMP)
#define PVRSRV_BRIDGE_SGX_PDUMP_BUFFER_ARRAY PVRSRV_IOWR(PVRSRV_BRIDGE_SGX_CMD_BASE+31)
#define PVRSRV_BRIDGE_SGX_PDUMP_3D_SIGNATURE_REGISTERS PVRSRV_IOWR(PVRSRV_BRIDGE_SGX_CMD_BASE+32)
#define PVRSRV_BRIDGE_SGX_PDUMP_COUNTER_REGISTERS PVRSRV_IOWR(PVRSRV_BRIDGE_SGX_CMD_BASE+33)
#define PVRSRV_BRIDGE_SGX_PDUMP_TA_SIGNATURE_REGISTERS PVRSRV_IOWR(PVRSRV_BRIDGE_SGX_CMD_BASE+34)
#define PVRSRV_BRIDGE_SGX_PDUMP_HWPERFCB PVRSRV_IOWR(PVRSRV_BRIDGE_SGX_CMD_BASE+35)
#define PVRSRV_BRIDGE_SGX_PDUMP_SAVEMEM PVRSRV_IOWR(PVRSRV_BRIDGE_SGX_CMD_BASE+36)
#endif
#define PVRSRV_BRIDGE_LAST_SGX_CMD (PVRSRV_BRIDGE_SGX_CMD_BASE+36)
typedef struct PVRSRV_BRIDGE_IN_GETPHYSPAGEADDR
{
IMG_UINT32 ui32BridgeFlags;
IMG_HANDLE hDevMemHeap;
IMG_DEV_VIRTADDR sDevVAddr;
}PVRSRV_BRIDGE_IN_GETPHYSPAGEADDR;
typedef struct PVRSRV_BRIDGE_OUT_GETPHYSPAGEADDR
{
PVRSRV_ERROR eError;
IMG_DEV_PHYADDR DevPAddr;
IMG_CPU_PHYADDR CpuPAddr;
}PVRSRV_BRIDGE_OUT_GETPHYSPAGEADDR;
typedef struct PVRSRV_BRIDGE_IN_SGX_GETMMU_PDADDR_TAG
{
IMG_UINT32 ui32BridgeFlags;
#if defined (SUPPORT_SID_INTERFACE)
IMG_SID hDevCookie;
IMG_SID hDevMemContext;
#else
IMG_HANDLE hDevCookie;
IMG_HANDLE hDevMemContext;
#endif
}PVRSRV_BRIDGE_IN_SGX_GETMMU_PDADDR;
typedef struct PVRSRV_BRIDGE_OUT_SGX_GETMMU_PDADDR_TAG
{
IMG_DEV_PHYADDR sPDDevPAddr;
PVRSRV_ERROR eError;
}PVRSRV_BRIDGE_OUT_SGX_GETMMU_PDADDR;
typedef struct PVRSRV_BRIDGE_IN_GETCLIENTINFO_TAG
{
IMG_UINT32 ui32BridgeFlags;
#if defined (SUPPORT_SID_INTERFACE)
IMG_SID hDevCookie;
#else
IMG_HANDLE hDevCookie;
#endif
}PVRSRV_BRIDGE_IN_GETCLIENTINFO;
typedef struct PVRSRV_BRIDGE_OUT_GETINTERNALDEVINFO_TAG
{
SGX_INTERNAL_DEVINFO sSGXInternalDevInfo;
PVRSRV_ERROR eError;
}PVRSRV_BRIDGE_OUT_GETINTERNALDEVINFO;
typedef struct PVRSRV_BRIDGE_IN_GETINTERNALDEVINFO_TAG
{
IMG_UINT32 ui32BridgeFlags;
#if defined (SUPPORT_SID_INTERFACE)
IMG_SID hDevCookie;
#else
IMG_HANDLE hDevCookie;
#endif
}PVRSRV_BRIDGE_IN_GETINTERNALDEVINFO;
typedef struct PVRSRV_BRIDGE_OUT_GETCLIENTINFO_TAG
{
SGX_CLIENT_INFO sClientInfo;
PVRSRV_ERROR eError;
}PVRSRV_BRIDGE_OUT_GETCLIENTINFO;
typedef struct PVRSRV_BRIDGE_IN_RELEASECLIENTINFO_TAG
{
IMG_UINT32 ui32BridgeFlags;
#if defined (SUPPORT_SID_INTERFACE)
IMG_SID hDevCookie;
#else
IMG_HANDLE hDevCookie;
#endif
SGX_CLIENT_INFO sClientInfo;
}PVRSRV_BRIDGE_IN_RELEASECLIENTINFO;
typedef struct PVRSRV_BRIDGE_IN_ISPBREAKPOLL_TAG
{
IMG_UINT32 ui32BridgeFlags;
#if defined (SUPPORT_SID_INTERFACE)
IMG_SID hDevCookie;
#else
IMG_HANDLE hDevCookie;
#endif
}PVRSRV_BRIDGE_IN_ISPBREAKPOLL;
typedef struct PVRSRV_BRIDGE_IN_DOKICK_TAG
{
IMG_UINT32 ui32BridgeFlags;
#if defined (SUPPORT_SID_INTERFACE)
IMG_SID hDevCookie;
#else
IMG_HANDLE hDevCookie;
#endif
SGX_CCB_KICK sCCBKick;
}PVRSRV_BRIDGE_IN_DOKICK;
typedef struct PVRSRV_BRIDGE_IN_SGX_SCHEDULE_PROCESS_QUEUES_TAG
{
IMG_UINT32 ui32BridgeFlags;
#if defined (SUPPORT_SID_INTERFACE)
IMG_SID hDevCookie;
#else
IMG_HANDLE hDevCookie;
#endif
}PVRSRV_BRIDGE_IN_SGX_SCHEDULE_PROCESS_QUEUES;
#if defined(TRANSFER_QUEUE)
typedef struct PVRSRV_BRIDGE_IN_SUBMITTRANSFER_TAG
{
IMG_UINT32 ui32BridgeFlags;
#if defined (SUPPORT_SID_INTERFACE)
IMG_SID hDevCookie;
#else
IMG_HANDLE hDevCookie;
#endif
PVRSRV_TRANSFER_SGX_KICK sKick;
}PVRSRV_BRIDGE_IN_SUBMITTRANSFER;
#if defined(SGX_FEATURE_2D_HARDWARE)
typedef struct PVRSRV_BRIDGE_IN_SUBMIT2D_TAG
{
IMG_UINT32 ui32BridgeFlags;
#if defined (SUPPORT_SID_INTERFACE)
IMG_SID hDevCookie;
#else
IMG_HANDLE hDevCookie;
#endif
PVRSRV_2D_SGX_KICK sKick;
} PVRSRV_BRIDGE_IN_SUBMIT2D;
#endif
#endif
typedef struct PVRSRV_BRIDGE_IN_READREGDWORD_TAG
{
IMG_UINT32 ui32BridgeFlags;
#if defined (SUPPORT_SID_INTERFACE)
IMG_SID hDevCookie;
#else
IMG_HANDLE hDevCookie;
#endif
IMG_PCHAR pszKey;
IMG_PCHAR pszValue;
}PVRSRV_BRIDGE_IN_READREGDWORD;
typedef struct PVRSRV_BRIDGE_OUT_READREGDWORD_TAG
{
PVRSRV_ERROR eError;
IMG_UINT32 ui32Data;
}PVRSRV_BRIDGE_OUT_READREGDWORD;
typedef struct PVRSRV_BRIDGE_IN_SGXGETMISCINFO_TAG
{
IMG_UINT32 ui32BridgeFlags;
#if defined (SUPPORT_SID_INTERFACE)
IMG_SID hDevCookie;
#else
IMG_HANDLE hDevCookie;
#endif
SGX_MISC_INFO *psMiscInfo;
}PVRSRV_BRIDGE_IN_SGXGETMISCINFO;
typedef struct PVRSRV_BRIDGE_IN_SGXINFO_FOR_SRVINIT_TAG
{
IMG_UINT32 ui32BridgeFlags;
#if defined (SUPPORT_SID_INTERFACE)
IMG_SID hDevCookie;
#else
IMG_HANDLE hDevCookie;
#endif
}PVRSRV_BRIDGE_IN_SGXINFO_FOR_SRVINIT;
typedef struct PVRSRV_BRIDGE_OUT_SGXINFO_FOR_SRVINIT_TAG
{
PVRSRV_ERROR eError;
SGX_BRIDGE_INFO_FOR_SRVINIT sInitInfo;
}PVRSRV_BRIDGE_OUT_SGXINFO_FOR_SRVINIT;
typedef struct PVRSRV_BRIDGE_IN_SGXDEVINITPART2_TAG
{
IMG_UINT32 ui32BridgeFlags;
#if defined (SUPPORT_SID_INTERFACE)
IMG_SID hDevCookie;
#else
IMG_HANDLE hDevCookie;
#endif
SGX_BRIDGE_INIT_INFO sInitInfo;
}PVRSRV_BRIDGE_IN_SGXDEVINITPART2;
typedef struct PVRSRV_BRIDGE_OUT_SGXDEVINITPART2_TAG
{
PVRSRV_ERROR eError;
IMG_UINT32 ui32KMBuildOptions;
}PVRSRV_BRIDGE_OUT_SGXDEVINITPART2;
typedef struct PVRSRV_BRIDGE_IN_2DQUERYBLTSCOMPLETE_TAG
{
IMG_UINT32 ui32BridgeFlags;
#if defined (SUPPORT_SID_INTERFACE)
IMG_SID hDevCookie;
IMG_SID hKernSyncInfo;
#else
IMG_HANDLE hDevCookie;
IMG_HANDLE hKernSyncInfo;
#endif
IMG_BOOL bWaitForComplete;
}PVRSRV_BRIDGE_IN_2DQUERYBLTSCOMPLETE;
#define PVRSRV_BRIDGE_SGX_SHAREDPBDESC_MAX_SUBMEMINFOS 10
typedef struct PVRSRV_BRIDGE_IN_SGXFINDSHAREDPBDESC_TAG
{
IMG_UINT32 ui32BridgeFlags;
#if defined (SUPPORT_SID_INTERFACE)
IMG_SID hDevCookie;
#else
IMG_HANDLE hDevCookie;
#endif
IMG_BOOL bLockOnFailure;
IMG_UINT32 ui32TotalPBSize;
}PVRSRV_BRIDGE_IN_SGXFINDSHAREDPBDESC;
typedef struct PVRSRV_BRIDGE_OUT_SGXFINDSHAREDPBDESC_TAG
{
#if defined (SUPPORT_SID_INTERFACE)
IMG_SID hKernelMemInfo;
IMG_SID hSharedPBDesc;
IMG_SID hSharedPBDescKernelMemInfoHandle;
IMG_SID hHWPBDescKernelMemInfoHandle;
IMG_SID hBlockKernelMemInfoHandle;
IMG_SID hHWBlockKernelMemInfoHandle;
IMG_SID ahSharedPBDescSubKernelMemInfoHandles[PVRSRV_BRIDGE_SGX_SHAREDPBDESC_MAX_SUBMEMINFOS];
#else
IMG_HANDLE hKernelMemInfo;
IMG_HANDLE hSharedPBDesc;
IMG_HANDLE hSharedPBDescKernelMemInfoHandle;
IMG_HANDLE hHWPBDescKernelMemInfoHandle;
IMG_HANDLE hBlockKernelMemInfoHandle;
IMG_HANDLE hHWBlockKernelMemInfoHandle;
IMG_HANDLE ahSharedPBDescSubKernelMemInfoHandles[PVRSRV_BRIDGE_SGX_SHAREDPBDESC_MAX_SUBMEMINFOS];
#endif
IMG_UINT32 ui32SharedPBDescSubKernelMemInfoHandlesCount;
PVRSRV_ERROR eError;
}PVRSRV_BRIDGE_OUT_SGXFINDSHAREDPBDESC;
typedef struct PVRSRV_BRIDGE_IN_SGXUNREFSHAREDPBDESC_TAG
{
IMG_UINT32 ui32BridgeFlags;
#if defined (SUPPORT_SID_INTERFACE)
IMG_SID hSharedPBDesc;
#else
IMG_HANDLE hSharedPBDesc;
#endif
}PVRSRV_BRIDGE_IN_SGXUNREFSHAREDPBDESC;
typedef struct PVRSRV_BRIDGE_OUT_SGXUNREFSHAREDPBDESC_TAG
{
PVRSRV_ERROR eError;
}PVRSRV_BRIDGE_OUT_SGXUNREFSHAREDPBDESC;
typedef struct PVRSRV_BRIDGE_IN_SGXADDSHAREDPBDESC_TAG
{
IMG_UINT32 ui32BridgeFlags;
IMG_UINT32 ui32TotalPBSize;
#if defined (SUPPORT_SID_INTERFACE)
IMG_SID hDevCookie;
IMG_SID hSharedPBDescKernelMemInfo;
IMG_SID hHWPBDescKernelMemInfo;
IMG_SID hBlockKernelMemInfo;
IMG_SID hHWBlockKernelMemInfo;
IMG_SID *phKernelMemInfoHandles;
#else
IMG_HANDLE hDevCookie;
IMG_HANDLE hSharedPBDescKernelMemInfo;
IMG_HANDLE hHWPBDescKernelMemInfo;
IMG_HANDLE hBlockKernelMemInfo;
IMG_HANDLE hHWBlockKernelMemInfo;
IMG_HANDLE *phKernelMemInfoHandles;
#endif
IMG_UINT32 ui32KernelMemInfoHandlesCount;
IMG_DEV_VIRTADDR sHWPBDescDevVAddr;
}PVRSRV_BRIDGE_IN_SGXADDSHAREDPBDESC;
typedef struct PVRSRV_BRIDGE_OUT_SGXADDSHAREDPBDESC_TAG
{
PVRSRV_ERROR eError;
#if defined (SUPPORT_SID_INTERFACE)
IMG_SID hSharedPBDesc;
#else
IMG_HANDLE hSharedPBDesc;
#endif
}PVRSRV_BRIDGE_OUT_SGXADDSHAREDPBDESC;
#ifdef PDUMP
typedef struct PVRSRV_BRIDGE_IN_PDUMP_BUFFER_ARRAY_TAG
{
IMG_UINT32 ui32BridgeFlags;
SGX_KICKTA_DUMP_BUFFER *psBufferArray;
IMG_UINT32 ui32BufferArrayLength;
IMG_BOOL bDumpPolls;
} PVRSRV_BRIDGE_IN_PDUMP_BUFFER_ARRAY;
typedef struct PVRSRV_BRIDGE_IN_PDUMP_3D_SIGNATURE_REGISTERS_TAG
{
IMG_UINT32 ui32BridgeFlags;
#if defined (SUPPORT_SID_INTERFACE)
IMG_SID hDevCookie;
IMG_SID hDevMemContext;
#else
IMG_HANDLE hDevCookie;
IMG_HANDLE hDevMemContext;
#endif
IMG_UINT32 ui32DumpFrameNum;
IMG_BOOL bLastFrame;
IMG_UINT32 *pui32Registers;
IMG_UINT32 ui32NumRegisters;
}PVRSRV_BRIDGE_IN_PDUMP_3D_SIGNATURE_REGISTERS;
typedef struct PVRSRV_BRIDGE_IN_PDUMPCOUNTER_REGISTERS_TAG
{
IMG_UINT32 ui32BridgeFlags;
#if defined (SUPPORT_SID_INTERFACE)
IMG_SID hDevCookie;
#else
IMG_HANDLE hDevCookie;
#endif
IMG_UINT32 ui32DumpFrameNum;
IMG_BOOL bLastFrame;
IMG_UINT32 *pui32Registers;
IMG_UINT32 ui32NumRegisters;
}PVRSRV_BRIDGE_IN_PDUMP_COUNTER_REGISTERS;
typedef struct PVRSRV_BRIDGE_IN_PDUMP_TA_SIGNATURE_REGISTERS_TAG
{
IMG_UINT32 ui32BridgeFlags;
#if defined (SUPPORT_SID_INTERFACE)
IMG_SID hDevCookie;
#else
IMG_HANDLE hDevCookie;
#endif
IMG_UINT32 ui32DumpFrameNum;
IMG_UINT32 ui32TAKickCount;
IMG_BOOL bLastFrame;
IMG_UINT32 *pui32Registers;
IMG_UINT32 ui32NumRegisters;
}PVRSRV_BRIDGE_IN_PDUMP_TA_SIGNATURE_REGISTERS;
typedef struct PVRSRV_BRIDGE_IN_PDUMP_HWPERFCB_TAG
{
IMG_UINT32 ui32BridgeFlags;
#if defined (SUPPORT_SID_INTERFACE)
IMG_SID hDevCookie;
IMG_SID hDevMemContext;
#else
IMG_HANDLE hDevCookie;
IMG_HANDLE hDevMemContext;
#endif
IMG_CHAR szFileName[PVRSRV_PDUMP_MAX_FILENAME_SIZE];
IMG_UINT32 ui32FileOffset;
IMG_UINT32 ui32PDumpFlags;
}PVRSRV_BRIDGE_IN_PDUMP_HWPERFCB;
typedef struct PVRSRV_BRIDGE_IN_PDUMP_SAVEMEM
{
IMG_UINT32 ui32BridgeFlags;
#if defined (SUPPORT_SID_INTERFACE)
IMG_SID hDevCookie;
IMG_SID hDevMemContext;
#else
IMG_HANDLE hDevCookie;
#endif
IMG_CHAR szFileName[PVRSRV_PDUMP_MAX_FILENAME_SIZE];
IMG_UINT32 ui32FileOffset;
IMG_DEV_VIRTADDR sDevVAddr;
IMG_UINT32 ui32Size;
#if !defined (SUPPORT_SID_INTERFACE)
IMG_HANDLE hDevMemContext;
#endif
IMG_UINT32 ui32PDumpFlags;
}PVRSRV_BRIDGE_IN_PDUMP_SAVEMEM;
#endif
typedef struct PVRSRV_BRIDGE_IN_SGX_REGISTER_HW_RENDER_CONTEXT_TAG
{
IMG_UINT32 ui32BridgeFlags;
#if defined (SUPPORT_SID_INTERFACE)
IMG_SID hDevCookie;
#else
IMG_HANDLE hDevCookie;
#endif
IMG_DEV_VIRTADDR sHWRenderContextDevVAddr;
}PVRSRV_BRIDGE_IN_SGX_REGISTER_HW_RENDER_CONTEXT;
typedef struct PVRSRV_BRIDGE_OUT_SGX_REGISTER_HW_RENDER_CONTEXT_TAG
{
PVRSRV_ERROR eError;
#if defined (SUPPORT_SID_INTERFACE)
IMG_SID hHWRenderContext;
#else
IMG_HANDLE hHWRenderContext;
#endif
}PVRSRV_BRIDGE_OUT_SGX_REGISTER_HW_RENDER_CONTEXT;
typedef struct PVRSRV_BRIDGE_IN_SGX_UNREGISTER_HW_RENDER_CONTEXT_TAG
{
IMG_UINT32 ui32BridgeFlags;
IMG_BOOL bForceCleanup;
#if defined (SUPPORT_SID_INTERFACE)
IMG_SID hDevCookie;
IMG_SID hHWRenderContext;
#else
IMG_HANDLE hDevCookie;
IMG_HANDLE hHWRenderContext;
#endif
}PVRSRV_BRIDGE_IN_SGX_UNREGISTER_HW_RENDER_CONTEXT;
typedef struct PVRSRV_BRIDGE_IN_SGX_REGISTER_HW_TRANSFER_CONTEXT_TAG
{
IMG_UINT32 ui32BridgeFlags;
#if defined (SUPPORT_SID_INTERFACE)
IMG_SID hDevCookie;
#else
IMG_HANDLE hDevCookie;
#endif
IMG_DEV_VIRTADDR sHWTransferContextDevVAddr;
}PVRSRV_BRIDGE_IN_SGX_REGISTER_HW_TRANSFER_CONTEXT;
typedef struct PVRSRV_BRIDGE_OUT_SGX_REGISTER_HW_TRANSFER_CONTEXT_TAG
{
PVRSRV_ERROR eError;
#if defined (SUPPORT_SID_INTERFACE)
IMG_SID hHWTransferContext;
#else
IMG_HANDLE hHWTransferContext;
#endif
}PVRSRV_BRIDGE_OUT_SGX_REGISTER_HW_TRANSFER_CONTEXT;
typedef struct PVRSRV_BRIDGE_IN_SGX_UNREGISTER_HW_TRANSFER_CONTEXT_TAG
{
IMG_UINT32 ui32BridgeFlags;
IMG_BOOL bForceCleanup;
#if defined (SUPPORT_SID_INTERFACE)
IMG_SID hDevCookie;
IMG_SID hHWTransferContext;
#else
IMG_HANDLE hDevCookie;
IMG_HANDLE hHWTransferContext;
#endif
}PVRSRV_BRIDGE_IN_SGX_UNREGISTER_HW_TRANSFER_CONTEXT;
typedef struct PVRSRV_BRIDGE_IN_SGX_FLUSH_HW_RENDER_TARGET_TAG
{
IMG_UINT32 ui32BridgeFlags;
#if defined (SUPPORT_SID_INTERFACE)
IMG_SID hDevCookie;
#else
IMG_HANDLE hDevCookie;
#endif
IMG_DEV_VIRTADDR sHWRTDataSetDevVAddr;
}PVRSRV_BRIDGE_IN_SGX_FLUSH_HW_RENDER_TARGET;
#if defined(SGX_FEATURE_2D_HARDWARE)
typedef struct PVRSRV_BRIDGE_IN_SGX_REGISTER_HW_2D_CONTEXT_TAG
{
IMG_UINT32 ui32BridgeFlags;
#if defined (SUPPORT_SID_INTERFACE)
IMG_SID hDevCookie;
#else
IMG_HANDLE hDevCookie;
#endif
IMG_DEV_VIRTADDR sHW2DContextDevVAddr;
}PVRSRV_BRIDGE_IN_SGX_REGISTER_HW_2D_CONTEXT;
typedef struct PVRSRV_BRIDGE_OUT_SGX_REGISTER_HW_2D_CONTEXT_TAG
{
PVRSRV_ERROR eError;
#if defined (SUPPORT_SID_INTERFACE)
IMG_SID hHW2DContext;
#else
IMG_HANDLE hHW2DContext;
#endif
}PVRSRV_BRIDGE_OUT_SGX_REGISTER_HW_2D_CONTEXT;
typedef struct PVRSRV_BRIDGE_IN_SGX_UNREGISTER_HW_2D_CONTEXT_TAG
{
IMG_UINT32 ui32BridgeFlags;
IMG_BOOL bForceCleanup;
#if defined (SUPPORT_SID_INTERFACE)
IMG_SID hDevCookie;
IMG_SID hHW2DContext;
#else
IMG_HANDLE hDevCookie;
IMG_HANDLE hHW2DContext;
#endif
}PVRSRV_BRIDGE_IN_SGX_UNREGISTER_HW_2D_CONTEXT;
#define SGX2D_MAX_BLT_CMD_SIZ 256
#endif
typedef struct PVRSRV_BRIDGE_IN_SGX_READ_HWPERF_CB_TAG
{
IMG_UINT32 ui32BridgeFlags;
#if defined (SUPPORT_SID_INTERFACE)
IMG_SID hDevCookie;
#else
IMG_HANDLE hDevCookie;
#endif
IMG_UINT32 ui32ArraySize;
PVRSRV_SGX_HWPERF_CB_ENTRY *psHWPerfCBData;
} PVRSRV_BRIDGE_IN_SGX_READ_HWPERF_CB;
typedef struct PVRSRV_BRIDGE_OUT_SGX_READ_HWPERF_CB_TAG
{
PVRSRV_ERROR eError;
IMG_UINT32 ui32DataCount;
IMG_UINT32 ui32ClockSpeed;
IMG_UINT32 ui32HostTimeStamp;
} PVRSRV_BRIDGE_OUT_SGX_READ_HWPERF_CB;
#if defined (__cplusplus)
}
#endif
#endif
|