1 /*************************************************************************/ /*!
3 @Title Device specific utility routines declarations
4 @Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
5 @Description Inline functions/structures specific to RGX
6 @License Dual MIT/GPLv2
8 The contents of this file are subject to the MIT license as set out below.
10 Permission is hereby granted, free of charge, to any person obtaining a copy
11 of this software and associated documentation files (the "Software"), to deal
12 in the Software without restriction, including without limitation the rights
13 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14 copies of the Software, and to permit persons to whom the Software is
15 furnished to do so, subject to the following conditions:
17 The above copyright notice and this permission notice shall be included in
18 all copies or substantial portions of the Software.
20 Alternatively, the contents of this file may be used under the terms of
21 the GNU General Public License Version 2 ("GPL") in which case the provisions
22 of GPL are applicable instead of those above.
24 If you wish to allow use of your version of this file only under the terms of
25 GPL, and not to allow others to use your version of this file under the terms
26 of the MIT license, indicate your decision by deleting the provisions above
27 and replace them with the notice and other provisions required by GPL as set
28 out in the file called "GPL-COPYING" included in this distribution. If you do
29 not delete the provisions above, a recipient may use your version of this file
30 under the terms of either the MIT license or GPL.
32 This License is also included in this distribution in the file called
35 EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
36 PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
37 BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
38 PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
39 COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
40 IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
41 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
42 */ /**************************************************************************/
45 #include "rgxdevice.h"
47 #include "pvr_notifier.h"
51 ******************************************************************************
53 @Function RGXQueryAPMState
55 @Description Query the state of the APM configuration
57 @Input psDeviceNode : The device node
59 @Input pvPrivateData: Unused (required for AppHint callback)
61 @Output pui32State : The APM configuration state
65 ******************************************************************************/
66 PVRSRV_ERROR RGXQueryAPMState(const PVRSRV_DEVICE_NODE *psDeviceNode,
67 const void *pvPrivateData,
68 IMG_UINT32 *pui32State);
71 ******************************************************************************
73 @Function RGXSetAPMState
75 @Description Set the APM configuration state. Currently only 'OFF' is
78 @Input psDeviceNode : The device node
80 @Input pvPrivateData: Unused (required for AppHint callback)
82 @Input ui32State : The requested APM configuration state
86 ******************************************************************************/
87 PVRSRV_ERROR RGXSetAPMState(const PVRSRV_DEVICE_NODE *psDeviceNode,
88 const void *pvPrivateData,
89 IMG_UINT32 ui32State);
92 ******************************************************************************
94 @Function RGXQueryPdumpPanicEnable
96 @Description Get the PDump Panic Enable configuration state.
98 @Input psDeviceNode : The device node
100 @Input pvPrivateData: Unused (required for AppHint callback)
102 @Input pbEnabled : IMG_TRUE if PDump Panic is enabled
106 ******************************************************************************/
107 PVRSRV_ERROR RGXQueryPdumpPanicEnable(const PVRSRV_DEVICE_NODE *psDeviceNode,
108 const void *pvPrivateData,
109 IMG_BOOL *pbEnabled);
112 ******************************************************************************
114 @Function RGXSetPdumpPanicEnable
116 @Description Set the PDump Panic Enable flag
118 @Input psDeviceNode : The device node
120 @Input pvPrivateData: Unused (required for AppHint callback)
122 @Input bEnable : The requested configuration state
126 ******************************************************************************/
127 PVRSRV_ERROR RGXSetPdumpPanicEnable(const PVRSRV_DEVICE_NODE *psDeviceNode,
128 const void *pvPrivateData,
132 ******************************************************************************
134 @Function RGXGetDeviceFlags
136 @Description Get the device flags for a given device
138 @Input psDevInfo : The device descriptor query
140 @Output pui32DeviceFlags : The current state of the device flags
144 ******************************************************************************/
145 PVRSRV_ERROR RGXGetDeviceFlags(PVRSRV_RGXDEV_INFO *psDevInfo,
146 IMG_UINT32 *pui32DeviceFlags);
149 ******************************************************************************
151 @Function RGXSetDeviceFlags
153 @Description Set the device flags for a given device
155 @Input psDevInfo : The device descriptor to modify
157 @Input ui32Config : The device flags to modify
159 @Input bSetNotClear : Set or clear the specified flags
163 ******************************************************************************/
164 PVRSRV_ERROR RGXSetDeviceFlags(PVRSRV_RGXDEV_INFO *psDevInfo,
165 IMG_UINT32 ui32Config,
166 IMG_BOOL bSetNotClear);
169 ******************************************************************************
171 @Function RGXRunScript
173 @Description Execute the commands in the script
179 ******************************************************************************/
180 PVRSRV_ERROR RGXRunScript(PVRSRV_RGXDEV_INFO *psDevInfo,
181 RGX_INIT_COMMAND *psScript,
182 IMG_UINT32 ui32NumCommands,
183 IMG_UINT32 ui32PdumpFlags,
184 DUMPDEBUG_PRINTF_FUNC *pfnDumpDebugPrintf,
185 void *pvDumpDebugFile);
188 ******************************************************************************
190 @Function RGXStringifyKickTypeDM
192 @Description Gives the kick type DM name stringified
196 @Return Array containing the kick type DM name
198 ******************************************************************************/
199 const char* RGXStringifyKickTypeDM(RGX_KICK_TYPE_DM eKickTypeDM);
201 #define RGX_STRINGIFY_KICK_TYPE_DM_IF_SET(bitmask, eKickTypeDM) bitmask & eKickTypeDM ? RGXStringifyKickTypeDM(eKickTypeDM) : ""
202 /******************************************************************************
203 End of file (rgxutils.h)
204 ******************************************************************************/