RK3368 GPU: Rogue N Init.
[firefly-linux-kernel-4.4.55.git] / drivers / staging / imgtec / rogue / generated / pdumpmm_bridge / common_pdumpmm_bridge.h
1 /*************************************************************************/ /*!
2 @File
3 @Title          Common bridge header for pdumpmm
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 pdumpmm
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_PDUMPMM_BRIDGE_H
46 #define COMMON_PDUMPMM_BRIDGE_H
47
48 #include <powervr/mem_types.h>
49
50 #include "img_types.h"
51 #include "pvrsrv_error.h"
52
53 #include "pdump.h"
54 #include "pdumpdefs.h"
55 #include "pvrsrv_memallocflags.h"
56 #include "devicemem_typedefs.h"
57
58
59 #define PVRSRV_BRIDGE_PDUMPMM_CMD_FIRST                 0
60 #define PVRSRV_BRIDGE_PDUMPMM_PMRPDUMPLOADMEM                   PVRSRV_BRIDGE_PDUMPMM_CMD_FIRST+0
61 #define PVRSRV_BRIDGE_PDUMPMM_PMRPDUMPLOADMEMVALUE32                    PVRSRV_BRIDGE_PDUMPMM_CMD_FIRST+1
62 #define PVRSRV_BRIDGE_PDUMPMM_PMRPDUMPLOADMEMVALUE64                    PVRSRV_BRIDGE_PDUMPMM_CMD_FIRST+2
63 #define PVRSRV_BRIDGE_PDUMPMM_PMRPDUMPSAVETOFILE                        PVRSRV_BRIDGE_PDUMPMM_CMD_FIRST+3
64 #define PVRSRV_BRIDGE_PDUMPMM_PMRPDUMPSYMBOLICADDR                      PVRSRV_BRIDGE_PDUMPMM_CMD_FIRST+4
65 #define PVRSRV_BRIDGE_PDUMPMM_PMRPDUMPPOL32                     PVRSRV_BRIDGE_PDUMPMM_CMD_FIRST+5
66 #define PVRSRV_BRIDGE_PDUMPMM_PMRPDUMPCBP                       PVRSRV_BRIDGE_PDUMPMM_CMD_FIRST+6
67 #define PVRSRV_BRIDGE_PDUMPMM_DEVMEMINTPDUMPSAVETOFILEVIRTUAL                   PVRSRV_BRIDGE_PDUMPMM_CMD_FIRST+7
68 #define PVRSRV_BRIDGE_PDUMPMM_CMD_LAST                  (PVRSRV_BRIDGE_PDUMPMM_CMD_FIRST+7)
69
70
71 /*******************************************
72             PMRPDumpLoadMem          
73  *******************************************/
74
75 /* Bridge in structure for PMRPDumpLoadMem */
76 typedef struct PVRSRV_BRIDGE_IN_PMRPDUMPLOADMEM_TAG
77 {
78         IMG_HANDLE hPMR;
79         IMG_DEVMEM_OFFSET_T uiOffset;
80         IMG_DEVMEM_SIZE_T uiSize;
81         IMG_UINT32 ui32PDumpFlags;
82         IMG_BOOL bbZero;
83 } __attribute__((packed)) PVRSRV_BRIDGE_IN_PMRPDUMPLOADMEM;
84
85 /* Bridge out structure for PMRPDumpLoadMem */
86 typedef struct PVRSRV_BRIDGE_OUT_PMRPDUMPLOADMEM_TAG
87 {
88         PVRSRV_ERROR eError;
89 } __attribute__((packed)) PVRSRV_BRIDGE_OUT_PMRPDUMPLOADMEM;
90
91
92 /*******************************************
93             PMRPDumpLoadMemValue32          
94  *******************************************/
95
96 /* Bridge in structure for PMRPDumpLoadMemValue32 */
97 typedef struct PVRSRV_BRIDGE_IN_PMRPDUMPLOADMEMVALUE32_TAG
98 {
99         IMG_HANDLE hPMR;
100         IMG_DEVMEM_OFFSET_T uiOffset;
101         IMG_UINT32 ui32Value;
102         IMG_UINT32 ui32PDumpFlags;
103 } __attribute__((packed)) PVRSRV_BRIDGE_IN_PMRPDUMPLOADMEMVALUE32;
104
105 /* Bridge out structure for PMRPDumpLoadMemValue32 */
106 typedef struct PVRSRV_BRIDGE_OUT_PMRPDUMPLOADMEMVALUE32_TAG
107 {
108         PVRSRV_ERROR eError;
109 } __attribute__((packed)) PVRSRV_BRIDGE_OUT_PMRPDUMPLOADMEMVALUE32;
110
111
112 /*******************************************
113             PMRPDumpLoadMemValue64          
114  *******************************************/
115
116 /* Bridge in structure for PMRPDumpLoadMemValue64 */
117 typedef struct PVRSRV_BRIDGE_IN_PMRPDUMPLOADMEMVALUE64_TAG
118 {
119         IMG_HANDLE hPMR;
120         IMG_DEVMEM_OFFSET_T uiOffset;
121         IMG_UINT64 ui64Value;
122         IMG_UINT32 ui32PDumpFlags;
123 } __attribute__((packed)) PVRSRV_BRIDGE_IN_PMRPDUMPLOADMEMVALUE64;
124
125 /* Bridge out structure for PMRPDumpLoadMemValue64 */
126 typedef struct PVRSRV_BRIDGE_OUT_PMRPDUMPLOADMEMVALUE64_TAG
127 {
128         PVRSRV_ERROR eError;
129 } __attribute__((packed)) PVRSRV_BRIDGE_OUT_PMRPDUMPLOADMEMVALUE64;
130
131
132 /*******************************************
133             PMRPDumpSaveToFile          
134  *******************************************/
135
136 /* Bridge in structure for PMRPDumpSaveToFile */
137 typedef struct PVRSRV_BRIDGE_IN_PMRPDUMPSAVETOFILE_TAG
138 {
139         IMG_HANDLE hPMR;
140         IMG_DEVMEM_OFFSET_T uiOffset;
141         IMG_DEVMEM_SIZE_T uiSize;
142         IMG_UINT32 ui32ArraySize;
143         const IMG_CHAR * puiFileName;
144         IMG_UINT32 ui32uiFileOffset;
145 } __attribute__((packed)) PVRSRV_BRIDGE_IN_PMRPDUMPSAVETOFILE;
146
147 /* Bridge out structure for PMRPDumpSaveToFile */
148 typedef struct PVRSRV_BRIDGE_OUT_PMRPDUMPSAVETOFILE_TAG
149 {
150         PVRSRV_ERROR eError;
151 } __attribute__((packed)) PVRSRV_BRIDGE_OUT_PMRPDUMPSAVETOFILE;
152
153
154 /*******************************************
155             PMRPDumpSymbolicAddr          
156  *******************************************/
157
158 /* Bridge in structure for PMRPDumpSymbolicAddr */
159 typedef struct PVRSRV_BRIDGE_IN_PMRPDUMPSYMBOLICADDR_TAG
160 {
161         IMG_HANDLE hPMR;
162         IMG_DEVMEM_OFFSET_T uiOffset;
163         IMG_UINT32 ui32MemspaceNameLen;
164         IMG_UINT32 ui32SymbolicAddrLen;
165         /* Output pointer puiMemspaceName is also an implied input */
166         IMG_CHAR * puiMemspaceName;
167         /* Output pointer puiSymbolicAddr is also an implied input */
168         IMG_CHAR * puiSymbolicAddr;
169 } __attribute__((packed)) PVRSRV_BRIDGE_IN_PMRPDUMPSYMBOLICADDR;
170
171 /* Bridge out structure for PMRPDumpSymbolicAddr */
172 typedef struct PVRSRV_BRIDGE_OUT_PMRPDUMPSYMBOLICADDR_TAG
173 {
174         IMG_CHAR * puiMemspaceName;
175         IMG_CHAR * puiSymbolicAddr;
176         IMG_DEVMEM_OFFSET_T uiNewOffset;
177         IMG_DEVMEM_OFFSET_T uiNextSymName;
178         PVRSRV_ERROR eError;
179 } __attribute__((packed)) PVRSRV_BRIDGE_OUT_PMRPDUMPSYMBOLICADDR;
180
181
182 /*******************************************
183             PMRPDumpPol32          
184  *******************************************/
185
186 /* Bridge in structure for PMRPDumpPol32 */
187 typedef struct PVRSRV_BRIDGE_IN_PMRPDUMPPOL32_TAG
188 {
189         IMG_HANDLE hPMR;
190         IMG_DEVMEM_OFFSET_T uiOffset;
191         IMG_UINT32 ui32Value;
192         IMG_UINT32 ui32Mask;
193         PDUMP_POLL_OPERATOR eOperator;
194         IMG_UINT32 ui32PDumpFlags;
195 } __attribute__((packed)) PVRSRV_BRIDGE_IN_PMRPDUMPPOL32;
196
197 /* Bridge out structure for PMRPDumpPol32 */
198 typedef struct PVRSRV_BRIDGE_OUT_PMRPDUMPPOL32_TAG
199 {
200         PVRSRV_ERROR eError;
201 } __attribute__((packed)) PVRSRV_BRIDGE_OUT_PMRPDUMPPOL32;
202
203
204 /*******************************************
205             PMRPDumpCBP          
206  *******************************************/
207
208 /* Bridge in structure for PMRPDumpCBP */
209 typedef struct PVRSRV_BRIDGE_IN_PMRPDUMPCBP_TAG
210 {
211         IMG_HANDLE hPMR;
212         IMG_DEVMEM_OFFSET_T uiReadOffset;
213         IMG_DEVMEM_OFFSET_T uiWriteOffset;
214         IMG_DEVMEM_SIZE_T uiPacketSize;
215         IMG_DEVMEM_SIZE_T uiBufferSize;
216 } __attribute__((packed)) PVRSRV_BRIDGE_IN_PMRPDUMPCBP;
217
218 /* Bridge out structure for PMRPDumpCBP */
219 typedef struct PVRSRV_BRIDGE_OUT_PMRPDUMPCBP_TAG
220 {
221         PVRSRV_ERROR eError;
222 } __attribute__((packed)) PVRSRV_BRIDGE_OUT_PMRPDUMPCBP;
223
224
225 /*******************************************
226             DevmemIntPDumpSaveToFileVirtual          
227  *******************************************/
228
229 /* Bridge in structure for DevmemIntPDumpSaveToFileVirtual */
230 typedef struct PVRSRV_BRIDGE_IN_DEVMEMINTPDUMPSAVETOFILEVIRTUAL_TAG
231 {
232         IMG_HANDLE hDevmemServerContext;
233         IMG_DEV_VIRTADDR sAddress;
234         IMG_DEVMEM_SIZE_T uiSize;
235         IMG_UINT32 ui32ArraySize;
236         const IMG_CHAR * puiFileName;
237         IMG_UINT32 ui32FileOffset;
238         IMG_UINT32 ui32PDumpFlags;
239 } __attribute__((packed)) PVRSRV_BRIDGE_IN_DEVMEMINTPDUMPSAVETOFILEVIRTUAL;
240
241 /* Bridge out structure for DevmemIntPDumpSaveToFileVirtual */
242 typedef struct PVRSRV_BRIDGE_OUT_DEVMEMINTPDUMPSAVETOFILEVIRTUAL_TAG
243 {
244         PVRSRV_ERROR eError;
245 } __attribute__((packed)) PVRSRV_BRIDGE_OUT_DEVMEMINTPDUMPSAVETOFILEVIRTUAL;
246
247
248 #endif /* COMMON_PDUMPMM_BRIDGE_H */