gpu: pvr: pdumpfs: add stream_frames debugfs entry
[sgx.git] / pvr / sgx_bridge_km.h
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 #if !defined(__SGX_BRIDGE_KM_H__)
28 #define __SGX_BRIDGE_KM_H__
29
30 #include "sgxapi_km.h"
31 #include "sgxinfo.h"
32 #include "sgxinfokm.h"
33 #include "sgx_bridge.h"
34 #include "pvr_bridge.h"
35 #include "perproc.h"
36
37
38 enum PVRSRV_ERROR SGXSubmitTransferKM(void *hDevHandle,
39                 struct PVRSRV_TRANSFER_SGX_KICK *psKick);
40
41
42 enum PVRSRV_ERROR SGXDoKickKM(void *hDevHandle,
43                                   struct SGX_CCB_KICK *psCCBKick);
44
45 enum PVRSRV_ERROR SGXGetPhysPageAddrKM(void *hDevMemHeap,
46                 struct IMG_DEV_VIRTADDR sDevVAddr,
47                 struct IMG_DEV_PHYADDR *pDevPAddr,
48                 struct IMG_CPU_PHYADDR *pCpuPAddr);
49
50 enum PVRSRV_ERROR SGXGetMMUPDAddrKM(void *hDevCookie,
51                 void *hDevMemContext, struct IMG_DEV_PHYADDR *psPDDevPAddr);
52
53 enum PVRSRV_ERROR SGXGetClientInfoKM(void *hDevCookie,
54                                          struct SGX_CLIENT_INFO *psClientInfo);
55
56 enum PVRSRV_ERROR SGXGetMiscInfoKM(struct PVRSRV_SGXDEV_INFO *psDevInfo,
57                                        struct SGX_MISC_INFO *psMiscInfo,
58                                        struct PVRSRV_DEVICE_NODE *psDeviceNode);
59
60 enum PVRSRV_ERROR SGXReadDiffCountersKM(void *hDevHandle, u32 ui32Reg,
61                             u32 *pui32Old, IMG_BOOL bNew, u32 ui32New,
62                             u32 ui32NewReset, u32 ui32CountersReg,
63                             u32 *pui32Time, IMG_BOOL *pbActive,
64                             struct PVRSRV_SGXDEV_DIFF_INFO *psDiffs);
65 enum PVRSRV_ERROR SGXReadHWPerfCBKM(void *hDevHandle, u32 ui32ArraySize,
66                             struct PVRSRV_SGX_HWPERF_CB_ENTRY *psHWPerfCBData,
67                             u32 *pui32DataCount, u32 *pui32ClockSpeed,
68                             u32 *pui32HostTimeStamp);
69
70 enum PVRSRV_ERROR SGX2DQueryBlitsCompleteKM(
71                             struct PVRSRV_SGXDEV_INFO *psDevInfo,
72                             struct PVRSRV_KERNEL_SYNC_INFO *psSyncInfo,
73                             IMG_BOOL bWaitForComplete);
74
75 enum PVRSRV_ERROR SGXGetInfoForSrvinitKM(void *hDevHandle,
76                             struct SGX_BRIDGE_INFO_FOR_SRVINIT *psInitInfo);
77
78 enum PVRSRV_ERROR DevInitSGXPart2KM(struct PVRSRV_PER_PROCESS_DATA *psPerProc,
79                             void *hDevHandle,
80                             struct SGX_BRIDGE_INIT_INFO *psInitInfo);
81
82 enum PVRSRV_ERROR SGXFindSharedPBDescKM(
83         struct PVRSRV_PER_PROCESS_DATA *psPerProc,
84         void *hDevCookie, IMG_BOOL bLockOnFailure, u32 ui32TotalPBSize,
85         void **phSharedPBDesc,
86         struct PVRSRV_KERNEL_MEM_INFO **ppsSharedPBDescKernelMemInfo,
87         struct PVRSRV_KERNEL_MEM_INFO **ppsHWPBDescKernelMemInfo,
88         struct PVRSRV_KERNEL_MEM_INFO **ppsBlockKernelMemInfo,
89         struct PVRSRV_KERNEL_MEM_INFO ***pppsSharedPBDescSubKernelMemInfos,
90         u32 *ui32SharedPBDescSubKernelMemInfosCount);
91
92 enum PVRSRV_ERROR SGXUnrefSharedPBDescKM(void *hSharedPBDesc);
93
94 enum PVRSRV_ERROR SGXAddSharedPBDescKM(
95                 struct PVRSRV_PER_PROCESS_DATA *psPerProc,
96                 void *hDevCookie,
97                 struct PVRSRV_KERNEL_MEM_INFO *psSharedPBDescKernelMemInfo,
98                 struct PVRSRV_KERNEL_MEM_INFO *psHWPBDescKernelMemInfo,
99                 struct PVRSRV_KERNEL_MEM_INFO *psBlockKernelMemInfo,
100                 u32 ui32TotalPBSize, void **phSharedPBDesc,
101                 struct PVRSRV_KERNEL_MEM_INFO **psSharedPBDescSubKernelMemInfos,
102                 u32 ui32SharedPBDescSubKernelMemInfosCount);
103
104 enum PVRSRV_ERROR SGXGetInternalDevInfoKM(void *hDevCookie,
105                         struct SGX_INTERNAL_DEVINFO *psSGXInternalDevInfo);
106
107 int sgx_force_reset(void);
108
109 IMG_BOOL isSGXPerfServerActive(void);
110 void       SGXPerfServerMonitor(u32 u32TimeStamp);
111
112 #endif