aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/pvr/srvkm.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/pvr/srvkm.h')
-rw-r--r--drivers/gpu/pvr/srvkm.h78
1 files changed, 78 insertions, 0 deletions
diff --git a/drivers/gpu/pvr/srvkm.h b/drivers/gpu/pvr/srvkm.h
new file mode 100644
index 00000000000..44a1daa9700
--- /dev/null
+++ b/drivers/gpu/pvr/srvkm.h
@@ -0,0 +1,78 @@
1/**********************************************************************
2 *
3 * Copyright(c) 2008 Imagination Technologies Ltd. All rights reserved.
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms and conditions of the GNU General Public License,
7 * version 2, as published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope it will be useful but, except
10 * as otherwise stated in writing, without any warranty; without even the
11 * implied warranty of merchantability or fitness for a particular purpose.
12 * See the GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License along with
15 * this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
17 *
18 * The full GNU General Public License is included in this distribution in
19 * the file called "COPYING".
20 *
21 * Contact Information:
22 * Imagination Technologies Ltd. <gpl-support@imgtec.com>
23 * Home Park Estate, Kings Langley, Herts, WD4 8LZ, UK
24 *
25 ******************************************************************************/
26
27#ifndef SRVKM_H
28#define SRVKM_H
29
30
31#if defined(__cplusplus)
32extern "C" {
33#endif
34
35
36 #ifdef PVR_DISABLE_LOGGING
37 #define PVR_LOG(X)
38 #else
39
40 #define PVR_LOG(X) PVRSRVReleasePrintf X;
41 #endif
42
43 IMG_IMPORT IMG_VOID IMG_CALLCONV PVRSRVReleasePrintf(const IMG_CHAR *pszFormat, ...) IMG_FORMAT_PRINTF(1, 2);
44
45 IMG_IMPORT PVRSRV_ERROR IMG_CALLCONV PVRSRVProcessConnect(IMG_UINT32 ui32PID);
46 IMG_IMPORT IMG_VOID IMG_CALLCONV PVRSRVProcessDisconnect(IMG_UINT32 ui32PID);
47
48 IMG_IMPORT IMG_VOID PVRSRVScheduleDevicesKM(IMG_VOID);
49
50 IMG_VOID IMG_CALLCONV PVRSRVSetDCState(IMG_UINT32 ui32State);
51
52 PVRSRV_ERROR IMG_CALLCONV PVRSRVSaveRestoreLiveSegments(IMG_HANDLE hArena, IMG_PBYTE pbyBuffer, IMG_SIZE_T *puiBufSize, IMG_BOOL bSave);
53
54 IMG_VOID PVRSRVScheduleDeviceCallbacks(IMG_VOID);
55
56
57#if defined (__cplusplus)
58}
59#endif
60
61
62#define LOOP_UNTIL_TIMEOUT(TIMEOUT) \
63{\
64 IMG_UINT32 uiOffset, uiStart, uiCurrent; \
65 IMG_INT32 iNotLastLoop; \
66 for(uiOffset = 0, uiStart = OSClockus(), uiCurrent = uiStart + 1, iNotLastLoop = 1;\
67 ((uiCurrent - uiStart + uiOffset) < (TIMEOUT)) || iNotLastLoop--; \
68 uiCurrent = OSClockus(), \
69 uiOffset = uiCurrent < uiStart ? IMG_UINT32_MAX - uiStart : uiOffset, \
70 uiStart = uiCurrent < uiStart ? 0 : uiStart)
71
72#define END_LOOP_UNTIL_TIMEOUT() \
73}
74
75IMG_IMPORT
76const IMG_CHAR *PVRSRVGetErrorStringKM(PVRSRV_ERROR eError);
77
78#endif