diff options
Diffstat (limited to 'drivers/gpu/pvr/perproc.h')
-rw-r--r-- | drivers/gpu/pvr/perproc.h | 113 |
1 files changed, 113 insertions, 0 deletions
diff --git a/drivers/gpu/pvr/perproc.h b/drivers/gpu/pvr/perproc.h new file mode 100644 index 00000000000..0b7542b930f --- /dev/null +++ b/drivers/gpu/pvr/perproc.h | |||
@@ -0,0 +1,113 @@ | |||
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 __PERPROC_H__ | ||
28 | #define __PERPROC_H__ | ||
29 | |||
30 | #if defined (__cplusplus) | ||
31 | extern "C" { | ||
32 | #endif | ||
33 | |||
34 | #include "img_types.h" | ||
35 | #include "resman.h" | ||
36 | |||
37 | #include "handle.h" | ||
38 | |||
39 | typedef struct _PVRSRV_PER_PROCESS_DATA_ | ||
40 | { | ||
41 | IMG_UINT32 ui32PID; | ||
42 | IMG_HANDLE hBlockAlloc; | ||
43 | PRESMAN_CONTEXT hResManContext; | ||
44 | IMG_HANDLE hPerProcData; | ||
45 | PVRSRV_HANDLE_BASE *psHandleBase; | ||
46 | #if defined (PVR_SECURE_HANDLES) | ||
47 | |||
48 | IMG_BOOL bHandlesBatched; | ||
49 | #endif | ||
50 | IMG_UINT32 ui32RefCount; | ||
51 | |||
52 | |||
53 | IMG_BOOL bInitProcess; | ||
54 | #if defined(PDUMP) | ||
55 | |||
56 | IMG_BOOL bPDumpPersistent; | ||
57 | #endif | ||
58 | |||
59 | IMG_HANDLE hOsPrivateData; | ||
60 | } PVRSRV_PER_PROCESS_DATA; | ||
61 | |||
62 | PVRSRV_PER_PROCESS_DATA *PVRSRVPerProcessData(IMG_UINT32 ui32PID); | ||
63 | |||
64 | PVRSRV_ERROR PVRSRVPerProcessDataConnect(IMG_UINT32 ui32PID); | ||
65 | IMG_VOID PVRSRVPerProcessDataDisconnect(IMG_UINT32 ui32PID); | ||
66 | |||
67 | PVRSRV_ERROR PVRSRVPerProcessDataInit(IMG_VOID); | ||
68 | PVRSRV_ERROR PVRSRVPerProcessDataDeInit(IMG_VOID); | ||
69 | |||
70 | #ifdef INLINE_IS_PRAGMA | ||
71 | #pragma inline(PVRSRVFindPerProcessData) | ||
72 | #endif | ||
73 | static INLINE | ||
74 | PVRSRV_PER_PROCESS_DATA *PVRSRVFindPerProcessData(IMG_VOID) | ||
75 | { | ||
76 | return PVRSRVPerProcessData(OSGetCurrentProcessIDKM()); | ||
77 | } | ||
78 | |||
79 | |||
80 | #ifdef INLINE_IS_PRAGMA | ||
81 | #pragma inline(PVRSRVProcessPrivateData) | ||
82 | #endif | ||
83 | static INLINE | ||
84 | IMG_HANDLE PVRSRVProcessPrivateData(PVRSRV_PER_PROCESS_DATA *psPerProc) | ||
85 | { | ||
86 | return (psPerProc != IMG_NULL) ? psPerProc->hOsPrivateData : IMG_NULL; | ||
87 | } | ||
88 | |||
89 | |||
90 | #ifdef INLINE_IS_PRAGMA | ||
91 | #pragma inline(PVRSRVPerProcessPrivateData) | ||
92 | #endif | ||
93 | static INLINE | ||
94 | IMG_HANDLE PVRSRVPerProcessPrivateData(IMG_UINT32 ui32PID) | ||
95 | { | ||
96 | return PVRSRVProcessPrivateData(PVRSRVPerProcessData(ui32PID)); | ||
97 | } | ||
98 | |||
99 | #ifdef INLINE_IS_PRAGMA | ||
100 | #pragma inline(PVRSRVFindPerProcessPrivateData) | ||
101 | #endif | ||
102 | static INLINE | ||
103 | IMG_HANDLE PVRSRVFindPerProcessPrivateData(IMG_VOID) | ||
104 | { | ||
105 | return PVRSRVProcessPrivateData(PVRSRVFindPerProcessData()); | ||
106 | } | ||
107 | |||
108 | #if defined (__cplusplus) | ||
109 | } | ||
110 | #endif | ||
111 | |||
112 | #endif | ||
113 | |||