aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/pvr/queue.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/pvr/queue.h')
-rw-r--r--drivers/gpu/pvr/queue.h114
1 files changed, 114 insertions, 0 deletions
diff --git a/drivers/gpu/pvr/queue.h b/drivers/gpu/pvr/queue.h
new file mode 100644
index 00000000000..06aa200140f
--- /dev/null
+++ b/drivers/gpu/pvr/queue.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 QUEUE_H
28#define QUEUE_H
29
30
31#if defined(__cplusplus)
32extern "C" {
33#endif
34
35#define UPDATE_QUEUE_ROFF(psQueue, ui32Size) \
36 (psQueue)->ui32ReadOffset = ((psQueue)->ui32ReadOffset + (ui32Size)) \
37 & ((psQueue)->ui32QueueSize - 1);
38
39 typedef struct _COMMAND_COMPLETE_DATA_
40 {
41 IMG_BOOL bInUse;
42
43 IMG_UINT32 ui32DstSyncCount;
44 IMG_UINT32 ui32SrcSyncCount;
45 PVRSRV_SYNC_OBJECT *psDstSync;
46 PVRSRV_SYNC_OBJECT *psSrcSync;
47 IMG_UINT32 ui32AllocSize;
48 }COMMAND_COMPLETE_DATA, *PCOMMAND_COMPLETE_DATA;
49
50#if !defined(USE_CODE)
51IMG_VOID QueueDumpDebugInfo(IMG_VOID);
52
53IMG_IMPORT
54PVRSRV_ERROR PVRSRVProcessQueues (IMG_UINT32 ui32CallerID,
55 IMG_BOOL bFlush);
56
57#if defined(__linux__) && defined(__KERNEL__)
58#include <linux/types.h>
59#include <linux/seq_file.h>
60off_t
61QueuePrintQueues (IMG_CHAR * buffer, size_t size, off_t off);
62
63void* ProcSeqOff2ElementQueue(struct seq_file * sfile, loff_t off);
64void ProcSeqShowQueue(struct seq_file *sfile,void* el);
65#endif
66
67
68IMG_IMPORT
69PVRSRV_ERROR IMG_CALLCONV PVRSRVCreateCommandQueueKM(IMG_SIZE_T ui32QueueSize,
70 PVRSRV_QUEUE_INFO **ppsQueueInfo);
71IMG_IMPORT
72PVRSRV_ERROR IMG_CALLCONV PVRSRVDestroyCommandQueueKM(PVRSRV_QUEUE_INFO *psQueueInfo);
73
74IMG_IMPORT
75PVRSRV_ERROR IMG_CALLCONV PVRSRVInsertCommandKM(PVRSRV_QUEUE_INFO *psQueue,
76 PVRSRV_COMMAND **ppsCommand,
77 IMG_UINT32 ui32DevIndex,
78 IMG_UINT16 CommandType,
79 IMG_UINT32 ui32DstSyncCount,
80 PVRSRV_KERNEL_SYNC_INFO *apsDstSync[],
81 IMG_UINT32 ui32SrcSyncCount,
82 PVRSRV_KERNEL_SYNC_INFO *apsSrcSync[],
83 IMG_SIZE_T ui32DataByteSize );
84
85IMG_IMPORT
86PVRSRV_ERROR IMG_CALLCONV PVRSRVGetQueueSpaceKM(PVRSRV_QUEUE_INFO *psQueue,
87 IMG_SIZE_T ui32ParamSize,
88 IMG_VOID **ppvSpace);
89
90IMG_IMPORT
91PVRSRV_ERROR IMG_CALLCONV PVRSRVSubmitCommandKM(PVRSRV_QUEUE_INFO *psQueue,
92 PVRSRV_COMMAND *psCommand);
93
94IMG_IMPORT
95IMG_VOID PVRSRVCommandCompleteKM(IMG_HANDLE hCmdCookie, IMG_BOOL bScheduleMISR);
96
97IMG_IMPORT
98PVRSRV_ERROR PVRSRVRegisterCmdProcListKM(IMG_UINT32 ui32DevIndex,
99 PFN_CMD_PROC *ppfnCmdProcList,
100 IMG_UINT32 ui32MaxSyncsPerCmd[][2],
101 IMG_UINT32 ui32CmdCount);
102IMG_IMPORT
103PVRSRV_ERROR PVRSRVRemoveCmdProcListKM(IMG_UINT32 ui32DevIndex,
104 IMG_UINT32 ui32CmdCount);
105
106#endif
107
108
109#if defined (__cplusplus)
110}
111#endif
112
113#endif
114