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 ******************************************************************************/
27 #if !defined(__KERNELDISPLAY_H__)
28 #define __KERNELDISPLAY_H__
30 #include <linux/module.h>
32 #define DC_FLIP_COMMAND 0
34 #define DC_STATE_NO_FLUSH_COMMANDS 0
35 #define DC_STATE_FLUSH_COMMANDS 1
37 struct PVRSRV_DC_SRV2DISP_KMJTABLE {
40 enum PVRSRV_ERROR (*pfnOpenDCDevice)(u32, void **,
41 struct PVRSRV_SYNC_DATA *);
42 enum PVRSRV_ERROR (*pfnCloseDCDevice)(void *);
43 enum PVRSRV_ERROR (*pfnEnumDCFormats)(void *, u32 *,
44 struct DISPLAY_FORMAT *);
45 enum PVRSRV_ERROR (*pfnEnumDCDims)(void *, struct DISPLAY_FORMAT *,
46 u32 *, struct DISPLAY_DIMS *);
47 enum PVRSRV_ERROR (*pfnGetDCSystemBuffer)(void *, void **);
48 enum PVRSRV_ERROR (*pfnGetDCInfo)(void *, struct DISPLAY_INFO *);
49 enum PVRSRV_ERROR (*pfnGetBufferAddr)(void *, void *,
50 struct IMG_SYS_PHYADDR **, u32 *,
51 void __iomem **, void **, IMG_BOOL *);
52 enum PVRSRV_ERROR (*pfnCreateDCSwapChain)(void *, u32,
53 struct DISPLAY_SURF_ATTRIBUTES *,
54 struct DISPLAY_SURF_ATTRIBUTES *,
55 u32, struct PVRSRV_SYNC_DATA **,
57 enum PVRSRV_ERROR (*pfnDestroyDCSwapChain)(void *, void *);
58 enum PVRSRV_ERROR (*pfnSetDCDstRect)(void *, void *, struct IMG_RECT *);
59 enum PVRSRV_ERROR (*pfnSetDCSrcRect)(void *, void *, struct IMG_RECT *);
60 enum PVRSRV_ERROR (*pfnSetDCDstColourKey)(void *, void *, u32);
61 enum PVRSRV_ERROR (*pfnSetDCSrcColourKey)(void *, void *, u32);
62 enum PVRSRV_ERROR (*pfnGetDCBuffers)(void *, void *, u32 *, void **);
63 void (*pfnSetDCState)(void *, u32);
66 struct PVRSRV_DC_DISP2SRV_KMJTABLE {
68 enum PVRSRV_ERROR (*pfnPVRSRVRegisterDCDevice)(
69 struct PVRSRV_DC_SRV2DISP_KMJTABLE*, u32 *);
70 enum PVRSRV_ERROR (*pfnPVRSRVRemoveDCDevice)(u32);
71 enum PVRSRV_ERROR (*pfnPVRSRVOEMFunction)(u32, void *, u32, void *,
73 enum PVRSRV_ERROR (*pfnPVRSRVRegisterCmdProcList)(u32,
74 IMG_BOOL (**)(void *, u32, void *), u32[][2],
76 enum PVRSRV_ERROR (*pfnPVRSRVRemoveCmdProcList)(u32, u32);
77 void (*pfnPVRSRVCmdComplete)(void *, IMG_BOOL);
78 enum PVRSRV_ERROR (*pfnPVRSRVRegisterSystemISRHandler)(
79 IMG_BOOL (*)(void *), void *, u32, u32);
80 enum PVRSRV_ERROR (*pfnPVRSRVRegisterPowerDevice)(u32,
81 enum PVRSRV_ERROR (*)(void *, enum PVR_POWER_STATE,
82 enum PVR_POWER_STATE),
83 enum PVRSRV_ERROR (*)(void *, enum PVR_POWER_STATE,
84 enum PVR_POWER_STATE),
85 enum PVRSRV_ERROR (*)(void *, IMG_BOOL,
86 enum PVR_POWER_STATE),
87 enum PVRSRV_ERROR (*)(void *, IMG_BOOL,
88 enum PVR_POWER_STATE),
89 void *, enum PVR_POWER_STATE, enum PVR_POWER_STATE);
92 struct DISPLAYCLASS_FLIP_COMMAND {
97 u32 ui32ClipRectCount;
98 struct IMG_RECT *psClipRect;
102 IMG_BOOL PVRGetDisplayClassJTable(struct PVRSRV_DC_DISP2SRV_KMJTABLE *psJTable);