1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
|
/**********************************************************************
*
* Copyright (C) Imagination Technologies Ltd. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful but, except
* as otherwise stated in writing, without any warranty; without even the
* implied warranty of merchantability or fitness for a particular purpose.
* See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
*
* The full GNU General Public License is included in this distribution in
* the file called "COPYING".
*
* Contact Information:
* Imagination Technologies Ltd. <gpl-support@imgtec.com>
* Home Park Estate, Kings Langley, Herts, WD4 8LZ, UK
*
******************************************************************************/
#if !defined(__SGX_BRIDGE_KM_H__)
#define __SGX_BRIDGE_KM_H__
#include "sgxapi_km.h"
#include "sgxinfo.h"
#include "sgxinfokm.h"
#include "sgx_bridge.h"
#include "pvr_bridge.h"
#include "perproc.h"
#if defined (__cplusplus)
extern "C" {
#endif
IMG_IMPORT
#if defined (SUPPORT_SID_INTERFACE)
PVRSRV_ERROR SGXSubmitTransferKM(IMG_HANDLE hDevHandle, PVRSRV_TRANSFER_SGX_KICK_KM *psKick);
#else
PVRSRV_ERROR SGXSubmitTransferKM(IMG_HANDLE hDevHandle, PVRSRV_TRANSFER_SGX_KICK *psKick);
#endif
#if defined(SGX_FEATURE_2D_HARDWARE)
IMG_IMPORT
#if defined (SUPPORT_SID_INTERFACE)
PVRSRV_ERROR SGXSubmit2DKM(IMG_HANDLE hDevHandle, PVRSRV_2D_SGX_KICK_KM *psKick);
#else
PVRSRV_ERROR SGXSubmit2DKM(IMG_HANDLE hDevHandle, PVRSRV_2D_SGX_KICK *psKick);
#endif
#endif
IMG_IMPORT
PVRSRV_ERROR SGXDoKickKM(IMG_HANDLE hDevHandle,
#if defined (SUPPORT_SID_INTERFACE)
SGX_CCB_KICK_KM *psCCBKick);
#else
SGX_CCB_KICK *psCCBKick);
#endif
IMG_IMPORT
PVRSRV_ERROR SGXGetPhysPageAddrKM(IMG_HANDLE hDevMemHeap,
IMG_DEV_VIRTADDR sDevVAddr,
IMG_DEV_PHYADDR *pDevPAddr,
IMG_CPU_PHYADDR *pCpuPAddr);
IMG_IMPORT
PVRSRV_ERROR IMG_CALLCONV SGXGetMMUPDAddrKM(IMG_HANDLE hDevCookie,
IMG_HANDLE hDevMemContext,
IMG_DEV_PHYADDR *psPDDevPAddr);
IMG_IMPORT
PVRSRV_ERROR SGXGetClientInfoKM(IMG_HANDLE hDevCookie,
SGX_CLIENT_INFO* psClientInfo);
IMG_IMPORT
PVRSRV_ERROR SGXGetMiscInfoKM(PVRSRV_SGXDEV_INFO *psDevInfo,
SGX_MISC_INFO *psMiscInfo,
PVRSRV_DEVICE_NODE *psDeviceNode,
IMG_HANDLE hDevMemContext);
IMG_IMPORT
PVRSRV_ERROR SGXReadHWPerfCBKM(IMG_HANDLE hDevHandle,
IMG_UINT32 ui32ArraySize,
PVRSRV_SGX_HWPERF_CB_ENTRY *psHWPerfCBData,
IMG_UINT32 *pui32DataCount,
IMG_UINT32 *pui32ClockSpeed,
IMG_UINT32 *pui32HostTimeStamp);
IMG_IMPORT
PVRSRV_ERROR SGX2DQueryBlitsCompleteKM(PVRSRV_SGXDEV_INFO *psDevInfo,
PVRSRV_KERNEL_SYNC_INFO *psSyncInfo,
IMG_BOOL bWaitForComplete);
IMG_IMPORT
PVRSRV_ERROR SGXGetInfoForSrvinitKM(IMG_HANDLE hDevHandle,
#if defined (SUPPORT_SID_INTERFACE)
PVRSRV_HEAP_INFO_KM *pasHeapInfo,
IMG_DEV_PHYADDR *psPDDevPAddr);
#else
SGX_BRIDGE_INFO_FOR_SRVINIT *psInitInfo);
#endif
IMG_IMPORT
PVRSRV_ERROR DevInitSGXPart2KM(PVRSRV_PER_PROCESS_DATA *psPerProc,
IMG_HANDLE hDevHandle,
#if defined (SUPPORT_SID_INTERFACE)
SGX_BRIDGE_INIT_INFO_KM *psInitInfo);
#else
SGX_BRIDGE_INIT_INFO *psInitInfo);
#endif
IMG_IMPORT PVRSRV_ERROR
SGXFindSharedPBDescKM(PVRSRV_PER_PROCESS_DATA *psPerProc,
IMG_HANDLE hDevCookie,
IMG_BOOL bLockOnFailure,
IMG_UINT32 ui32TotalPBSize,
IMG_HANDLE *phSharedPBDesc,
PVRSRV_KERNEL_MEM_INFO **ppsSharedPBDescKernelMemInfo,
PVRSRV_KERNEL_MEM_INFO **ppsHWPBDescKernelMemInfo,
PVRSRV_KERNEL_MEM_INFO **ppsBlockKernelMemInfo,
PVRSRV_KERNEL_MEM_INFO **ppsHWBlockKernelMemInfo,
PVRSRV_KERNEL_MEM_INFO ***pppsSharedPBDescSubKernelMemInfos,
IMG_UINT32 *ui32SharedPBDescSubKernelMemInfosCount);
IMG_IMPORT PVRSRV_ERROR
SGXUnrefSharedPBDescKM(IMG_HANDLE hSharedPBDesc);
IMG_IMPORT PVRSRV_ERROR
SGXAddSharedPBDescKM(PVRSRV_PER_PROCESS_DATA *psPerProc,
IMG_HANDLE hDevCookie,
PVRSRV_KERNEL_MEM_INFO *psSharedPBDescKernelMemInfo,
PVRSRV_KERNEL_MEM_INFO *psHWPBDescKernelMemInfo,
PVRSRV_KERNEL_MEM_INFO *psBlockKernelMemInfo,
PVRSRV_KERNEL_MEM_INFO *psHWBlockKernelMemInfo,
IMG_UINT32 ui32TotalPBSize,
IMG_HANDLE *phSharedPBDesc,
PVRSRV_KERNEL_MEM_INFO **psSharedPBDescSubKernelMemInfos,
IMG_UINT32 ui32SharedPBDescSubKernelMemInfosCount,
IMG_DEV_VIRTADDR sHWPBDescDevVAddr);
IMG_IMPORT PVRSRV_ERROR
SGXGetInternalDevInfoKM(IMG_HANDLE hDevCookie,
#if defined (SUPPORT_SID_INTERFACE)
SGX_INTERNAL_DEVINFO_KM *psSGXInternalDevInfo);
#else
SGX_INTERNAL_DEVINFO *psSGXInternalDevInfo);
#endif
#if defined (__cplusplus)
}
#endif
#endif
|