gpu: pvr: pass IOCTL in param size to dispatch func
[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 void SetSGXDispatchTableEntry(void);
31
32 int SGXGetClientInfoBW(u32 ui32BridgeID,
33        struct PVRSRV_BRIDGE_IN_GETCLIENTINFO *psGetClientInfoIN,
34        struct PVRSRV_BRIDGE_OUT_GETCLIENTINFO *psGetClientInfoOUT,
35        struct PVRSRV_PER_PROCESS_DATA *psPerProc);
36
37 int SGXReleaseClientInfoBW(u32 ui32BridgeID,
38        struct PVRSRV_BRIDGE_IN_RELEASECLIENTINFO *psReleaseClientInfoIN,
39        struct PVRSRV_BRIDGE_RETURN *psRetOUT,
40        struct PVRSRV_PER_PROCESS_DATA *psPerProc);
41
42 int SGXGetInternalDevInfoBW(u32 ui32BridgeID,
43        struct PVRSRV_BRIDGE_IN_GETINTERNALDEVINFO *psSGXGetInternalDevInfoIN,
44        struct PVRSRV_BRIDGE_OUT_GETINTERNALDEVINFO *psSGXGetInternalDevInfoOUT,
45        struct PVRSRV_PER_PROCESS_DATA *psPerProc);
46
47 int SGXDoKickBW(u32 ui32BridgeID,
48         struct PVRSRV_BRIDGE_IN_DOKICK *psDoKickIN,
49         struct PVRSRV_BRIDGE_RETURN *psRetOUT, size_t in_size,
50         struct PVRSRV_PER_PROCESS_DATA *psPerProc);
51
52 int SGXScheduleProcessQueuesBW(u32 ui32BridgeID,
53        struct PVRSRV_BRIDGE_IN_SGX_SCHEDULE_PROCESS_QUEUES *psScheduleProcQIN,
54        struct PVRSRV_BRIDGE_RETURN *psRetOUT,
55        struct PVRSRV_PER_PROCESS_DATA *psPerProc);
56
57 int SGXSubmitTransferBW(u32 ui32BridgeID,
58        struct PVRSRV_BRIDGE_IN_SUBMITTRANSFER *psSubmitTransferIN,
59        struct PVRSRV_BRIDGE_RETURN *psRetOUT,
60        struct PVRSRV_PER_PROCESS_DATA *psPerProc);
61
62 int SGXGetMiscInfoBW(u32 ui32BridgeID,
63        struct PVRSRV_BRIDGE_IN_SGXGETMISCINFO *psSGXGetMiscInfoIN,
64        struct PVRSRV_BRIDGE_RETURN *psRetOUT,
65        struct PVRSRV_PER_PROCESS_DATA *psPerProc);
66
67 int SGXReadDiffCountersBW(u32 ui32BridgeID,
68        struct PVRSRV_BRIDGE_IN_SGX_READ_DIFF_COUNTERS *psSGXReadDiffCountersIN,
69        struct PVRSRV_BRIDGE_OUT_SGX_READ_DIFF_COUNTERS
70        *psSGXReadDiffCountersOUT,
71        struct PVRSRV_PER_PROCESS_DATA *psPerProc);
72
73 int SGXReadHWPerfCBBW(u32 ui32BridgeID,
74        struct PVRSRV_BRIDGE_IN_SGX_READ_HWPERF_CB *psSGXReadHWPerfCBIN,
75        struct PVRSRV_BRIDGE_OUT_SGX_READ_HWPERF_CB *psSGXReadHWPerfCBOUT,
76        struct PVRSRV_PER_PROCESS_DATA *psPerProc);
77
78 int SGXDevInitPart2BW(u32 ui32BridgeID,
79        struct PVRSRV_BRIDGE_IN_SGXDEVINITPART2 *psSGXDevInitPart2IN,
80        struct PVRSRV_BRIDGE_RETURN *psRetOUT,
81        struct PVRSRV_PER_PROCESS_DATA *psPerProc);
82
83 int SGXRegisterHWRenderContextBW(u32 ui32BridgeID,
84        struct PVRSRV_BRIDGE_IN_SGX_REGISTER_HW_RENDER_CONTEXT
85        *psSGXRegHWRenderContextIN,
86        struct PVRSRV_BRIDGE_OUT_SGX_REGISTER_HW_RENDER_CONTEXT
87        *psSGXRegHWRenderContextOUT,
88        struct PVRSRV_PER_PROCESS_DATA *psPerProc);
89
90 int SGXUnregisterHWRenderContextBW(u32 ui32BridgeID,
91        struct PVRSRV_BRIDGE_IN_SGX_UNREGISTER_HW_RENDER_CONTEXT
92        *psSGXUnregHWRenderContextIN,
93        struct PVRSRV_BRIDGE_RETURN *psRetOUT,
94        struct PVRSRV_PER_PROCESS_DATA *psPerProc);
95
96 int SGXRegisterHWTransferContextBW(u32 ui32BridgeID,
97        struct PVRSRV_BRIDGE_IN_SGX_REGISTER_HW_TRANSFER_CONTEXT
98        *psSGXRegHWTransferContextIN,
99        struct PVRSRV_BRIDGE_OUT_SGX_REGISTER_HW_TRANSFER_CONTEXT
100        *psSGXRegHWTransferContextOUT,
101        struct PVRSRV_PER_PROCESS_DATA *psPerProc);
102
103 int SGXUnregisterHWTransferContextBW(u32 ui32BridgeID,
104        struct PVRSRV_BRIDGE_IN_SGX_UNREGISTER_HW_TRANSFER_CONTEXT
105        *psSGXUnregHWTransferContextIN,
106        struct PVRSRV_BRIDGE_RETURN *psRetOUT,
107        struct PVRSRV_PER_PROCESS_DATA *psPerProc);
108
109 int SGXFlushHWRenderTargetBW(u32 ui32BridgeID,
110        struct PVRSRV_BRIDGE_IN_SGX_FLUSH_HW_RENDER_TARGET
111        *psSGXFlushHWRenderTargetIN,
112        struct PVRSRV_BRIDGE_RETURN *psRetOUT,
113        struct PVRSRV_PER_PROCESS_DATA *psPerProc);
114
115 int SGX2DQueryBlitsCompleteBW(struct file *filp, u32 ui32BridgeID,
116        struct PVRSRV_BRIDGE_IN_2DQUERYBLTSCOMPLETE *ps2DQueryBltsCompleteIN,
117        struct PVRSRV_BRIDGE_RETURN *psRetOUT,
118        struct PVRSRV_PER_PROCESS_DATA *psPerProc);
119
120 int SGXFindSharedPBDescBW(u32 ui32BridgeID,
121        struct PVRSRV_BRIDGE_IN_SGXFINDSHAREDPBDESC *psSGXFindSharedPBDescIN,
122        struct PVRSRV_BRIDGE_OUT_SGXFINDSHAREDPBDESC *psSGXFindSharedPBDescOUT,
123        struct PVRSRV_PER_PROCESS_DATA *psPerProc);
124
125 int SGXUnrefSharedPBDescBW(u32 ui32BridgeID,
126        struct PVRSRV_BRIDGE_IN_SGXUNREFSHAREDPBDESC *psSGXUnrefSharedPBDescIN,
127        struct PVRSRV_BRIDGE_OUT_SGXUNREFSHAREDPBDESC
128        *psSGXUnrefSharedPBDescOUT,
129        struct PVRSRV_PER_PROCESS_DATA *psPerProc);
130
131 int SGXAddSharedPBDescBW(u32 ui32BridgeID,
132        struct PVRSRV_BRIDGE_IN_SGXADDSHAREDPBDESC *psSGXAddSharedPBDescIN,
133        struct PVRSRV_BRIDGE_OUT_SGXADDSHAREDPBDESC *psSGXAddSharedPBDescOUT,
134        struct PVRSRV_PER_PROCESS_DATA *psPerProc);
135
136 int SGXGetInfoForSrvinitBW(u32 ui32BridgeID,
137        struct PVRSRV_BRIDGE_IN_SGXINFO_FOR_SRVINIT *psSGXInfoForSrvinitIN,
138        struct PVRSRV_BRIDGE_OUT_SGXINFO_FOR_SRVINIT *psSGXInfoForSrvinitOUT,
139        struct PVRSRV_PER_PROCESS_DATA *psPerProc);
140
141 #if defined(PDUMP)
142 int SGXPDumpBufferArrayBW(u32 ui32BridgeID,
143        struct PVRSRV_BRIDGE_IN_PDUMP_BUFFER_ARRAY *psPDumpBufferArrayIN,
144        void *psBridgeOut, struct PVRSRV_PER_PROCESS_DATA *psPerProc);
145
146 int SGXPDump3DSignatureRegistersBW(u32 ui32BridgeID,
147        struct PVRSRV_BRIDGE_IN_PDUMP_3D_SIGNATURE_REGISTERS
148        *psPDump3DSignatureRegistersIN,
149        void *psBridgeOut, struct PVRSRV_PER_PROCESS_DATA *psPerProc);
150
151 int SGXPDumpCounterRegistersBW(u32 ui32BridgeID,
152        struct PVRSRV_BRIDGE_IN_PDUMP_COUNTER_REGISTERS
153        *psPDumpCounterRegistersIN,
154        void *psBridgeOut, struct PVRSRV_PER_PROCESS_DATA *psPerProc);
155
156 int SGXPDumpTASignatureRegistersBW(u32 ui32BridgeID,
157        struct PVRSRV_BRIDGE_IN_PDUMP_TA_SIGNATURE_REGISTERS
158        *psPDumpTASignatureRegistersIN,
159        void *psBridgeOut, struct PVRSRV_PER_PROCESS_DATA *psPerProc);
160
161 int SGXPDumpHWPerfCBBW(u32 ui32BridgeID,
162        struct PVRSRV_BRIDGE_IN_PDUMP_HWPERFCB *psPDumpHWPerfCBIN,
163        struct PVRSRV_BRIDGE_RETURN *psRetOUT,
164        struct PVRSRV_PER_PROCESS_DATA *psPerProc);
165
166 #endif
167 #endif