1 /**********************************************************************
3 * Copyright(c) 2008 Imagination Technologies Ltd. All rights reserved.
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.
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.
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.
18 * The full GNU General Public License is included in this distribution in
19 * the file called "COPYING".
21 * Contact Information:
22 * Imagination Technologies Ltd. <gpl-support@imgtec.com>
23 * Home Park Estate, Kings Langley, Herts, WD4 8LZ, UK
25 ******************************************************************************/
30 #define UPDATE_QUEUE_ROFF(psQueue, ui32Size) \
31 psQueue->ui32ReadOffset = (psQueue->ui32ReadOffset + ui32Size) \
32 & (psQueue->ui32QueueSize - 1);
34 struct COMMAND_COMPLETE_DATA {
39 struct PVRSRV_SYNC_OBJECT *psDstSync;
40 struct PVRSRV_SYNC_OBJECT *psSrcSync;
44 enum PVRSRV_ERROR PVRSRVProcessQueues(IMG_BOOL bFlush);
46 #if defined(__KERNEL__)
47 #include <linux/types.h>
48 off_t QueuePrintQueues(char *buffer, size_t size, off_t off);
51 enum PVRSRV_ERROR PVRSRVCreateCommandQueueKM(u32 ui32QueueSize,
52 struct PVRSRV_QUEUE_INFO **ppsQueueInfo);
53 enum PVRSRV_ERROR PVRSRVDestroyCommandQueueKM(
54 struct PVRSRV_QUEUE_INFO *psQueueInfo);
56 enum PVRSRV_ERROR PVRSRVInsertCommandKM(struct PVRSRV_QUEUE_INFO *psQueue,
57 struct PVRSRV_COMMAND **ppsCommand, u32 ui32DevIndex,
58 u16 CommandType, u32 ui32DstSyncCount,
59 struct PVRSRV_KERNEL_SYNC_INFO *apsDstSync[],
61 struct PVRSRV_KERNEL_SYNC_INFO *apsSrcSync[],
62 u32 ui32DataByteSize);
64 enum PVRSRV_ERROR PVRSRVGetQueueSpaceKM(struct PVRSRV_QUEUE_INFO *psQueue,
65 u32 ui32ParamSize, void **ppvSpace);
67 enum PVRSRV_ERROR PVRSRVSubmitCommandKM(struct PVRSRV_QUEUE_INFO *psQueue,
68 struct PVRSRV_COMMAND *psCommand);
70 void PVRSRVCommandCompleteKM(void *hCmdCookie, IMG_BOOL bScheduleMISR);
72 void PVRSRVCommandCompleteCallbacks(void);
74 enum PVRSRV_ERROR PVRSRVRegisterCmdProcListKM(u32 ui32DevIndex,
75 IMG_BOOL (**ppfnCmdProcList)(void *, u32, void *),
76 u32 ui32MaxSyncsPerCmd[][2], u32 ui32CmdCount);
77 enum PVRSRV_ERROR PVRSRVRemoveCmdProcListKM(u32 ui32DevIndex,