RK3368 GPU version Rogue M 1.28
[firefly-linux-kernel-4.4.55.git] / drivers / gpu / rogue_m / services / server / include / pdump_km.h
1 /*************************************************************************/ /*!
2 @File
3 @Title          pdump functions
4 @Copyright      Copyright (c) Imagination Technologies Ltd. All Rights Reserved
5 @Description    Main APIs for pdump functions
6 @License        Dual MIT/GPLv2
7
8 The contents of this file are subject to the MIT license as set out below.
9
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:
16
17 The above copyright notice and this permission notice shall be included in
18 all copies or substantial portions of the Software.
19
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.
23
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.
31
32 This License is also included in this distribution in the file called
33 "MIT-COPYING".
34
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 */ /**************************************************************************/
43
44 #ifndef _PDUMP_KM_H_
45 #define _PDUMP_KM_H_
46
47 /* services/srvkm/include/ */
48 #include "device.h"
49
50 /* include/ */
51 #include "pvrsrv_error.h"
52 #include "services.h"
53
54
55 #if defined(__KERNEL__) && defined(ANDROID) && !defined(__GENKSYMS__)
56 #define __pvrsrv_defined_struct_enum__
57 #include <services_kernel_client.h>
58 #endif
59
60 #include "connection_server.h"
61 #include "sync_server.h"
62 /*
63  *      Pull in pdump flags from services include
64  */
65 #include "pdump.h"
66 #include "pdumpdefs.h"
67
68 /* Define this to enable the PDUMP_HERE trace in the server */
69 #undef PDUMP_TRACE
70
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)))
74 #else
75 #define PDUMP_HERE(a)   (void)(a);
76 #define PDUMP_HEREA(a)  (void)(a);
77 #endif
78
79 #define PDUMP_PD_UNIQUETAG      (IMG_HANDLE)0
80 #define PDUMP_PT_UNIQUETAG      (IMG_HANDLE)0
81
82
83 #if defined(PDUMP_DEBUG_OUTFILES)
84 /* counter increments each time debug write is called */
85 extern IMG_UINT32 g_ui32EveryLineCounter;
86 #endif
87
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);
90
91 /*! Macro used to record a panic in the PDump script stream */
92 #define PDUMP_PANIC(_type, _id, _msg) do \
93                 { PVRSRV_ERROR _eE;\
94                         _eE = PDumpPanic((PVRSRV_DEVICE_TYPE_ ## _type)<<16 | ((_type ## _PDUMP_PANIC_ ## _id)&0xFFFF), _msg, __FUNCTION__, __LINE__);\
95                         PVR_LOG_IF_ERROR(_eE, "PDumpPanic");\
96                 MSC_SUPPRESS_4127\
97                 } while (0)
98
99 #ifdef PDUMP
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);
107
108         IMG_VOID PDumpConnectionNotify(IMG_VOID);
109         void PDumpDisconnectionNotify(void);
110
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);
116
117         PVRSRV_ERROR PDumpSetDefaultCaptureParamsKM(IMG_UINT32 ui32Mode,
118                                                    IMG_UINT32 ui32Start,
119                                                    IMG_UINT32 ui32End,
120                                                    IMG_UINT32 ui32Interval,
121                                                    IMG_UINT32 ui32MaxParamFileSize);
122
123
124         PVRSRV_ERROR PDumpReg32(IMG_CHAR        *pszPDumpRegName,
125                                                         IMG_UINT32      ui32RegAddr,
126                                                         IMG_UINT32      ui32RegValue,
127                                                         IMG_UINT32      ui32Flags);
128
129         PVRSRV_ERROR PDumpReg64(IMG_CHAR        *pszPDumpRegName,
130                                                         IMG_UINT32      ui32RegAddr,
131                                                         IMG_UINT64      ui64RegValue,
132                                                         IMG_UINT32      ui32Flags);
133
134         PVRSRV_ERROR PDumpLDW(IMG_CHAR      *pcBuffer,
135                               IMG_CHAR      *pszDevSpaceName,
136                               IMG_UINT32    ui32OffsetBytes,
137                               IMG_UINT32    ui32NumLoadBytes,
138                               PDUMP_FLAGS_T uiPDumpFlags);
139
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);
146
147         PVRSRV_ERROR PDumpRegPolKM(IMG_CHAR                             *pszPDumpRegName,
148                                                            IMG_UINT32                   ui32RegAddr,
149                                                            IMG_UINT32                   ui32RegValue,
150                                                            IMG_UINT32                   ui32Mask,
151                                                            IMG_UINT32                   ui32Flags,
152                                                            PDUMP_POLL_OPERATOR  eOperator);
153
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,
162                                                                                   IMG_UINT32 ui32Size,
163                                                                                   PDUMP_PIXEL_FORMAT ePixelFormat,
164                                                                                   IMG_UINT32 ui32AddrMode,
165                                                                                   IMG_UINT32 ui32PDumpFlags);
166
167         IMG_IMPORT PVRSRV_ERROR PDumpReadRegKM(IMG_CHAR *pszPDumpRegName,
168                                                                                    IMG_CHAR *pszFileName,
169                                                                                    IMG_UINT32 ui32FileOffset,
170                                                                                    IMG_UINT32 ui32Address,
171                                                                                    IMG_UINT32 ui32Size,
172                                                                                    IMG_UINT32 ui32PDumpFlags);
173
174         PVRSRV_ERROR PDumpComment(IMG_CHAR* pszFormat, ...) IMG_FORMAT_PRINTF(1, 2);
175         PVRSRV_ERROR PDumpCommentWithFlags(IMG_UINT32   ui32Flags,
176                                                                            IMG_CHAR*    pszFormat,
177                                                                            ...) IMG_FORMAT_PRINTF(2, 3);
178
179         PVRSRV_ERROR PDumpPanic(IMG_UINT32      ui32PanicNo,
180                                                         IMG_CHAR*       pszPanicMsg,
181                                                         const IMG_CHAR* pszPPFunc,
182                                                         IMG_UINT32      ui32PPline);
183
184         PVRSRV_ERROR PDumpPDReg(PDUMP_MMU_ATTRIB *psMMUAttrib,
185                                                         IMG_UINT32      ui32Reg,
186                                                         IMG_UINT32      ui32dwData,
187                                                         IMG_HANDLE      hUniqueTag);
188         PVRSRV_ERROR PDumpPDRegWithFlags(PDUMP_MMU_ATTRIB *psMMUAttrib,
189                                                                          IMG_UINT32             ui32Reg,
190                                                                          IMG_UINT32             ui32Data,
191                                                                          IMG_UINT32             ui32Flags,
192                                                                          IMG_HANDLE             hUniqueTag);
193
194         IMG_BOOL PDumpIsLastCaptureFrameKM(IMG_VOID);
195
196         PVRSRV_ERROR PDumpIsCaptureFrameKM(IMG_BOOL *bIsCapturing);
197
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);
214
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);
221
222         PVRSRV_ERROR PDumpIDLWithFlags(IMG_UINT32 ui32Clocks, IMG_UINT32 ui32Flags);
223         PVRSRV_ERROR PDumpIDL(IMG_UINT32 ui32Clocks);
224
225         IMG_IMPORT PVRSRV_ERROR PDumpHWPerfCBKM(PVRSRV_DEVICE_IDENTIFIER *psDevId,
226                                                                                 IMG_CHAR                        *pszFileName,
227                                                                                 IMG_UINT32                      ui32FileOffset,
228                                                                                 IMG_DEV_VIRTADDR        sDevBaseAddr,
229                                                                                 IMG_UINT32                      ui32Size,
230                                                                                 IMG_UINT32                      ui32MMUContextID,
231                                                                                 IMG_UINT32                      ui32PDumpFlags);
232
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);
239
240         PVRSRV_ERROR PDumpTRG(IMG_CHAR *pszMemSpace,
241                               IMG_UINT32 ui32MMUCtxID,
242                               IMG_UINT32 ui32RegionID,
243                               IMG_BOOL bEnable,
244                               IMG_UINT64 ui64VAddr,
245                               IMG_UINT64 ui64LenBytes,
246                               IMG_UINT32 ui32XStride,
247                               IMG_UINT32 ui32Flags);
248
249         PVRSRV_ERROR PDumpCreateLockKM(IMG_VOID);
250         IMG_VOID PDumpDestroyLockKM(IMG_VOID);
251         IMG_VOID PDumpLockKM(IMG_VOID);
252         IMG_VOID PDumpUnlockKM(IMG_VOID);
253
254         /*
255             Process persistence common API for use by common
256             clients e.g. mmu and physmem.
257          */
258         IMG_BOOL PDumpIsPersistent(IMG_VOID);
259         PVRSRV_ERROR PDumpAddPersistantProcess(IMG_VOID);
260
261         PVRSRV_ERROR PDumpIfKM(IMG_CHAR         *pszPDumpCond);
262         PVRSRV_ERROR PDumpElseKM(IMG_CHAR       *pszPDumpCond);
263         PVRSRV_ERROR PDumpFiKM(IMG_CHAR         *pszPDumpCond);
264
265         IMG_VOID PDumpPowerTransitionStart(IMG_VOID);
266         IMG_VOID PDumpPowerTransitionEnd(IMG_VOID);
267         IMG_BOOL PDumpInPowerTransition(IMG_VOID);
268         IMG_BOOL PDumpIsDumpSuspended(IMG_VOID);
269
270         /*!
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
283          * @return      error
284          */
285         PVRSRV_ERROR PDumpWriteParameter(IMG_UINT8 *psui8Data, IMG_UINT32 ui32Size,
286                         IMG_UINT32 ui32Flags, IMG_UINT32* pui32FileOffset,
287                         IMG_CHAR* aszFilenameStr);
288
289         /*!
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.
295          */
296         IMG_BOOL PDumpWriteScript(IMG_HANDLE hString, IMG_UINT32 ui32Flags);
297
298     /*
299       PDumpWriteShiftedMaskedValue():
300
301       loads the "reference" address into an internal PDump register,
302       optionally shifts it right,
303       optionally shifts it left,
304       optionally masks it
305       then finally writes the computed value to the given destination address
306
307       i.e. it emits pdump language equivalent to this expression:
308
309       dest = ((&ref) >> SHRamount << SHLamount) & MASK
310     */
311 extern PVRSRV_ERROR
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,
320                              IMG_UINT32 uiMask,
321                              IMG_DEVMEM_SIZE_T uiWordSize,
322                              IMG_UINT32 uiPDumpFlags);
323
324     /*
325       PDumpWriteSymbAddress():
326
327       writes the address of the "reference" to the offset given
328     */
329 extern PVRSRV_ERROR
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);
339
340 /* Register the connection with the PDump subsystem */
341 extern PVRSRV_ERROR PDumpRegisterConnection(SYNC_CONNECTION_DATA *psSyncConnectionData,
342                                                                                         PDUMP_CONNECTION_DATA **ppsPDumpConnectionData);
343
344 /* Unregister the connection with the PDump subsystem */
345 extern IMG_VOID PDumpUnregisterConnection(PDUMP_CONNECTION_DATA *psPDumpConnectionData);
346
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,
350                                                                                                          IMG_PVOID hPrivData,
351                                                                                                          IMG_PVOID *ppvHandle);
352
353 /* Unregister notification of PDump Transition */
354 extern IMG_VOID PDumpUnregisterTransitionCallback(IMG_PVOID pvHandle);
355
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);
358    
359         #define PDUMP_LOCK                              PDumpLockKM
360         #define PDUMP_UNLOCK                    PDumpUnlockKM
361
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
385 #else
386         /*
387                 We should be clearer about which functions can be called
388                 across the bridge as this looks rather unblanced
389         */
390
391
392 #ifdef INLINE_IS_PRAGMA
393 #pragma inline(PDumpInitCommon)
394 #endif
395 static INLINE PVRSRV_ERROR
396 PDumpInitCommon(IMG_VOID)
397 {
398         return PVRSRV_OK;
399 }
400
401 #ifdef INLINE_IS_PRAGMA
402 #pragma inline(PDumpConnectionNotify)
403 #endif
404 static INLINE IMG_VOID
405 PDumpConnectionNotify(IMG_VOID)
406 {
407         return;
408 }
409
410 #ifdef INLINE_IS_PRAGMA
411 #pragma inline(PDumpDisconnectionNotify)
412 #endif
413 static INLINE void
414 PDumpDisconnectionNotify(void)
415 {
416         return;
417 }
418
419 #ifdef INLINE_IS_PRAGMA
420 #pragma inline(PDumpCreateLockKM)
421 #endif
422 static INLINE PVRSRV_ERROR
423 PDumpCreateLockKM(IMG_VOID)
424 {
425         return PVRSRV_OK;
426 }
427
428 #ifdef INLINE_IS_PRAGMA
429 #pragma inline(PDumpDestroyLockKM)
430 #endif
431 static INLINE IMG_VOID
432 PDumpDestroyLockKM(IMG_VOID)
433 {
434 }
435
436 #ifdef INLINE_IS_PRAGMA
437 #pragma inline(PDumpLockKM)
438 #endif
439 static INLINE IMG_VOID
440 PDumpLockKM(IMG_VOID)
441 {
442 }
443
444 #ifdef INLINE_IS_PRAGMA
445 #pragma inline(PDumpUnlockKM)
446 #endif
447 static INLINE IMG_VOID
448 PDumpUnlockKM(IMG_VOID)
449 {
450 }
451
452 #ifdef INLINE_IS_PRAGMA
453 #pragma inline(PDumpAddPersistantProcess)
454 #endif
455 static INLINE PVRSRV_ERROR
456 PDumpAddPersistantProcess(IMG_VOID)
457 {
458         return PVRSRV_OK;
459 }
460
461 #ifdef INLINE_IS_PRAGMA
462 #pragma inline(PDumpStartInitPhaseKM)
463 #endif
464 static INLINE PVRSRV_ERROR
465 PDumpStartInitPhaseKM(IMG_VOID)
466 {
467         return PVRSRV_OK;
468 }
469
470 #ifdef INLINE_IS_PRAGMA
471 #pragma inline(PDumpStopInitPhaseKM)
472 #endif
473 static INLINE PVRSRV_ERROR
474 PDumpStopInitPhaseKM(IMG_MODULE_ID eModuleID)
475 {
476         PVR_UNREFERENCED_PARAMETER(eModuleID);
477         return PVRSRV_OK;
478 }
479
480 #ifdef INLINE_IS_PRAGMA
481 #pragma inline(PDumpSetFrameKM)
482 #endif
483 static INLINE PVRSRV_ERROR
484 PDumpSetFrameKM(CONNECTION_DATA *psConnection, IMG_UINT32 ui32Frame)
485 {
486         PVR_UNREFERENCED_PARAMETER(psConnection);
487         PVR_UNREFERENCED_PARAMETER(ui32Frame);
488         return PVRSRV_OK;
489 }
490
491 #ifdef INLINE_IS_PRAGMA
492 #pragma inline(PDumpGetFrameKM)
493 #endif
494 static INLINE PVRSRV_ERROR
495 PDumpGetFrameKM(CONNECTION_DATA *psConnection, IMG_UINT32* pui32Frame)
496 {
497         PVR_UNREFERENCED_PARAMETER(psConnection);
498         PVR_UNREFERENCED_PARAMETER(pui32Frame);
499         return PVRSRV_OK;
500 }
501
502 #ifdef INLINE_IS_PRAGMA
503 #pragma inline(PDumpCommentKM)
504 #endif
505 static INLINE PVRSRV_ERROR
506 PDumpCommentKM(IMG_CHAR *pszComment, IMG_UINT32 ui32Flags)
507 {
508         PVR_UNREFERENCED_PARAMETER(pszComment);
509         PVR_UNREFERENCED_PARAMETER(ui32Flags);
510         return PVRSRV_OK;
511 }
512
513
514 #ifdef INLINE_IS_PRAGMA
515 #pragma inline(PDumpCommentKM)
516 #endif
517 static INLINE PVRSRV_ERROR
518 PDumpSetDefaultCaptureParamsKM(IMG_UINT32 ui32Mode,
519                               IMG_UINT32 ui32Start,
520                               IMG_UINT32 ui32End,
521                               IMG_UINT32 ui32Interval,
522                               IMG_UINT32 ui32MaxParamFileSize)
523 {
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);
529
530         return PVRSRV_OK;
531 }
532
533
534 #ifdef INLINE_IS_PRAGMA
535 #pragma inline(PDumpPanic)
536 #endif
537 static INLINE PVRSRV_ERROR
538 PDumpPanic(IMG_UINT32      ui32PanicNo,
539                    IMG_CHAR*       pszPanicMsg,
540                    const IMG_CHAR* pszPPFunc,
541                    IMG_UINT32      ui32PPline)
542 {
543         PVR_UNREFERENCED_PARAMETER(ui32PanicNo);
544         PVR_UNREFERENCED_PARAMETER(pszPanicMsg);
545         PVR_UNREFERENCED_PARAMETER(pszPPFunc);
546         PVR_UNREFERENCED_PARAMETER(ui32PPline);
547         return PVRSRV_OK;
548 }
549
550 #ifdef INLINE_IS_PRAGMA
551 #pragma inline(PDumpIsLastCaptureFrameKM)
552 #endif
553 static INLINE IMG_BOOL
554 PDumpIsLastCaptureFrameKM(IMG_VOID)
555 {
556         return IMG_FALSE;
557 }
558
559 #ifdef INLINE_IS_PRAGMA
560 #pragma inline(PDumpIsCaptureFrameKM)
561 #endif
562 static INLINE PVRSRV_ERROR
563 PDumpIsCaptureFrameKM(IMG_BOOL *bIsCapturing)
564 {
565         *bIsCapturing = IMG_FALSE;
566         return PVRSRV_OK;
567 }
568
569 #ifdef INLINE_IS_PRAGMA
570 #pragma inline(PDumpBitmapKM)
571 #endif
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,
581                                                                                   IMG_UINT32 ui32Size,
582                                                                                   PDUMP_PIXEL_FORMAT ePixelFormat,
583                                                                                   IMG_UINT32 ui32AddrMode,
584                                                                                   IMG_UINT32 ui32PDumpFlags)
585 {
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);
598         return PVRSRV_OK;
599 }
600
601 #ifdef INLINE_IS_PRAGMA
602 #pragma inline(PDumpRegisterConnection)
603 #endif
604 static INLINE PVRSRV_ERROR
605 PDumpRegisterConnection(SYNC_CONNECTION_DATA *psSyncConnectionData,
606                                                 PDUMP_CONNECTION_DATA **ppsPDumpConnectionData)
607 {
608         PVR_UNREFERENCED_PARAMETER(psSyncConnectionData);
609         PVR_UNREFERENCED_PARAMETER(ppsPDumpConnectionData);
610
611         return PVRSRV_OK;
612 }
613
614 #ifdef INLINE_IS_PRAGMA
615 #pragma inline(PDumpUnregisterConnection)
616 #endif
617 static INLINE
618 IMG_VOID PDumpUnregisterConnection(PDUMP_CONNECTION_DATA *psPDumpConnectionData)
619 {
620         PVR_UNREFERENCED_PARAMETER(psPDumpConnectionData);
621 }
622
623 #ifdef INLINE_IS_PRAGMA
624 #pragma inline(PDumpRegisterTransitionCallback)
625 #endif
626 static INLINE
627 PVRSRV_ERROR PDumpRegisterTransitionCallback(PDUMP_CONNECTION_DATA *psPDumpConnectionData,
628                                                                                           PFN_PDUMP_TRANSITION pfnCallback,
629                                                                                           IMG_PVOID hPrivData,
630                                                                                           IMG_PVOID *ppvHandle)
631 {
632         PVR_UNREFERENCED_PARAMETER(psPDumpConnectionData);
633         PVR_UNREFERENCED_PARAMETER(pfnCallback);
634         PVR_UNREFERENCED_PARAMETER(hPrivData);
635         PVR_UNREFERENCED_PARAMETER(ppvHandle);
636
637         return PVRSRV_OK;
638 }
639
640 #ifdef INLINE_IS_PRAGMA
641 #pragma inline(PDumpUnregisterTransitionCallback)
642 #endif
643 static INLINE
644 IMG_VOID PDumpUnregisterTransitionCallback(IMG_PVOID pvHandle)
645 {
646         PVR_UNREFERENCED_PARAMETER(pvHandle);
647 }
648
649 #ifdef INLINE_IS_PRAGMA
650 #pragma inline(PDumpTransition)
651 #endif
652 static INLINE
653 PVRSRV_ERROR PDumpTransition(PDUMP_CONNECTION_DATA *psPDumpConnectionData, IMG_BOOL bInto, IMG_BOOL bContinuous)
654 {
655         PVR_UNREFERENCED_PARAMETER(psPDumpConnectionData);
656         PVR_UNREFERENCED_PARAMETER(bInto);
657         PVR_UNREFERENCED_PARAMETER(bContinuous);
658         return PVRSRV_OK;
659 }
660
661         #if defined WIN32
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__) * ## /
693         #else
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...)
719
720                 #else
721                         #error Compiler not specified
722                 #endif
723         #endif
724 #endif
725
726
727 #endif /* _PDUMP_KM_H_ */
728
729 /******************************************************************************
730  End of file (pdump_km.h)
731 ******************************************************************************/