diff options
author | Hemant Hariyani <hemanthariyani@ti.com> | 2011-08-25 02:57:15 -0400 |
---|---|---|
committer | Paolo Pisati <paolo.pisati@canonical.com> | 2012-08-17 04:18:33 -0400 |
commit | 6e90775f610ab87bd86a79f189aca993e44b3bdf (patch) | |
tree | 3b44756d6a8e69dea6c0dbeb2244482b31d32ffc /drivers/gpu/pvr/resman.h | |
parent | 1d63da95fb8e073f94c3c63d82f91c49bb2bd08a (diff) |
SGX-KM Initial SGX driver integration for 2.6.35 kernel.
This is the first version of SGX driver integration to ensure UI
boot-up. Power management and hwmod modifications will be added
as patches.
Change-Id: If71e6cd651a53f4809e7b978b693cb7d1a89178d
Signed-off-by: Hemant Hariyani <hemanthariyani@ti.com>
Diffstat (limited to 'drivers/gpu/pvr/resman.h')
-rw-r--r-- | drivers/gpu/pvr/resman.h | 114 |
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) | ||
31 | extern "C" { | ||
32 | #endif | ||
33 | |||
34 | enum { | ||
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 | |||
76 | typedef PVRSRV_ERROR (*RESMAN_FREE_FN)(IMG_PVOID pvParam, IMG_UINT32 ui32Param); | ||
77 | |||
78 | typedef struct _RESMAN_ITEM_ *PRESMAN_ITEM; | ||
79 | typedef struct _RESMAN_CONTEXT_ *PRESMAN_CONTEXT; | ||
80 | |||
81 | PVRSRV_ERROR ResManInit(IMG_VOID); | ||
82 | IMG_VOID ResManDeInit(IMG_VOID); | ||
83 | |||
84 | PRESMAN_ITEM ResManRegisterRes(PRESMAN_CONTEXT hResManContext, | ||
85 | IMG_UINT32 ui32ResType, | ||
86 | IMG_PVOID pvParam, | ||
87 | IMG_UINT32 ui32Param, | ||
88 | RESMAN_FREE_FN pfnFreeResource); | ||
89 | |||
90 | PVRSRV_ERROR ResManFreeResByPtr(PRESMAN_ITEM psResItem); | ||
91 | |||
92 | PVRSRV_ERROR ResManFreeResByCriteria(PRESMAN_CONTEXT hResManContext, | ||
93 | IMG_UINT32 ui32SearchCriteria, | ||
94 | IMG_UINT32 ui32ResType, | ||
95 | IMG_PVOID pvParam, | ||
96 | IMG_UINT32 ui32Param); | ||
97 | |||
98 | PVRSRV_ERROR ResManDissociateRes(PRESMAN_ITEM psResItem, | ||
99 | PRESMAN_CONTEXT psNewResManContext); | ||
100 | |||
101 | PVRSRV_ERROR ResManFindResourceByPtr(PRESMAN_CONTEXT hResManContext, | ||
102 | PRESMAN_ITEM psItem); | ||
103 | |||
104 | PVRSRV_ERROR PVRSRVResManConnect(IMG_HANDLE hPerProc, | ||
105 | PRESMAN_CONTEXT *phResManContext); | ||
106 | IMG_VOID PVRSRVResManDisconnect(PRESMAN_CONTEXT hResManContext, | ||
107 | IMG_BOOL bKernelContext); | ||
108 | |||
109 | #if defined (__cplusplus) | ||
110 | } | ||
111 | #endif | ||
112 | |||
113 | #endif | ||
114 | |||