fixes for bc_cat
[sgx.git] / pvr / bridged_sgx_bridge.h
1 /**********************************************************************
2  *
3  * Copyright(c) 2008 Imagination Technologies Ltd. All rights reserved.
4  *
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.
8  *
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.
13  *
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.
17  *
18  * The full GNU General Public License is included in this distribution in
19  * the file called "COPYING".
20  *
21  * Contact Information:
22  * Imagination Technologies Ltd. <gpl-support@imgtec.com>
23  * Home Park Estate, Kings Langley, Herts, WD4 8LZ, UK
24  *
25  ******************************************************************************/
26
27 #ifndef __BRIDGED_SGX_BRIDGE_H__
28 #define __BRIDGED_SGX_BRIDGE_H__
29
30 int SGXGetClientInfoBW(u32 ui32BridgeID,
31        struct PVRSRV_BRIDGE_IN_GETCLIENTINFO *psGetClientInfoIN,
32        struct PVRSRV_BRIDGE_OUT_GETCLIENTINFO *psGetClientInfoOUT,
33        struct PVRSRV_PER_PROCESS_DATA *psPerProc);
34
35 int SGXReleaseClientInfoBW(u32 ui32BridgeID,
36        struct PVRSRV_BRIDGE_IN_RELEASECLIENTINFO *psReleaseClientInfoIN,
37        struct PVRSRV_BRIDGE_RETURN *psRetOUT,
38        struct PVRSRV_PER_PROCESS_DATA *psPerProc);
39
40 int SGXGetInternalDevInfoBW(u32 ui32BridgeID,
41        struct PVRSRV_BRIDGE_IN_GETINTERNALDEVINFO *psSGXGetInternalDevInfoIN,
42        struct PVRSRV_BRIDGE_OUT_GETINTERNALDEVINFO *psSGXGetInternalDevInfoOUT,
43        struct PVRSRV_PER_PROCESS_DATA *psPerProc);
44
45 int SGXDoKickBW(u32 ui32BridgeID,
46         struct PVRSRV_BRIDGE_IN_DOKICK *psDoKickIN,
47         struct PVRSRV_BRIDGE_RETURN *psRetOUT, size_t in_size,
48         struct PVRSRV_PER_PROCESS_DATA *psPerProc);
49
50 int SGXScheduleProcessQueuesBW(u32 ui32BridgeID,
51        struct PVRSRV_BRIDGE_IN_SGX_SCHEDULE_PROCESS_QUEUES *psScheduleProcQIN,
52        struct PVRSRV_BRIDGE_RETURN *psRetOUT,
53        struct PVRSRV_PER_PROCESS_DATA *psPerProc);
54
55 int SGXSubmitTransferBW(u32 ui32BridgeID,
56        struct PVRSRV_BRIDGE_IN_SUBMITTRANSFER *psSubmitTransferIN,
57        struct PVRSRV_BRIDGE_RETURN *psRetOUT,
58        struct PVRSRV_PER_PROCESS_DATA *psPerProc);
59
60 int SGXGetMiscInfoBW(u32 ui32BridgeID,
61        struct PVRSRV_BRIDGE_IN_SGXGETMISCINFO *psSGXGetMiscInfoIN,
62        struct PVRSRV_BRIDGE_RETURN *psRetOUT,
63        struct PVRSRV_PER_PROCESS_DATA *psPerProc);
64
65 int SGXReadDiffCountersBW(u32 ui32BridgeID,
66        struct PVRSRV_BRIDGE_IN_SGX_READ_DIFF_COUNTERS *psSGXReadDiffCountersIN,
67        struct PVRSRV_BRIDGE_OUT_SGX_READ_DIFF_COUNTERS
68        *psSGXReadDiffCountersOUT,
69        struct PVRSRV_PER_PROCESS_DATA *psPerProc);
70
71 int SGXReadHWPerfCBBW(u32 ui32BridgeID,
72        struct PVRSRV_BRIDGE_IN_SGX_READ_HWPERF_CB *psSGXReadHWPerfCBIN,
73        struct PVRSRV_BRIDGE_OUT_SGX_READ_HWPERF_CB *psSGXReadHWPerfCBOUT,
74        struct PVRSRV_PER_PROCESS_DATA *psPerProc);
75
76 int SGXDevInitPart2BW(u32 ui32BridgeID,
77         struct PVRSRV_BRIDGE_IN_SGXDEVINITPART2 *psSGXDevInitPart2IN,
78         struct PVRSRV_BRIDGE_RETURN *psRetOUT,
79         struct PVRSRV_PER_PROCESS_DATA *psPerProc);
80
81 int SGXRegisterHWRenderContextBW(u32 ui32BridgeID,
82        struct PVRSRV_BRIDGE_IN_SGX_REGISTER_HW_RENDER_CONTEXT
83        *psSGXRegHWRenderContextIN,
84        struct PVRSRV_BRIDGE_OUT_SGX_REGISTER_HW_RENDER_CONTEXT
85        *psSGXRegHWRenderContextOUT,
86        struct PVRSRV_PER_PROCESS_DATA *psPerProc);
87
88 int SGXUnregisterHWRenderContextBW(u32 ui32BridgeID,
89        struct PVRSRV_BRIDGE_IN_SGX_UNREGISTER_HW_RENDER_CONTEXT
90        *psSGXUnregHWRenderContextIN,
91        struct PVRSRV_BRIDGE_RETURN *psRetOUT,
92        struct PVRSRV_PER_PROCESS_DATA *psPerProc);
93
94 int SGXRegisterHWTransferContextBW(u32 ui32BridgeID,
95        struct PVRSRV_BRIDGE_IN_SGX_REGISTER_HW_TRANSFER_CONTEXT
96        *psSGXRegHWTransferContextIN,
97        struct PVRSRV_BRIDGE_OUT_SGX_REGISTER_HW_TRANSFER_CONTEXT
98        *psSGXRegHWTransferContextOUT,
99        struct PVRSRV_PER_PROCESS_DATA *psPerProc);
100
101 int SGXUnregisterHWTransferContextBW(u32 ui32BridgeID,
102        struct PVRSRV_BRIDGE_IN_SGX_UNREGISTER_HW_TRANSFER_CONTEXT
103        *psSGXUnregHWTransferContextIN,
104        struct PVRSRV_BRIDGE_RETURN *psRetOUT,
105        struct PVRSRV_PER_PROCESS_DATA *psPerProc);
106
107 int SGXFlushHWRenderTargetBW(u32 ui32BridgeID,
108        struct PVRSRV_BRIDGE_IN_SGX_FLUSH_HW_RENDER_TARGET
109        *psSGXFlushHWRenderTargetIN,
110        struct PVRSRV_BRIDGE_RETURN *psRetOUT,
111        struct PVRSRV_PER_PROCESS_DATA *psPerProc);
112
113 int SGX2DQueryBlitsCompleteBW(struct file *filp, u32 ui32BridgeID,
114        struct PVRSRV_BRIDGE_IN_2DQUERYBLTSCOMPLETE *ps2DQueryBltsCompleteIN,
115        struct PVRSRV_BRIDGE_RETURN *psRetOUT,
116        struct PVRSRV_PER_PROCESS_DATA *psPerProc);
117
118 int SGXFindSharedPBDescBW(u32 ui32BridgeID,
119        struct PVRSRV_BRIDGE_IN_SGXFINDSHAREDPBDESC *psSGXFindSharedPBDescIN,
120        struct PVRSRV_BRIDGE_OUT_SGXFINDSHAREDPBDESC *psSGXFindSharedPBDescOUT,
121        struct PVRSRV_PER_PROCESS_DATA *psPerProc);
122
123 int SGXUnrefSharedPBDescBW(u32 ui32BridgeID,
124        struct PVRSRV_BRIDGE_IN_SGXUNREFSHAREDPBDESC *psSGXUnrefSharedPBDescIN,
125        struct PVRSRV_BRIDGE_OUT_SGXUNREFSHAREDPBDESC
126        *psSGXUnrefSharedPBDescOUT,
127        struct PVRSRV_PER_PROCESS_DATA *psPerProc);
128
129 int SGXAddSharedPBDescBW(u32 ui32BridgeID,
130        struct PVRSRV_BRIDGE_IN_SGXADDSHAREDPBDESC *psSGXAddSharedPBDescIN,
131        struct PVRSRV_BRIDGE_OUT_SGXADDSHAREDPBDESC *psSGXAddSharedPBDescOUT,
132        struct PVRSRV_PER_PROCESS_DATA *psPerProc);
133
134 int SGXGetInfoForSrvinitBW(u32 ui32BridgeID,
135        struct PVRSRV_BRIDGE_IN_SGXINFO_FOR_SRVINIT *psSGXInfoForSrvinitIN,
136        struct PVRSRV_BRIDGE_OUT_SGXINFO_FOR_SRVINIT *psSGXInfoForSrvinitOUT,
137        struct PVRSRV_PER_PROCESS_DATA *psPerProc);
138
139 #if defined(PDUMP)
140 int SGXPDumpBufferArrayBW(u32 ui32BridgeID,
141        struct PVRSRV_BRIDGE_IN_PDUMP_BUFFER_ARRAY *psPDumpBufferArrayIN,
142        void *psBridgeOut, struct PVRSRV_PER_PROCESS_DATA *psPerProc);
143
144 int SGXPDump3DSignatureRegistersBW(u32 ui32BridgeID,
145        struct PVRSRV_BRIDGE_IN_PDUMP_3D_SIGNATURE_REGISTERS
146        *psPDump3DSignatureRegistersIN,
147        void *psBridgeOut, struct PVRSRV_PER_PROCESS_DATA *psPerProc);
148
149 int SGXPDumpCounterRegistersBW(u32 ui32BridgeID,
150        struct PVRSRV_BRIDGE_IN_PDUMP_COUNTER_REGISTERS
151        *psPDumpCounterRegistersIN,
152        void *psBridgeOut, struct PVRSRV_PER_PROCESS_DATA *psPerProc);
153
154 int SGXPDumpTASignatureRegistersBW(u32 ui32BridgeID,
155        struct PVRSRV_BRIDGE_IN_PDUMP_TA_SIGNATURE_REGISTERS
156        *psPDumpTASignatureRegistersIN,
157        void *psBridgeOut, struct PVRSRV_PER_PROCESS_DATA *psPerProc);
158
159 int SGXPDumpHWPerfCBBW(u32 ui32BridgeID,
160        struct PVRSRV_BRIDGE_IN_PDUMP_HWPERFCB *psPDumpHWPerfCBIN,
161        struct PVRSRV_BRIDGE_RETURN *psRetOUT,
162        struct PVRSRV_PER_PROCESS_DATA *psPerProc);
163
164 #endif
165 #endif