diff options
Diffstat (limited to 'drivers/gpu/pvr/display/omap_sgx_displayclass.h')
-rw-r--r-- | drivers/gpu/pvr/display/omap_sgx_displayclass.h | 123 |
1 files changed, 123 insertions, 0 deletions
diff --git a/drivers/gpu/pvr/display/omap_sgx_displayclass.h b/drivers/gpu/pvr/display/omap_sgx_displayclass.h new file mode 100644 index 00000000000..e97c4addc5a --- /dev/null +++ b/drivers/gpu/pvr/display/omap_sgx_displayclass.h | |||
@@ -0,0 +1,123 @@ | |||
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 | ||
15 | * with 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 __OMAP_SGX_DISPLAYCLASS_H__ | ||
28 | #define __OMAP_SGX_DISPLAYCLASS_H__ | ||
29 | |||
30 | extern IMG_BOOL PVRGetDisplayClassJTable( | ||
31 | PVRSRV_DC_DISP2SRV_KMJTABLE *psJTable); | ||
32 | |||
33 | typedef void * OMAP_HANDLE; | ||
34 | |||
35 | enum OMAP_BOOL | ||
36 | { | ||
37 | OMAP_FALSE = 0, | ||
38 | OMAP_TRUE = 1, | ||
39 | }; | ||
40 | |||
41 | struct OMAP_DISP_BUFFER | ||
42 | { | ||
43 | unsigned long ulBufferSize; | ||
44 | IMG_SYS_PHYADDR sSysAddr; | ||
45 | IMG_CPU_VIRTADDR sCPUVAddr; | ||
46 | PVRSRV_SYNC_DATA *psSyncData; | ||
47 | struct OMAP_DISP_BUFFER *psNext; | ||
48 | struct omap_display_buffer *display_buffer; | ||
49 | }; | ||
50 | |||
51 | struct OMAP_DISP_FLIP_ITEM | ||
52 | { | ||
53 | OMAP_HANDLE hCmdComplete; | ||
54 | unsigned long ulSwapInterval; | ||
55 | enum OMAP_BOOL bValid; | ||
56 | enum OMAP_BOOL bFlipped; | ||
57 | enum OMAP_BOOL bCmdCompleted; | ||
58 | IMG_SYS_PHYADDR *sSysAddr; | ||
59 | struct omap_display_buffer *display_buffer; | ||
60 | }; | ||
61 | |||
62 | struct OMAP_DISP_SWAPCHAIN | ||
63 | { | ||
64 | unsigned long ulBufferCount; | ||
65 | struct OMAP_DISP_BUFFER *psBuffer; | ||
66 | struct OMAP_DISP_FLIP_ITEM *psFlipItems; | ||
67 | unsigned long ulInsertIndex; | ||
68 | unsigned long ulRemoveIndex; | ||
69 | PVRSRV_DC_DISP2SRV_KMJTABLE *psPVRJTable; | ||
70 | enum OMAP_BOOL bFlushCommands; | ||
71 | unsigned long ulSetFlushStateRefCount; | ||
72 | enum OMAP_BOOL bBlanked; | ||
73 | spinlock_t *psSwapChainLock; | ||
74 | void *pvDevInfo; | ||
75 | }; | ||
76 | |||
77 | struct OMAP_DISP_DEVINFO | ||
78 | { | ||
79 | unsigned long ulDeviceID; | ||
80 | struct OMAP_DISP_BUFFER sSystemBuffer; | ||
81 | PVRSRV_DC_DISP2SRV_KMJTABLE sPVRJTable; | ||
82 | PVRSRV_DC_SRV2DISP_KMJTABLE sDCJTable; | ||
83 | struct OMAP_DISP_SWAPCHAIN *psSwapChain; | ||
84 | enum OMAP_BOOL bFlushCommands; | ||
85 | enum OMAP_BOOL bDeviceSuspended; | ||
86 | struct mutex sSwapChainLockMutex; | ||
87 | IMG_DEV_VIRTADDR sDisplayDevVAddr; | ||
88 | DISPLAY_INFO sDisplayInfo; | ||
89 | DISPLAY_FORMAT sDisplayFormat; | ||
90 | DISPLAY_DIMS sDisplayDim; | ||
91 | struct workqueue_struct *sync_display_wq; | ||
92 | struct work_struct sync_display_work; | ||
93 | PVRSRV_PIXEL_FORMAT ePixelFormat; | ||
94 | struct omap_display_device *display; | ||
95 | }; | ||
96 | |||
97 | enum OMAP_ERROR | ||
98 | { | ||
99 | OMAP_OK = 0, | ||
100 | OMAP_ERROR_GENERIC = 1, | ||
101 | OMAP_ERROR_OUT_OF_MEMORY = 2, | ||
102 | OMAP_ERROR_TOO_FEW_BUFFERS = 3, | ||
103 | OMAP_ERROR_INVALID_PARAMS = 4, | ||
104 | OMAP_ERROR_INIT_FAILURE = 5, | ||
105 | OMAP_ERROR_CANT_REGISTER_CALLBACK = 6, | ||
106 | OMAP_ERROR_INVALID_DEVICE = 7, | ||
107 | OMAP_ERROR_DEVICE_REGISTER_FAILED = 8 | ||
108 | |||
109 | }; | ||
110 | |||
111 | #define DISPLAY_DEVICE_NAME "PowerVR OMAP Display Driver" | ||
112 | #define DRVNAME "omap_sgx_displayclass" | ||
113 | #define DEVNAME DRVNAME | ||
114 | #define DRIVER_PREFIX DRVNAME | ||
115 | |||
116 | #define DEBUG_PRINTK(format, ...) printk("DEBUG " DRIVER_PREFIX \ | ||
117 | " (%s %i): " format "\n", __func__, __LINE__, ## __VA_ARGS__) | ||
118 | #define WARNING_PRINTK(format, ...) printk("WARNING " DRIVER_PREFIX \ | ||
119 | " (%s %i): " format "\n", __func__, __LINE__, ## __VA_ARGS__) | ||
120 | #define ERROR_PRINTK(format, ...) printk("ERROR " DRIVER_PREFIX \ | ||
121 | " (%s %i): " format "\n", __func__, __LINE__, ## __VA_ARGS__) | ||
122 | |||
123 | #endif | ||