1 /*******************************************************************************
3 @Title Common bridge header for rgxtq
4 @Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
5 @Description Declares common defines and structures used by both the client
6 and server side of the bridge for rgxtq
7 @License Dual MIT/GPLv2
9 The contents of this file are subject to the MIT license as set out below.
11 Permission is hereby granted, free of charge, to any person obtaining a copy
12 of this software and associated documentation files (the "Software"), to deal
13 in the Software without restriction, including without limitation the rights
14 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15 copies of the Software, and to permit persons to whom the Software is
16 furnished to do so, subject to the following conditions:
18 The above copyright notice and this permission notice shall be included in
19 all copies or substantial portions of the Software.
21 Alternatively, the contents of this file may be used under the terms of
22 the GNU General Public License Version 2 ("GPL") in which case the provisions
23 of GPL are applicable instead of those above.
25 If you wish to allow use of your version of this file only under the terms of
26 GPL, and not to allow others to use your version of this file under the terms
27 of the MIT license, indicate your decision by deleting the provisions above
28 and replace them with the notice and other provisions required by GPL as set
29 out in the file called "GPL-COPYING" included in this distribution. If you do
30 not delete the provisions above, a recipient may use your version of this file
31 under the terms of either the MIT license or GPL.
33 This License is also included in this distribution in the file called
36 EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
37 PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
38 BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
39 PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
40 COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
41 IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
42 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
43 *******************************************************************************/
45 #ifndef COMMON_RGXTQ_BRIDGE_H
46 #define COMMON_RGXTQ_BRIDGE_H
48 #include <powervr/mem_types.h>
51 #include "img_types.h"
52 #include "pvrsrv_error.h"
54 #include "rgx_bridge.h"
55 #include "pvrsrv_sync_km.h"
57 #define PVRSRV_BRIDGE_RGXTQ_CMD_FIRST 0
58 #define PVRSRV_BRIDGE_RGXTQ_RGXCREATETRANSFERCONTEXT PVRSRV_BRIDGE_RGXTQ_CMD_FIRST+0
59 #define PVRSRV_BRIDGE_RGXTQ_RGXDESTROYTRANSFERCONTEXT PVRSRV_BRIDGE_RGXTQ_CMD_FIRST+1
60 #define PVRSRV_BRIDGE_RGXTQ_RGXSETTRANSFERCONTEXTPRIORITY PVRSRV_BRIDGE_RGXTQ_CMD_FIRST+2
61 #define PVRSRV_BRIDGE_RGXTQ_RGXSUBMITTRANSFER2 PVRSRV_BRIDGE_RGXTQ_CMD_FIRST+3
62 #define PVRSRV_BRIDGE_RGXTQ_RGXSETTRANSFERCONTEXTPROPERTY PVRSRV_BRIDGE_RGXTQ_CMD_FIRST+4
63 #define PVRSRV_BRIDGE_RGXTQ_CMD_LAST (PVRSRV_BRIDGE_RGXTQ_CMD_FIRST+4)
65 /*******************************************
66 RGXCreateTransferContext
67 *******************************************/
69 /* Bridge in structure for RGXCreateTransferContext */
70 typedef struct PVRSRV_BRIDGE_IN_RGXCREATETRANSFERCONTEXT_TAG
72 IMG_UINT64 ui64RobustnessAddress;
74 IMG_BYTE *pui8FrameworkCmd;
75 IMG_UINT32 ui32ContextFlags;
76 IMG_UINT32 ui32FrameworkCmdize;
77 IMG_UINT32 ui32PackedCCBSizeU8888;
78 IMG_UINT32 ui32Priority;
79 } __packed PVRSRV_BRIDGE_IN_RGXCREATETRANSFERCONTEXT;
81 /* Bridge out structure for RGXCreateTransferContext */
82 typedef struct PVRSRV_BRIDGE_OUT_RGXCREATETRANSFERCONTEXT_TAG
84 IMG_HANDLE hCLIPMRMem;
85 IMG_HANDLE hTransferContext;
86 IMG_HANDLE hUSCPMRMem;
88 } __packed PVRSRV_BRIDGE_OUT_RGXCREATETRANSFERCONTEXT;
90 /*******************************************
91 RGXDestroyTransferContext
92 *******************************************/
94 /* Bridge in structure for RGXDestroyTransferContext */
95 typedef struct PVRSRV_BRIDGE_IN_RGXDESTROYTRANSFERCONTEXT_TAG
97 IMG_HANDLE hTransferContext;
98 } __packed PVRSRV_BRIDGE_IN_RGXDESTROYTRANSFERCONTEXT;
100 /* Bridge out structure for RGXDestroyTransferContext */
101 typedef struct PVRSRV_BRIDGE_OUT_RGXDESTROYTRANSFERCONTEXT_TAG
104 } __packed PVRSRV_BRIDGE_OUT_RGXDESTROYTRANSFERCONTEXT;
106 /*******************************************
107 RGXSetTransferContextPriority
108 *******************************************/
110 /* Bridge in structure for RGXSetTransferContextPriority */
111 typedef struct PVRSRV_BRIDGE_IN_RGXSETTRANSFERCONTEXTPRIORITY_TAG
113 IMG_HANDLE hTransferContext;
114 IMG_UINT32 ui32Priority;
115 } __packed PVRSRV_BRIDGE_IN_RGXSETTRANSFERCONTEXTPRIORITY;
117 /* Bridge out structure for RGXSetTransferContextPriority */
118 typedef struct PVRSRV_BRIDGE_OUT_RGXSETTRANSFERCONTEXTPRIORITY_TAG
121 } __packed PVRSRV_BRIDGE_OUT_RGXSETTRANSFERCONTEXTPRIORITY;
123 /*******************************************
125 *******************************************/
127 /* Bridge in structure for RGXSubmitTransfer2 */
128 typedef struct PVRSRV_BRIDGE_IN_RGXSUBMITTRANSFER2_TAG
130 IMG_HANDLE hTransferContext;
131 IMG_UINT32 *pui32ClientUpdateCount;
132 IMG_UINT32 *pui32CommandSize;
133 IMG_UINT32 *pui32SyncPMRFlags;
134 IMG_UINT32 *pui32TQPrepareFlags;
135 IMG_UINT32 **pui32UpdateSyncOffset;
136 IMG_UINT32 **pui32UpdateValue;
137 IMG_UINT8 **pui8FWCommand;
138 IMG_CHAR *puiUpdateFenceName;
139 IMG_HANDLE *phSyncPMRs;
140 IMG_HANDLE **phUpdateUFOSyncPrimBlock;
141 PVRSRV_TIMELINE h2DUpdateTimeline;
142 PVRSRV_TIMELINE h3DUpdateTimeline;
143 PVRSRV_FENCE hCheckFenceFD;
144 IMG_UINT32 ui32ExtJobRef;
145 IMG_UINT32 ui32PrepareCount;
146 IMG_UINT32 ui32SyncPMRCount;
147 } __packed PVRSRV_BRIDGE_IN_RGXSUBMITTRANSFER2;
149 /* Bridge out structure for RGXSubmitTransfer2 */
150 typedef struct PVRSRV_BRIDGE_OUT_RGXSUBMITTRANSFER2_TAG
153 PVRSRV_FENCE h2DUpdateFence;
154 PVRSRV_FENCE h3DUpdateFence;
155 } __packed PVRSRV_BRIDGE_OUT_RGXSUBMITTRANSFER2;
157 /*******************************************
158 RGXSetTransferContextProperty
159 *******************************************/
161 /* Bridge in structure for RGXSetTransferContextProperty */
162 typedef struct PVRSRV_BRIDGE_IN_RGXSETTRANSFERCONTEXTPROPERTY_TAG
164 IMG_UINT64 ui64Input;
165 IMG_HANDLE hTransferContext;
166 IMG_UINT32 ui32Property;
167 } __packed PVRSRV_BRIDGE_IN_RGXSETTRANSFERCONTEXTPROPERTY;
169 /* Bridge out structure for RGXSetTransferContextProperty */
170 typedef struct PVRSRV_BRIDGE_OUT_RGXSETTRANSFERCONTEXTPROPERTY_TAG
172 IMG_UINT64 ui64Output;
174 } __packed PVRSRV_BRIDGE_OUT_RGXSETTRANSFERCONTEXTPROPERTY;
176 #endif /* COMMON_RGXTQ_BRIDGE_H */