RK3368 GPU: Rogue N Init.
[firefly-linux-kernel-4.4.55.git] / drivers / staging / imgtec / rogue / generated / breakpoint_bridge / common_breakpoint_bridge.h
1 /*************************************************************************/ /*!
2 @File
3 @Title          Common bridge header for breakpoint
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 breakpoint
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_BREAKPOINT_BRIDGE_H
46 #define COMMON_BREAKPOINT_BRIDGE_H
47
48 #include <powervr/mem_types.h>
49
50 #include "img_types.h"
51 #include "pvrsrv_error.h"
52
53 #include "rgx_bridge.h"
54
55
56 #define PVRSRV_BRIDGE_BREAKPOINT_CMD_FIRST                      0
57 #define PVRSRV_BRIDGE_BREAKPOINT_RGXSETBREAKPOINT                       PVRSRV_BRIDGE_BREAKPOINT_CMD_FIRST+0
58 #define PVRSRV_BRIDGE_BREAKPOINT_RGXCLEARBREAKPOINT                     PVRSRV_BRIDGE_BREAKPOINT_CMD_FIRST+1
59 #define PVRSRV_BRIDGE_BREAKPOINT_RGXENABLEBREAKPOINT                    PVRSRV_BRIDGE_BREAKPOINT_CMD_FIRST+2
60 #define PVRSRV_BRIDGE_BREAKPOINT_RGXDISABLEBREAKPOINT                   PVRSRV_BRIDGE_BREAKPOINT_CMD_FIRST+3
61 #define PVRSRV_BRIDGE_BREAKPOINT_RGXOVERALLOCATEBPREGISTERS                     PVRSRV_BRIDGE_BREAKPOINT_CMD_FIRST+4
62 #define PVRSRV_BRIDGE_BREAKPOINT_CMD_LAST                       (PVRSRV_BRIDGE_BREAKPOINT_CMD_FIRST+4)
63
64
65 /*******************************************
66             RGXSetBreakpoint          
67  *******************************************/
68
69 /* Bridge in structure for RGXSetBreakpoint */
70 typedef struct PVRSRV_BRIDGE_IN_RGXSETBREAKPOINT_TAG
71 {
72         IMG_HANDLE hPrivData;
73         IMG_UINT32 eFWDataMaster;
74         IMG_UINT32 ui32BreakpointAddr;
75         IMG_UINT32 ui32HandlerAddr;
76         IMG_UINT32 ui32DM;
77 } __attribute__((packed)) PVRSRV_BRIDGE_IN_RGXSETBREAKPOINT;
78
79 /* Bridge out structure for RGXSetBreakpoint */
80 typedef struct PVRSRV_BRIDGE_OUT_RGXSETBREAKPOINT_TAG
81 {
82         PVRSRV_ERROR eError;
83 } __attribute__((packed)) PVRSRV_BRIDGE_OUT_RGXSETBREAKPOINT;
84
85
86 /*******************************************
87             RGXClearBreakpoint          
88  *******************************************/
89
90 /* Bridge in structure for RGXClearBreakpoint */
91 typedef struct PVRSRV_BRIDGE_IN_RGXCLEARBREAKPOINT_TAG
92 {
93         IMG_HANDLE hPrivData;
94 } __attribute__((packed)) PVRSRV_BRIDGE_IN_RGXCLEARBREAKPOINT;
95
96 /* Bridge out structure for RGXClearBreakpoint */
97 typedef struct PVRSRV_BRIDGE_OUT_RGXCLEARBREAKPOINT_TAG
98 {
99         PVRSRV_ERROR eError;
100 } __attribute__((packed)) PVRSRV_BRIDGE_OUT_RGXCLEARBREAKPOINT;
101
102
103 /*******************************************
104             RGXEnableBreakpoint          
105  *******************************************/
106
107 /* Bridge in structure for RGXEnableBreakpoint */
108 typedef struct PVRSRV_BRIDGE_IN_RGXENABLEBREAKPOINT_TAG
109 {
110         IMG_HANDLE hPrivData;
111 } __attribute__((packed)) PVRSRV_BRIDGE_IN_RGXENABLEBREAKPOINT;
112
113 /* Bridge out structure for RGXEnableBreakpoint */
114 typedef struct PVRSRV_BRIDGE_OUT_RGXENABLEBREAKPOINT_TAG
115 {
116         PVRSRV_ERROR eError;
117 } __attribute__((packed)) PVRSRV_BRIDGE_OUT_RGXENABLEBREAKPOINT;
118
119
120 /*******************************************
121             RGXDisableBreakpoint          
122  *******************************************/
123
124 /* Bridge in structure for RGXDisableBreakpoint */
125 typedef struct PVRSRV_BRIDGE_IN_RGXDISABLEBREAKPOINT_TAG
126 {
127         IMG_HANDLE hPrivData;
128 } __attribute__((packed)) PVRSRV_BRIDGE_IN_RGXDISABLEBREAKPOINT;
129
130 /* Bridge out structure for RGXDisableBreakpoint */
131 typedef struct PVRSRV_BRIDGE_OUT_RGXDISABLEBREAKPOINT_TAG
132 {
133         PVRSRV_ERROR eError;
134 } __attribute__((packed)) PVRSRV_BRIDGE_OUT_RGXDISABLEBREAKPOINT;
135
136
137 /*******************************************
138             RGXOverallocateBPRegisters          
139  *******************************************/
140
141 /* Bridge in structure for RGXOverallocateBPRegisters */
142 typedef struct PVRSRV_BRIDGE_IN_RGXOVERALLOCATEBPREGISTERS_TAG
143 {
144         IMG_UINT32 ui32TempRegs;
145         IMG_UINT32 ui32SharedRegs;
146 } __attribute__((packed)) PVRSRV_BRIDGE_IN_RGXOVERALLOCATEBPREGISTERS;
147
148 /* Bridge out structure for RGXOverallocateBPRegisters */
149 typedef struct PVRSRV_BRIDGE_OUT_RGXOVERALLOCATEBPREGISTERS_TAG
150 {
151         PVRSRV_ERROR eError;
152 } __attribute__((packed)) PVRSRV_BRIDGE_OUT_RGXOVERALLOCATEBPREGISTERS;
153
154
155 #endif /* COMMON_BREAKPOINT_BRIDGE_H */