RK3368 GPU version Rogue M 1.28
[firefly-linux-kernel-4.4.55.git] / drivers / gpu / rogue_m / generated / rgxinit_bridge / common_rgxinit_bridge.h
1 /*************************************************************************/ /*!
2 @File
3 @Title          Common bridge header for rgxinit
4 @Copyright      Copyright (c) Imagination Technologies Ltd. All Rights Reserved
5 @Description    Declares common defines and structures that are used by both
6                 the client and sever side of the bridge for rgxinit
7 @License        Dual MIT/GPLv2
8
9 The contents of this file are subject to the MIT license as set out below.
10
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:
17
18 The above copyright notice and this permission notice shall be included in
19 all copies or substantial portions of the Software.
20
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.
24
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.
32
33 This License is also included in this distribution in the file called
34 "MIT-COPYING".
35
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 */ /**************************************************************************/
44
45 #ifndef COMMON_RGXINIT_BRIDGE_H
46 #define COMMON_RGXINIT_BRIDGE_H
47
48 #include "img_types.h"
49 #include "pvrsrv_error.h"
50
51 #include "rgx_bridge.h"
52 #include "rgxscript.h"
53 #include "devicemem_typedefs.h"
54 #include "rgx_fwif_shared.h"
55 #include "rgx_fwif.h"
56
57
58 #define PVRSRV_BRIDGE_RGXINIT_CMD_FIRST                 0
59 #define PVRSRV_BRIDGE_RGXINIT_RGXINITALLOCFWIMGMEM                      PVRSRV_BRIDGE_RGXINIT_CMD_FIRST+0
60 #define PVRSRV_BRIDGE_RGXINIT_RGXINITFIRMWARE                   PVRSRV_BRIDGE_RGXINIT_CMD_FIRST+1
61 #define PVRSRV_BRIDGE_RGXINIT_RGXINITLOADFWIMAGE                        PVRSRV_BRIDGE_RGXINIT_CMD_FIRST+2
62 #define PVRSRV_BRIDGE_RGXINIT_RGXINITDEVPART2                   PVRSRV_BRIDGE_RGXINIT_CMD_FIRST+3
63 #define PVRSRV_BRIDGE_RGXINIT_GPUVIRTPOPULATELMASUBARENAS                       PVRSRV_BRIDGE_RGXINIT_CMD_FIRST+4
64 #define PVRSRV_BRIDGE_RGXINIT_CMD_LAST                  (PVRSRV_BRIDGE_RGXINIT_CMD_FIRST+4)
65
66
67 /*******************************************
68             RGXInitAllocFWImgMem          
69  *******************************************/
70
71 /* Bridge in structure for RGXInitAllocFWImgMem */
72 typedef struct PVRSRV_BRIDGE_IN_RGXINITALLOCFWIMGMEM_TAG
73 {
74         IMG_HANDLE hDevNode;
75         IMG_DEVMEM_SIZE_T uiFWCodeLen;
76         IMG_DEVMEM_SIZE_T uiFWDataLen;
77         IMG_DEVMEM_SIZE_T uiFWCoremem;
78 } __attribute__((packed)) PVRSRV_BRIDGE_IN_RGXINITALLOCFWIMGMEM;
79
80
81 /* Bridge out structure for RGXInitAllocFWImgMem */
82 typedef struct PVRSRV_BRIDGE_OUT_RGXINITALLOCFWIMGMEM_TAG
83 {
84         DEVMEM_SERVER_EXPORTCOOKIE hFWCodeAllocServerExportCookie;
85         IMG_DEV_VIRTADDR sFWCodeDevVAddrBase;
86         DEVMEM_SERVER_EXPORTCOOKIE hFWDataAllocServerExportCookie;
87         IMG_DEV_VIRTADDR sFWDataDevVAddrBase;
88         DEVMEM_SERVER_EXPORTCOOKIE hFWCorememAllocServerExportCookie;
89         IMG_DEV_VIRTADDR sFWCorememDevVAddrBase;
90         RGXFWIF_DEV_VIRTADDR sFWCorememMetaVAddrBase;
91         PVRSRV_ERROR eError;
92 } __attribute__((packed)) PVRSRV_BRIDGE_OUT_RGXINITALLOCFWIMGMEM;
93
94 /*******************************************
95             RGXInitFirmware          
96  *******************************************/
97
98 /* Bridge in structure for RGXInitFirmware */
99 typedef struct PVRSRV_BRIDGE_IN_RGXINITFIRMWARE_TAG
100 {
101         IMG_HANDLE hDevNode;
102         IMG_BOOL bEnableSignatureChecks;
103         IMG_UINT32 ui32SignatureChecksBufSize;
104         IMG_UINT32 ui32HWPerfFWBufSizeKB;
105         IMG_UINT64 ui64HWPerfFilter;
106         IMG_UINT32 ui32RGXFWAlignChecksSize;
107         IMG_UINT32 * pui32RGXFWAlignChecks;
108         IMG_UINT32 ui32ConfigFlags;
109         IMG_UINT32 ui32LogType;
110         IMG_UINT32 ui32FilterFlags;
111         IMG_UINT32 ui32JonesDisableMask;
112         IMG_UINT32 ui32ui32HWRDebugDumpLimit;
113         RGXFWIF_COMPCHECKS_BVNC sClientBVNC;
114         IMG_UINT32 ui32HWPerfCountersDataSize;
115         RGX_RD_POWER_ISLAND_CONF eRGXRDPowerIslandConf;
116 } __attribute__((packed)) PVRSRV_BRIDGE_IN_RGXINITFIRMWARE;
117
118
119 /* Bridge out structure for RGXInitFirmware */
120 typedef struct PVRSRV_BRIDGE_OUT_RGXINITFIRMWARE_TAG
121 {
122         RGXFWIF_DEV_VIRTADDR spsRGXFwInit;
123         DEVMEM_SERVER_EXPORTCOOKIE hHWPerfDataAllocServerExportCookie;
124         PVRSRV_ERROR eError;
125 } __attribute__((packed)) PVRSRV_BRIDGE_OUT_RGXINITFIRMWARE;
126
127 /*******************************************
128             RGXInitLoadFWImage          
129  *******************************************/
130
131 /* Bridge in structure for RGXInitLoadFWImage */
132 typedef struct PVRSRV_BRIDGE_IN_RGXINITLOADFWIMAGE_TAG
133 {
134         IMG_HANDLE hImgDestImport;
135         IMG_HANDLE hImgSrcImport;
136         IMG_UINT64 ui64ImgLen;
137         IMG_HANDLE hSigImport;
138         IMG_UINT64 ui64SigLen;
139 } __attribute__((packed)) PVRSRV_BRIDGE_IN_RGXINITLOADFWIMAGE;
140
141
142 /* Bridge out structure for RGXInitLoadFWImage */
143 typedef struct PVRSRV_BRIDGE_OUT_RGXINITLOADFWIMAGE_TAG
144 {
145         PVRSRV_ERROR eError;
146 } __attribute__((packed)) PVRSRV_BRIDGE_OUT_RGXINITLOADFWIMAGE;
147
148 /*******************************************
149             RGXInitDevPart2          
150  *******************************************/
151
152 /* Bridge in structure for RGXInitDevPart2 */
153 typedef struct PVRSRV_BRIDGE_IN_RGXINITDEVPART2_TAG
154 {
155         IMG_HANDLE hDevNode;
156         RGX_INIT_COMMAND * psInitScript;
157         RGX_INIT_COMMAND * psDbgScript;
158         RGX_INIT_COMMAND * psDbgBusScript;
159         RGX_INIT_COMMAND * psDeinitScript;
160         IMG_UINT32 ui32ui32KernelCatBaseIdReg;
161         IMG_UINT32 ui32KernelCatBaseId;
162         IMG_UINT32 ui32KernelCatBaseReg;
163         IMG_UINT32 ui32KernelCatBaseWordSize;
164         IMG_UINT32 ui32KernelCatBaseAlignShift;
165         IMG_UINT32 ui32KernelCatBaseShift;
166         IMG_UINT64 ui64KernelCatBaseMask;
167         IMG_UINT32 ui32DeviceFlags;
168         IMG_UINT32 ui32RGXActivePMConf;
169         DEVMEM_SERVER_EXPORTCOOKIE hFWCodeAllocServerExportCookie;
170         DEVMEM_SERVER_EXPORTCOOKIE hFWDataAllocServerExportCookie;
171         DEVMEM_SERVER_EXPORTCOOKIE hFWCorememAllocServerExportCookie;
172         DEVMEM_SERVER_EXPORTCOOKIE hHWPerfDataAllocServerExportCookie;
173 } __attribute__((packed)) PVRSRV_BRIDGE_IN_RGXINITDEVPART2;
174
175
176 /* Bridge out structure for RGXInitDevPart2 */
177 typedef struct PVRSRV_BRIDGE_OUT_RGXINITDEVPART2_TAG
178 {
179         PVRSRV_ERROR eError;
180 } __attribute__((packed)) PVRSRV_BRIDGE_OUT_RGXINITDEVPART2;
181
182 /*******************************************
183             GPUVIRTPopulateLMASubArenas          
184  *******************************************/
185
186 /* Bridge in structure for GPUVIRTPopulateLMASubArenas */
187 typedef struct PVRSRV_BRIDGE_IN_GPUVIRTPOPULATELMASUBARENAS_TAG
188 {
189         IMG_HANDLE hDevNode;
190         IMG_UINT32 ui32NumElements;
191         IMG_UINT32 * pui32Elements;
192 } __attribute__((packed)) PVRSRV_BRIDGE_IN_GPUVIRTPOPULATELMASUBARENAS;
193
194
195 /* Bridge out structure for GPUVIRTPopulateLMASubArenas */
196 typedef struct PVRSRV_BRIDGE_OUT_GPUVIRTPOPULATELMASUBARENAS_TAG
197 {
198         PVRSRV_ERROR eError;
199 } __attribute__((packed)) PVRSRV_BRIDGE_OUT_GPUVIRTPOPULATELMASUBARENAS;
200
201 #endif /* COMMON_RGXINIT_BRIDGE_H */