aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/pvr/resman.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/pvr/resman.h')
-rw-r--r--drivers/gpu/pvr/resman.h114
1 files changed, 114 insertions, 0 deletions
diff --git a/drivers/gpu/pvr/resman.h b/drivers/gpu/pvr/resman.h
new file mode 100644
index 00000000000..eebec57c9d6
--- /dev/null
+++ b/drivers/gpu/pvr/resman.h
@@ -0,0 +1,114 @@
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 __RESMAN_H__
28#define __RESMAN_H__
29
30#if defined (__cplusplus)
31extern "C" {
32#endif
33
34enum {
35
36 RESMAN_TYPE_SHARED_PB_DESC = 1,
37 RESMAN_TYPE_SHARED_PB_DESC_CREATE_LOCK,
38 RESMAN_TYPE_HW_RENDER_CONTEXT,
39 RESMAN_TYPE_HW_TRANSFER_CONTEXT,
40 RESMAN_TYPE_HW_2D_CONTEXT,
41 RESMAN_TYPE_TRANSFER_CONTEXT,
42
43
44
45
46
47 RESMAN_TYPE_DISPLAYCLASS_SWAPCHAIN_REF,
48 RESMAN_TYPE_DISPLAYCLASS_DEVICE,
49
50
51 RESMAN_TYPE_BUFFERCLASS_DEVICE,
52
53
54 RESMAN_TYPE_OS_USERMODE_MAPPING,
55
56
57 RESMAN_TYPE_DEVICEMEM_CONTEXT,
58 RESMAN_TYPE_DEVICECLASSMEM_MAPPING,
59 RESMAN_TYPE_DEVICEMEM_MAPPING,
60 RESMAN_TYPE_DEVICEMEM_WRAP,
61 RESMAN_TYPE_DEVICEMEM_ALLOCATION,
62 RESMAN_TYPE_EVENT_OBJECT,
63 RESMAN_TYPE_SHARED_MEM_INFO,
64 RESMAN_TYPE_MODIFY_SYNC_OPS,
65 RESMAN_TYPE_SYNC_INFO,
66
67
68 RESMAN_TYPE_KERNEL_DEVICEMEM_ALLOCATION
69};
70
71#define RESMAN_CRITERIA_ALL 0x00000000
72#define RESMAN_CRITERIA_RESTYPE 0x00000001
73#define RESMAN_CRITERIA_PVOID_PARAM 0x00000002
74#define RESMAN_CRITERIA_UI32_PARAM 0x00000004
75
76typedef PVRSRV_ERROR (*RESMAN_FREE_FN)(IMG_PVOID pvParam, IMG_UINT32 ui32Param);
77
78typedef struct _RESMAN_ITEM_ *PRESMAN_ITEM;
79typedef struct _RESMAN_CONTEXT_ *PRESMAN_CONTEXT;
80
81PVRSRV_ERROR ResManInit(IMG_VOID);
82IMG_VOID ResManDeInit(IMG_VOID);
83
84PRESMAN_ITEM ResManRegisterRes(PRESMAN_CONTEXT hResManContext,
85 IMG_UINT32 ui32ResType,
86 IMG_PVOID pvParam,
87 IMG_UINT32 ui32Param,
88 RESMAN_FREE_FN pfnFreeResource);
89
90PVRSRV_ERROR ResManFreeResByPtr(PRESMAN_ITEM psResItem);
91
92PVRSRV_ERROR ResManFreeResByCriteria(PRESMAN_CONTEXT hResManContext,
93 IMG_UINT32 ui32SearchCriteria,
94 IMG_UINT32 ui32ResType,
95 IMG_PVOID pvParam,
96 IMG_UINT32 ui32Param);
97
98PVRSRV_ERROR ResManDissociateRes(PRESMAN_ITEM psResItem,
99 PRESMAN_CONTEXT psNewResManContext);
100
101PVRSRV_ERROR ResManFindResourceByPtr(PRESMAN_CONTEXT hResManContext,
102 PRESMAN_ITEM psItem);
103
104PVRSRV_ERROR PVRSRVResManConnect(IMG_HANDLE hPerProc,
105 PRESMAN_CONTEXT *phResManContext);
106IMG_VOID PVRSRVResManDisconnect(PRESMAN_CONTEXT hResManContext,
107 IMG_BOOL bKernelContext);
108
109#if defined (__cplusplus)
110}
111#endif
112
113#endif
114