1 /*************************************************************************/ /*!
4 @Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
5 @Description Main APIs for pdump functions
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 */ /**************************************************************************/
47 /* services/srvkm/include/ */
51 #include "pvrsrv_error.h"
55 #if defined(__KERNEL__) && defined(ANDROID) && !defined(__GENKSYMS__)
56 #define __pvrsrv_defined_struct_enum__
57 #include <services_kernel_client.h>
60 #include "connection_server.h"
61 #include "sync_server.h"
63 * Pull in pdump flags from services include
66 #include "pdumpdefs.h"
68 /* Define this to enable the PDUMP_HERE trace in the server */
71 #if defined(PDUMP_TRACE)
72 #define PDUMP_HERE(a) if (ui32Flags & PDUMP_FLAGS_DEBUG) PVR_DPF((PVR_DBG_WARNING, "HERE %d", (a)))
73 #define PDUMP_HEREA(a) PVR_DPF((PVR_DBG_WARNING, "HERE ALWAYS %d", (a)))
75 #define PDUMP_HERE(a) (void)(a);
76 #define PDUMP_HEREA(a) (void)(a);
79 #define PDUMP_PD_UNIQUETAG (IMG_HANDLE)0
80 #define PDUMP_PT_UNIQUETAG (IMG_HANDLE)0
83 #if defined(PDUMP_DEBUG_OUTFILES)
84 /* counter increments each time debug write is called */
85 extern IMG_UINT32 g_ui32EveryLineCounter;
88 typedef struct _PDUMP_CONNECTION_DATA_ PDUMP_CONNECTION_DATA;
89 typedef PVRSRV_ERROR (*PFN_PDUMP_TRANSITION)(IMG_PVOID *pvData, IMG_BOOL bInto, IMG_BOOL bContinuous);
91 /*! Macro used to record a panic in the PDump script stream */
92 #define PDUMP_PANIC(_type, _id, _msg) do \
94 _eE = PDumpPanic((PVRSRV_DEVICE_TYPE_ ## _type)<<16 | ((_type ## _PDUMP_PANIC_ ## _id)&0xFFFF), _msg, __FUNCTION__, __LINE__);\
95 PVR_LOG_IF_ERROR(_eE, "PDumpPanic");\
100 /* Shared across pdump_x files */
101 PVRSRV_ERROR PDumpInitCommon(IMG_VOID);
102 IMG_VOID PDumpDeInitCommon(IMG_VOID);
103 IMG_BOOL PDumpReady(IMG_VOID);
104 IMG_VOID PDumpGetParameterZeroPageInfo(PDUMP_FILEOFFSET_T *puiZeroPageOffset,
105 IMG_SIZE_T *puiZeroPageSize,
106 const IMG_CHAR **ppszZeroPageFilename);
108 IMG_VOID PDumpConnectionNotify(IMG_VOID);
109 void PDumpDisconnectionNotify(void);
111 PVRSRV_ERROR PDumpStartInitPhaseKM(IMG_VOID);
112 PVRSRV_ERROR PDumpStopInitPhaseKM(IMG_MODULE_ID eModuleID);
113 PVRSRV_ERROR PDumpSetFrameKM(CONNECTION_DATA *psConnection, IMG_UINT32 ui32Frame);
114 PVRSRV_ERROR PDumpGetFrameKM(CONNECTION_DATA *psConnection, IMG_UINT32* pui32Frame);
115 PVRSRV_ERROR PDumpCommentKM(IMG_CHAR *pszComment, IMG_UINT32 ui32Flags);
117 PVRSRV_ERROR PDumpSetDefaultCaptureParamsKM(IMG_UINT32 ui32Mode,
118 IMG_UINT32 ui32Start,
120 IMG_UINT32 ui32Interval,
121 IMG_UINT32 ui32MaxParamFileSize);
124 PVRSRV_ERROR PDumpReg32(IMG_CHAR *pszPDumpRegName,
125 IMG_UINT32 ui32RegAddr,
126 IMG_UINT32 ui32RegValue,
127 IMG_UINT32 ui32Flags);
129 PVRSRV_ERROR PDumpReg64(IMG_CHAR *pszPDumpRegName,
130 IMG_UINT32 ui32RegAddr,
131 IMG_UINT64 ui64RegValue,
132 IMG_UINT32 ui32Flags);
134 PVRSRV_ERROR PDumpLDW(IMG_CHAR *pcBuffer,
135 IMG_CHAR *pszDevSpaceName,
136 IMG_UINT32 ui32OffsetBytes,
137 IMG_UINT32 ui32NumLoadBytes,
138 PDUMP_FLAGS_T uiPDumpFlags);
140 PVRSRV_ERROR PDumpSAW(IMG_CHAR *pszDevSpaceName,
141 IMG_UINT32 ui32HPOffsetBytes,
142 IMG_UINT32 ui32NumSaveBytes,
143 IMG_CHAR *pszOutfileName,
144 IMG_UINT32 ui32OutfileOffsetByte,
145 PDUMP_FLAGS_T uiPDumpFlags);
147 PVRSRV_ERROR PDumpRegPolKM(IMG_CHAR *pszPDumpRegName,
148 IMG_UINT32 ui32RegAddr,
149 IMG_UINT32 ui32RegValue,
151 IMG_UINT32 ui32Flags,
152 PDUMP_POLL_OPERATOR eOperator);
154 IMG_IMPORT PVRSRV_ERROR PDumpBitmapKM(PVRSRV_DEVICE_NODE *psDeviceNode,
155 IMG_CHAR *pszFileName,
156 IMG_UINT32 ui32FileOffset,
157 IMG_UINT32 ui32Width,
158 IMG_UINT32 ui32Height,
159 IMG_UINT32 ui32StrideInBytes,
160 IMG_DEV_VIRTADDR sDevBaseAddr,
161 IMG_UINT32 ui32MMUContextID,
163 PDUMP_PIXEL_FORMAT ePixelFormat,
164 IMG_UINT32 ui32AddrMode,
165 IMG_UINT32 ui32PDumpFlags);
167 IMG_IMPORT PVRSRV_ERROR PDumpReadRegKM(IMG_CHAR *pszPDumpRegName,
168 IMG_CHAR *pszFileName,
169 IMG_UINT32 ui32FileOffset,
170 IMG_UINT32 ui32Address,
172 IMG_UINT32 ui32PDumpFlags);
174 PVRSRV_ERROR PDumpComment(IMG_CHAR* pszFormat, ...) IMG_FORMAT_PRINTF(1, 2);
175 PVRSRV_ERROR PDumpCommentWithFlags(IMG_UINT32 ui32Flags,
177 ...) IMG_FORMAT_PRINTF(2, 3);
179 PVRSRV_ERROR PDumpPanic(IMG_UINT32 ui32PanicNo,
180 IMG_CHAR* pszPanicMsg,
181 const IMG_CHAR* pszPPFunc,
182 IMG_UINT32 ui32PPline);
184 PVRSRV_ERROR PDumpPDReg(PDUMP_MMU_ATTRIB *psMMUAttrib,
186 IMG_UINT32 ui32dwData,
187 IMG_HANDLE hUniqueTag);
188 PVRSRV_ERROR PDumpPDRegWithFlags(PDUMP_MMU_ATTRIB *psMMUAttrib,
191 IMG_UINT32 ui32Flags,
192 IMG_HANDLE hUniqueTag);
194 IMG_BOOL PDumpIsLastCaptureFrameKM(IMG_VOID);
196 PVRSRV_ERROR PDumpIsCaptureFrameKM(IMG_BOOL *bIsCapturing);
198 IMG_VOID PDumpMallocPagesPhys(PVRSRV_DEVICE_IDENTIFIER *psDevID,
199 IMG_UINT64 ui64DevVAddr,
200 IMG_PUINT32 pui32PhysPages,
201 IMG_UINT32 ui32NumPages,
202 IMG_HANDLE hUniqueTag);
203 PVRSRV_ERROR PDumpSetMMUContext(PVRSRV_DEVICE_TYPE eDeviceType,
204 IMG_CHAR *pszMemSpace,
205 IMG_UINT32 *pui32MMUContextID,
206 IMG_UINT32 ui32MMUType,
207 IMG_HANDLE hUniqueTag1,
208 IMG_HANDLE hOSMemHandle,
209 IMG_VOID *pvPDCPUAddr);
210 PVRSRV_ERROR PDumpClearMMUContext(PVRSRV_DEVICE_TYPE eDeviceType,
211 IMG_CHAR *pszMemSpace,
212 IMG_UINT32 ui32MMUContextID,
213 IMG_UINT32 ui32MMUType);
215 PVRSRV_ERROR PDumpRegRead32(IMG_CHAR *pszPDumpRegName,
216 const IMG_UINT32 dwRegOffset,
217 IMG_UINT32 ui32Flags);
218 PVRSRV_ERROR PDumpRegRead64(IMG_CHAR *pszPDumpRegName,
219 const IMG_UINT32 dwRegOffset,
220 IMG_UINT32 ui32Flags);
222 PVRSRV_ERROR PDumpIDLWithFlags(IMG_UINT32 ui32Clocks, IMG_UINT32 ui32Flags);
223 PVRSRV_ERROR PDumpIDL(IMG_UINT32 ui32Clocks);
225 IMG_IMPORT PVRSRV_ERROR PDumpHWPerfCBKM(PVRSRV_DEVICE_IDENTIFIER *psDevId,
226 IMG_CHAR *pszFileName,
227 IMG_UINT32 ui32FileOffset,
228 IMG_DEV_VIRTADDR sDevBaseAddr,
230 IMG_UINT32 ui32MMUContextID,
231 IMG_UINT32 ui32PDumpFlags);
233 PVRSRV_ERROR PDumpRegBasedCBP(IMG_CHAR *pszPDumpRegName,
234 IMG_UINT32 ui32RegOffset,
235 IMG_UINT32 ui32WPosVal,
236 IMG_UINT32 ui32PacketSize,
237 IMG_UINT32 ui32BufferSize,
238 IMG_UINT32 ui32Flags);
240 PVRSRV_ERROR PDumpTRG(IMG_CHAR *pszMemSpace,
241 IMG_UINT32 ui32MMUCtxID,
242 IMG_UINT32 ui32RegionID,
244 IMG_UINT64 ui64VAddr,
245 IMG_UINT64 ui64LenBytes,
246 IMG_UINT32 ui32XStride,
247 IMG_UINT32 ui32Flags);
249 PVRSRV_ERROR PDumpCreateLockKM(IMG_VOID);
250 IMG_VOID PDumpDestroyLockKM(IMG_VOID);
251 IMG_VOID PDumpLockKM(IMG_VOID);
252 IMG_VOID PDumpUnlockKM(IMG_VOID);
255 Process persistence common API for use by common
256 clients e.g. mmu and physmem.
258 IMG_BOOL PDumpIsPersistent(IMG_VOID);
259 PVRSRV_ERROR PDumpAddPersistantProcess(IMG_VOID);
261 PVRSRV_ERROR PDumpIfKM(IMG_CHAR *pszPDumpCond);
262 PVRSRV_ERROR PDumpElseKM(IMG_CHAR *pszPDumpCond);
263 PVRSRV_ERROR PDumpFiKM(IMG_CHAR *pszPDumpCond);
265 IMG_VOID PDumpPowerTransitionStart(IMG_VOID);
266 IMG_VOID PDumpPowerTransitionEnd(IMG_VOID);
267 IMG_BOOL PDumpInPowerTransition(IMG_VOID);
268 IMG_BOOL PDumpIsDumpSuspended(IMG_VOID);
271 * @name PDumpWriteParameter
272 * @brief General function for writing to PDump stream. Used
273 * mainly for memory dumps to parameter stream.
274 * Usually more convenient to use PDumpWriteScript below
275 * for the script stream.
276 * @param psui8Data - data to write
277 * @param ui32Size - size of write
278 * @param ui32Flags - PDump flags
279 * @param pui32FileOffset - on return contains the file offset to
280 * the start of the parameter data
281 * @param aszFilenameStr - pointer to at least a 20 char buffer to
282 * return the parameter filename
285 PVRSRV_ERROR PDumpWriteParameter(IMG_UINT8 *psui8Data, IMG_UINT32 ui32Size,
286 IMG_UINT32 ui32Flags, IMG_UINT32* pui32FileOffset,
287 IMG_CHAR* aszFilenameStr);
290 * @name PDumpWriteScript
291 * @brief Write an PDumpOS created string to the "script" output stream
292 * @param hString - PDump OS layer handle of string buffer to write
293 * @param ui32Flags - PDump flags
294 * @return IMG_TRUE on success.
296 IMG_BOOL PDumpWriteScript(IMG_HANDLE hString, IMG_UINT32 ui32Flags);
299 PDumpWriteShiftedMaskedValue():
301 loads the "reference" address into an internal PDump register,
302 optionally shifts it right,
303 optionally shifts it left,
305 then finally writes the computed value to the given destination address
307 i.e. it emits pdump language equivalent to this expression:
309 dest = ((&ref) >> SHRamount << SHLamount) & MASK
312 PDumpWriteShiftedMaskedValue(const IMG_CHAR *pszDestRegspaceName,
313 const IMG_CHAR *pszDestSymbolicName,
314 IMG_DEVMEM_OFFSET_T uiDestOffset,
315 const IMG_CHAR *pszRefRegspaceName,
316 const IMG_CHAR *pszRefSymbolicName,
317 IMG_DEVMEM_OFFSET_T uiRefOffset,
318 IMG_UINT32 uiSHRAmount,
319 IMG_UINT32 uiSHLAmount,
321 IMG_DEVMEM_SIZE_T uiWordSize,
322 IMG_UINT32 uiPDumpFlags);
325 PDumpWriteSymbAddress():
327 writes the address of the "reference" to the offset given
330 PDumpWriteSymbAddress(const IMG_CHAR *pszDestSpaceName,
331 IMG_DEVMEM_OFFSET_T uiDestOffset,
332 const IMG_CHAR *pszRefSymbolicName,
333 IMG_DEVMEM_OFFSET_T uiRefOffset,
334 const IMG_CHAR *pszPDumpDevName,
335 IMG_UINT32 ui32WordSize,
336 IMG_UINT32 ui32AlignShift,
337 IMG_UINT32 ui32Shift,
338 IMG_UINT32 uiPDumpFlags);
340 /* Register the connection with the PDump subsystem */
341 extern PVRSRV_ERROR PDumpRegisterConnection(SYNC_CONNECTION_DATA *psSyncConnectionData,
342 PDUMP_CONNECTION_DATA **ppsPDumpConnectionData);
344 /* Unregister the connection with the PDump subsystem */
345 extern IMG_VOID PDumpUnregisterConnection(PDUMP_CONNECTION_DATA *psPDumpConnectionData);
347 /* Register for notification of PDump Transition into/out of capture range */
348 extern PVRSRV_ERROR PDumpRegisterTransitionCallback(PDUMP_CONNECTION_DATA *psPDumpConnectionData,
349 PFN_PDUMP_TRANSITION pfnCallback,
351 IMG_PVOID *ppvHandle);
353 /* Unregister notification of PDump Transition */
354 extern IMG_VOID PDumpUnregisterTransitionCallback(IMG_PVOID pvHandle);
356 /* Notify PDump of a Transition into/out of capture range */
357 extern PVRSRV_ERROR PDumpTransition(PDUMP_CONNECTION_DATA *psPDumpConnectionData, IMG_BOOL bInto, IMG_BOOL bContinuous);
359 #define PDUMP_LOCK PDumpLockKM
360 #define PDUMP_UNLOCK PDumpUnlockKM
362 #define PDUMPINIT PDumpInitCommon
363 #define PDUMPDEINIT PDumpDeInitCommon
364 #define PDUMPREG32 PDumpReg32
365 #define PDUMPREG64 PDumpReg64
366 #define PDUMPREGREAD32 PDumpRegRead32
367 #define PDUMPREGREAD64 PDumpRegRead64
368 #define PDUMPCOMMENT PDumpComment
369 #define PDUMPCOMMENTWITHFLAGS PDumpCommentWithFlags
370 #define PDUMPREGPOL PDumpRegPolKM
371 #define PDUMPSETMMUCONTEXT PDumpSetMMUContext
372 #define PDUMPCLEARMMUCONTEXT PDumpClearMMUContext
373 #define PDUMPPDREG PDumpPDReg
374 #define PDUMPPDREGWITHFLAGS PDumpPDRegWithFlags
375 #define PDUMPREGBASEDCBP PDumpRegBasedCBP
376 #define PDUMPENDINITPHASE PDumpStopInitPhaseKM
377 #define PDUMPIDLWITHFLAGS PDumpIDLWithFlags
378 #define PDUMPIDL PDumpIDL
379 #define PDUMPPOWCMDSTART PDumpPowerTransitionStart
380 #define PDUMPPOWCMDEND PDumpPowerTransitionEnd
381 #define PDUMPPOWCMDINTRANS PDumpInPowerTransition
382 #define PDUMPIF PDumpIfKM
383 #define PDUMPELSE PDumpElseKM
384 #define PDUMPFI PDumpFiKM
387 We should be clearer about which functions can be called
388 across the bridge as this looks rather unblanced
392 #ifdef INLINE_IS_PRAGMA
393 #pragma inline(PDumpInitCommon)
395 static INLINE PVRSRV_ERROR
396 PDumpInitCommon(IMG_VOID)
401 #ifdef INLINE_IS_PRAGMA
402 #pragma inline(PDumpConnectionNotify)
404 static INLINE IMG_VOID
405 PDumpConnectionNotify(IMG_VOID)
410 #ifdef INLINE_IS_PRAGMA
411 #pragma inline(PDumpDisconnectionNotify)
414 PDumpDisconnectionNotify(void)
419 #ifdef INLINE_IS_PRAGMA
420 #pragma inline(PDumpCreateLockKM)
422 static INLINE PVRSRV_ERROR
423 PDumpCreateLockKM(IMG_VOID)
428 #ifdef INLINE_IS_PRAGMA
429 #pragma inline(PDumpDestroyLockKM)
431 static INLINE IMG_VOID
432 PDumpDestroyLockKM(IMG_VOID)
436 #ifdef INLINE_IS_PRAGMA
437 #pragma inline(PDumpLockKM)
439 static INLINE IMG_VOID
440 PDumpLockKM(IMG_VOID)
444 #ifdef INLINE_IS_PRAGMA
445 #pragma inline(PDumpUnlockKM)
447 static INLINE IMG_VOID
448 PDumpUnlockKM(IMG_VOID)
452 #ifdef INLINE_IS_PRAGMA
453 #pragma inline(PDumpAddPersistantProcess)
455 static INLINE PVRSRV_ERROR
456 PDumpAddPersistantProcess(IMG_VOID)
461 #ifdef INLINE_IS_PRAGMA
462 #pragma inline(PDumpStartInitPhaseKM)
464 static INLINE PVRSRV_ERROR
465 PDumpStartInitPhaseKM(IMG_VOID)
470 #ifdef INLINE_IS_PRAGMA
471 #pragma inline(PDumpStopInitPhaseKM)
473 static INLINE PVRSRV_ERROR
474 PDumpStopInitPhaseKM(IMG_MODULE_ID eModuleID)
476 PVR_UNREFERENCED_PARAMETER(eModuleID);
480 #ifdef INLINE_IS_PRAGMA
481 #pragma inline(PDumpSetFrameKM)
483 static INLINE PVRSRV_ERROR
484 PDumpSetFrameKM(CONNECTION_DATA *psConnection, IMG_UINT32 ui32Frame)
486 PVR_UNREFERENCED_PARAMETER(psConnection);
487 PVR_UNREFERENCED_PARAMETER(ui32Frame);
491 #ifdef INLINE_IS_PRAGMA
492 #pragma inline(PDumpGetFrameKM)
494 static INLINE PVRSRV_ERROR
495 PDumpGetFrameKM(CONNECTION_DATA *psConnection, IMG_UINT32* pui32Frame)
497 PVR_UNREFERENCED_PARAMETER(psConnection);
498 PVR_UNREFERENCED_PARAMETER(pui32Frame);
502 #ifdef INLINE_IS_PRAGMA
503 #pragma inline(PDumpCommentKM)
505 static INLINE PVRSRV_ERROR
506 PDumpCommentKM(IMG_CHAR *pszComment, IMG_UINT32 ui32Flags)
508 PVR_UNREFERENCED_PARAMETER(pszComment);
509 PVR_UNREFERENCED_PARAMETER(ui32Flags);
514 #ifdef INLINE_IS_PRAGMA
515 #pragma inline(PDumpCommentKM)
517 static INLINE PVRSRV_ERROR
518 PDumpSetDefaultCaptureParamsKM(IMG_UINT32 ui32Mode,
519 IMG_UINT32 ui32Start,
521 IMG_UINT32 ui32Interval,
522 IMG_UINT32 ui32MaxParamFileSize)
524 PVR_UNREFERENCED_PARAMETER(ui32Mode);
525 PVR_UNREFERENCED_PARAMETER(ui32Start);
526 PVR_UNREFERENCED_PARAMETER(ui32End);
527 PVR_UNREFERENCED_PARAMETER(ui32Interval);
528 PVR_UNREFERENCED_PARAMETER(ui32MaxParamFileSize);
534 #ifdef INLINE_IS_PRAGMA
535 #pragma inline(PDumpPanic)
537 static INLINE PVRSRV_ERROR
538 PDumpPanic(IMG_UINT32 ui32PanicNo,
539 IMG_CHAR* pszPanicMsg,
540 const IMG_CHAR* pszPPFunc,
541 IMG_UINT32 ui32PPline)
543 PVR_UNREFERENCED_PARAMETER(ui32PanicNo);
544 PVR_UNREFERENCED_PARAMETER(pszPanicMsg);
545 PVR_UNREFERENCED_PARAMETER(pszPPFunc);
546 PVR_UNREFERENCED_PARAMETER(ui32PPline);
550 #ifdef INLINE_IS_PRAGMA
551 #pragma inline(PDumpIsLastCaptureFrameKM)
553 static INLINE IMG_BOOL
554 PDumpIsLastCaptureFrameKM(IMG_VOID)
559 #ifdef INLINE_IS_PRAGMA
560 #pragma inline(PDumpIsCaptureFrameKM)
562 static INLINE PVRSRV_ERROR
563 PDumpIsCaptureFrameKM(IMG_BOOL *bIsCapturing)
565 *bIsCapturing = IMG_FALSE;
569 #ifdef INLINE_IS_PRAGMA
570 #pragma inline(PDumpBitmapKM)
572 static INLINE PVRSRV_ERROR
573 PDumpBitmapKM(PVRSRV_DEVICE_NODE *psDeviceNode,
574 IMG_CHAR *pszFileName,
575 IMG_UINT32 ui32FileOffset,
576 IMG_UINT32 ui32Width,
577 IMG_UINT32 ui32Height,
578 IMG_UINT32 ui32StrideInBytes,
579 IMG_DEV_VIRTADDR sDevBaseAddr,
580 IMG_UINT32 ui32MMUContextID,
582 PDUMP_PIXEL_FORMAT ePixelFormat,
583 IMG_UINT32 ui32AddrMode,
584 IMG_UINT32 ui32PDumpFlags)
586 PVR_UNREFERENCED_PARAMETER(psDeviceNode);
587 PVR_UNREFERENCED_PARAMETER(pszFileName);
588 PVR_UNREFERENCED_PARAMETER(ui32FileOffset);
589 PVR_UNREFERENCED_PARAMETER(ui32Width);
590 PVR_UNREFERENCED_PARAMETER(ui32Height);
591 PVR_UNREFERENCED_PARAMETER(ui32StrideInBytes);
592 PVR_UNREFERENCED_PARAMETER(sDevBaseAddr);
593 PVR_UNREFERENCED_PARAMETER(ui32MMUContextID);
594 PVR_UNREFERENCED_PARAMETER(ui32Size);
595 PVR_UNREFERENCED_PARAMETER(ePixelFormat);
596 PVR_UNREFERENCED_PARAMETER(ui32AddrMode);
597 PVR_UNREFERENCED_PARAMETER(ui32PDumpFlags);
601 #ifdef INLINE_IS_PRAGMA
602 #pragma inline(PDumpRegisterConnection)
604 static INLINE PVRSRV_ERROR
605 PDumpRegisterConnection(SYNC_CONNECTION_DATA *psSyncConnectionData,
606 PDUMP_CONNECTION_DATA **ppsPDumpConnectionData)
608 PVR_UNREFERENCED_PARAMETER(psSyncConnectionData);
609 PVR_UNREFERENCED_PARAMETER(ppsPDumpConnectionData);
614 #ifdef INLINE_IS_PRAGMA
615 #pragma inline(PDumpUnregisterConnection)
618 IMG_VOID PDumpUnregisterConnection(PDUMP_CONNECTION_DATA *psPDumpConnectionData)
620 PVR_UNREFERENCED_PARAMETER(psPDumpConnectionData);
623 #ifdef INLINE_IS_PRAGMA
624 #pragma inline(PDumpRegisterTransitionCallback)
627 PVRSRV_ERROR PDumpRegisterTransitionCallback(PDUMP_CONNECTION_DATA *psPDumpConnectionData,
628 PFN_PDUMP_TRANSITION pfnCallback,
630 IMG_PVOID *ppvHandle)
632 PVR_UNREFERENCED_PARAMETER(psPDumpConnectionData);
633 PVR_UNREFERENCED_PARAMETER(pfnCallback);
634 PVR_UNREFERENCED_PARAMETER(hPrivData);
635 PVR_UNREFERENCED_PARAMETER(ppvHandle);
640 #ifdef INLINE_IS_PRAGMA
641 #pragma inline(PDumpUnregisterTransitionCallback)
644 IMG_VOID PDumpUnregisterTransitionCallback(IMG_PVOID pvHandle)
646 PVR_UNREFERENCED_PARAMETER(pvHandle);
649 #ifdef INLINE_IS_PRAGMA
650 #pragma inline(PDumpTransition)
653 PVRSRV_ERROR PDumpTransition(PDUMP_CONNECTION_DATA *psPDumpConnectionData, IMG_BOOL bInto, IMG_BOOL bContinuous)
655 PVR_UNREFERENCED_PARAMETER(psPDumpConnectionData);
656 PVR_UNREFERENCED_PARAMETER(bInto);
657 PVR_UNREFERENCED_PARAMETER(bContinuous);
662 #define PDUMPINIT PDumpInitCommon
663 #define PDUMPDEINIT(...) / ## * PDUMPDEINIT(__VA_ARGS__) * ## /
664 #define PDUMPREG32(...) / ## * PDUMPREG32(__VA_ARGS__) * ## /
665 #define PDUMPREG64(...) / ## * PDUMPREG64(__VA_ARGS__) * ## /
666 #define PDUMPREGREAD32(...) / ## * PDUMPREGREAD32(__VA_ARGS__) * ## /
667 #define PDUMPREGREAD64(...) / ## * PDUMPREGREAD64(__VA_ARGS__) * ## /
668 #define PDUMPCOMMENT(...) / ## * PDUMPCOMMENT(__VA_ARGS__) * ## /
669 #define PDUMPREGPOL(...) / ## * PDUMPREGPOL(__VA_ARGS__) * ## /
670 #define PDUMPSETMMUCONTEXT(...) / ## * PDUMPSETMMUCONTEXT(__VA_ARGS__) * ## /
671 #define PDUMPCLEARMMUCONTEXT(...) / ## * PDUMPCLEARMMUCONTEXT(__VA_ARGS__) * ## /
672 #define PDUMPPDREG(...) / ## * PDUMPPDREG(__VA_ARGS__) * ## /
673 #define PDUMPPDREGWITHFLAGS(...) / ## * PDUMPPDREGWITHFLAGS(__VA_ARGS__) * ## /
674 #define PDUMPSYNC(...) / ## * PDUMPSYNC(__VA_ARGS__) * ## /
675 #define PDUMPCOPYTOMEM(...) / ## * PDUMPCOPYTOMEM(__VA_ARGS__) * ## /
676 #define PDUMPWRITE(...) / ## * PDUMPWRITE(__VA_ARGS__) * ## /
677 #define PDUMPCBP(...) / ## * PDUMPCBP(__VA_ARGS__) * ## /
678 #define PDUMPREGBASEDCBP(...) / ## * PDUMPREGBASEDCBP(__VA_ARGS__) * ## /
679 #define PDUMPCOMMENTWITHFLAGS(...) / ## * PDUMPCOMMENTWITHFLAGS(__VA_ARGS__) * ## /
680 #define PDUMPMALLOCPAGESPHYS(...) / ## * PDUMPMALLOCPAGESPHYS(__VA_ARGS__) * ## /
681 #define PDUMPENDINITPHASE(...) / ## * PDUMPENDINITPHASE(__VA_ARGS__) * ## /
682 #define PDUMPMSVDXREG(...) / ## * PDUMPMSVDXREG(__VA_ARGS__) * ## /
683 #define PDUMPMSVDXREGWRITE(...) / ## * PDUMPMSVDXREGWRITE(__VA_ARGS__) * ## /
684 #define PDUMPMSVDXREGREAD(...) / ## * PDUMPMSVDXREGREAD(__VA_ARGS__) * ## /
685 #define PDUMPMSVDXPOLEQ(...) / ## * PDUMPMSVDXPOLEQ(__VA_ARGS__) * ## /
686 #define PDUMPMSVDXPOL(...) / ## * PDUMPMSVDXPOL(__VA_ARGS__) * ## /
687 #define PDUMPIDLWITHFLAGS(...) / ## * PDUMPIDLWITHFLAGS(__VA_ARGS__) * ## /
688 #define PDUMPIDL(...) / ## * PDUMPIDL(__VA_ARGS__) * ## /
689 #define PDUMPPOWCMDSTART(...) / ## * PDUMPPOWCMDSTART(__VA_ARGS__) * ## /
690 #define PDUMPPOWCMDEND(...) / ## * PDUMPPOWCMDEND(__VA_ARGS__) * ## /
691 #define PDUMP_LOCK / ## * PDUMP_LOCK(__VA_ARGS__) * ## /
692 #define PDUMP_UNLOCK / ## * PDUMP_UNLOCK(__VA_ARGS__) * ## /
694 #if defined LINUX || defined GCC_IA32 || defined GCC_ARM || defined __QNXNTO__
695 #define PDUMPINIT PDumpInitCommon
696 #define PDUMPDEINIT(args...)
697 #define PDUMPREG32(args...)
698 #define PDUMPREG64(args...)
699 #define PDUMPREGREAD32(args...)
700 #define PDUMPREGREAD64(args...)
701 #define PDUMPCOMMENT(args...)
702 #define PDUMPREGPOL(args...)
703 #define PDUMPSETMMUCONTEXT(args...)
704 #define PDUMPCLEARMMUCONTEXT(args...)
705 #define PDUMPPDREG(args...)
706 #define PDUMPPDREGWITHFLAGS(args...)
707 #define PDUMPSYNC(args...)
708 #define PDUMPCOPYTOMEM(args...)
709 #define PDUMPWRITE(args...)
710 #define PDUMPREGBASEDCBP(args...)
711 #define PDUMPCOMMENTWITHFLAGS(args...)
712 #define PDUMPENDINITPHASE(args...)
713 #define PDUMPIDLWITHFLAGS(args...)
714 #define PDUMPIDL(args...)
715 #define PDUMPPOWCMDSTART(args...)
716 #define PDUMPPOWCMDEND(args...)
717 #define PDUMP_LOCK(args...)
718 #define PDUMP_UNLOCK(args...)
721 #error Compiler not specified
727 #endif /* _PDUMP_KM_H_ */
729 /******************************************************************************
730 End of file (pdump_km.h)
731 ******************************************************************************/