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 __BRIDGED_SGX_BRIDGE_H__
28 #define __BRIDGED_SGX_BRIDGE_H__
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
140 int SGXPDumpBufferArrayBW(u32 ui32BridgeID,
141 struct PVRSRV_BRIDGE_IN_PDUMP_BUFFER_ARRAY *psPDumpBufferArrayIN,
142 void *psBridgeOut, struct PVRSRV_PER_PROCESS_DATA *psPerProc);
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);
149 int SGXPDumpCounterRegistersBW(u32 ui32BridgeID,
150 struct PVRSRV_BRIDGE_IN_PDUMP_COUNTER_REGISTERS
151 *psPDumpCounterRegistersIN,
152 void *psBridgeOut, struct PVRSRV_PER_PROCESS_DATA *psPerProc);
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);
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);