diff options
Diffstat (limited to 'drivers/gpu/pvr/sgx/sgxutils.h')
-rw-r--r-- | drivers/gpu/pvr/sgx/sgxutils.h | 99 |
1 files changed, 99 insertions, 0 deletions
diff --git a/drivers/gpu/pvr/sgx/sgxutils.h b/drivers/gpu/pvr/sgx/sgxutils.h new file mode 100644 index 00000000000..bc4c0536795 --- /dev/null +++ b/drivers/gpu/pvr/sgx/sgxutils.h | |||
@@ -0,0 +1,99 @@ | |||
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 | #include "perproc.h" | ||
28 | #include "sgxinfokm.h" | ||
29 | |||
30 | #define CCB_OFFSET_IS_VALID(type, psCCBMemInfo, psCCBKick, offset) \ | ||
31 | ((sizeof(type) <= (psCCBMemInfo)->ui32AllocSize) && \ | ||
32 | ((psCCBKick)->offset <= (psCCBMemInfo)->ui32AllocSize - sizeof(type))) | ||
33 | |||
34 | #define CCB_DATA_FROM_OFFSET(type, psCCBMemInfo, psCCBKick, offset) \ | ||
35 | ((type *)(((IMG_CHAR *)(psCCBMemInfo)->pvLinAddrKM) + \ | ||
36 | (psCCBKick)->offset)) | ||
37 | |||
38 | |||
39 | IMG_IMPORT | ||
40 | IMG_VOID SGXTestActivePowerEvent(PVRSRV_DEVICE_NODE *psDeviceNode, | ||
41 | IMG_UINT32 ui32CallerID); | ||
42 | |||
43 | IMG_IMPORT | ||
44 | PVRSRV_ERROR SGXScheduleCCBCommand(PVRSRV_SGXDEV_INFO *psDevInfo, | ||
45 | SGXMKIF_CMD_TYPE eCommandType, | ||
46 | SGXMKIF_COMMAND *psCommandData, | ||
47 | IMG_UINT32 ui32CallerID, | ||
48 | IMG_UINT32 ui32PDumpFlags); | ||
49 | IMG_IMPORT | ||
50 | PVRSRV_ERROR SGXScheduleCCBCommandKM(PVRSRV_DEVICE_NODE *psDeviceNode, | ||
51 | SGXMKIF_CMD_TYPE eCommandType, | ||
52 | SGXMKIF_COMMAND *psCommandData, | ||
53 | IMG_UINT32 ui32CallerID, | ||
54 | IMG_UINT32 ui32PDumpFlags); | ||
55 | |||
56 | IMG_IMPORT | ||
57 | PVRSRV_ERROR SGXScheduleProcessQueuesKM(PVRSRV_DEVICE_NODE *psDeviceNode); | ||
58 | |||
59 | IMG_IMPORT | ||
60 | IMG_BOOL SGXIsDevicePowered(PVRSRV_DEVICE_NODE *psDeviceNode); | ||
61 | |||
62 | IMG_IMPORT | ||
63 | IMG_HANDLE SGXRegisterHWRenderContextKM(IMG_HANDLE psDeviceNode, | ||
64 | IMG_DEV_VIRTADDR *psHWRenderContextDevVAddr, | ||
65 | PVRSRV_PER_PROCESS_DATA *psPerProc); | ||
66 | |||
67 | IMG_IMPORT | ||
68 | IMG_HANDLE SGXRegisterHWTransferContextKM(IMG_HANDLE psDeviceNode, | ||
69 | IMG_DEV_VIRTADDR *psHWTransferContextDevVAddr, | ||
70 | PVRSRV_PER_PROCESS_DATA *psPerProc); | ||
71 | |||
72 | IMG_IMPORT | ||
73 | IMG_VOID SGXFlushHWRenderTargetKM(IMG_HANDLE psSGXDevInfo, IMG_DEV_VIRTADDR psHWRTDataSetDevVAddr); | ||
74 | |||
75 | IMG_IMPORT | ||
76 | PVRSRV_ERROR SGXUnregisterHWRenderContextKM(IMG_HANDLE hHWRenderContext); | ||
77 | |||
78 | IMG_IMPORT | ||
79 | PVRSRV_ERROR SGXUnregisterHWTransferContextKM(IMG_HANDLE hHWTransferContext); | ||
80 | |||
81 | #if defined(SGX_FEATURE_2D_HARDWARE) | ||
82 | IMG_IMPORT | ||
83 | IMG_HANDLE SGXRegisterHW2DContextKM(IMG_HANDLE psDeviceNode, | ||
84 | IMG_DEV_VIRTADDR *psHW2DContextDevVAddr, | ||
85 | PVRSRV_PER_PROCESS_DATA *psPerProc); | ||
86 | |||
87 | IMG_IMPORT | ||
88 | PVRSRV_ERROR SGXUnregisterHW2DContextKM(IMG_HANDLE hHW2DContext); | ||
89 | #endif | ||
90 | |||
91 | IMG_UINT32 SGXConvertTimeStamp(PVRSRV_SGXDEV_INFO *psDevInfo, | ||
92 | IMG_UINT32 ui32TimeWraps, | ||
93 | IMG_UINT32 ui32Time); | ||
94 | |||
95 | IMG_VOID SGXCleanupRequest(PVRSRV_DEVICE_NODE *psDeviceNode, | ||
96 | IMG_DEV_VIRTADDR *psHWDataDevVAddr, | ||
97 | IMG_UINT32 ui32CleanupType); | ||
98 | |||
99 | |||