diff options
author | Tomi Valkeinen <tomi.valkeinen@nokia.com> | 2009-08-04 09:12:50 -0400 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@nokia.com> | 2009-12-09 05:12:44 -0500 |
commit | b39a982ddecf1d95ed96f8457c39d3ea11df93f6 (patch) | |
tree | 07d233ede4b49bddb2776ee013cbdf5621e7845b /include/linux/omapfb.h | |
parent | 3de7a1dc0c9d29b138713ecb85df4b6ca3af2ef3 (diff) |
OMAP: DSS2: omapfb driver
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Diffstat (limited to 'include/linux/omapfb.h')
-rw-r--r-- | include/linux/omapfb.h | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/include/linux/omapfb.h b/include/linux/omapfb.h index a8efa92c6c35..f46c40ac6d45 100644 --- a/include/linux/omapfb.h +++ b/include/linux/omapfb.h | |||
@@ -24,6 +24,7 @@ | |||
24 | #ifndef __LINUX_OMAPFB_H__ | 24 | #ifndef __LINUX_OMAPFB_H__ |
25 | #define __LINUX_OMAPFB_H__ | 25 | #define __LINUX_OMAPFB_H__ |
26 | 26 | ||
27 | #include <linux/fb.h> | ||
27 | #include <linux/ioctl.h> | 28 | #include <linux/ioctl.h> |
28 | #include <linux/types.h> | 29 | #include <linux/types.h> |
29 | 30 | ||
@@ -50,6 +51,12 @@ | |||
50 | #define OMAPFB_UPDATE_WINDOW OMAP_IOW(54, struct omapfb_update_window) | 51 | #define OMAPFB_UPDATE_WINDOW OMAP_IOW(54, struct omapfb_update_window) |
51 | #define OMAPFB_SETUP_MEM OMAP_IOW(55, struct omapfb_mem_info) | 52 | #define OMAPFB_SETUP_MEM OMAP_IOW(55, struct omapfb_mem_info) |
52 | #define OMAPFB_QUERY_MEM OMAP_IOW(56, struct omapfb_mem_info) | 53 | #define OMAPFB_QUERY_MEM OMAP_IOW(56, struct omapfb_mem_info) |
54 | #define OMAPFB_WAITFORVSYNC OMAP_IO(57) | ||
55 | #define OMAPFB_MEMORY_READ OMAP_IOR(58, struct omapfb_memory_read) | ||
56 | #define OMAPFB_GET_OVERLAY_COLORMODE OMAP_IOR(59, struct omapfb_ovl_colormode) | ||
57 | #define OMAPFB_WAITFORGO OMAP_IO(60) | ||
58 | #define OMAPFB_GET_VRAM_INFO OMAP_IOR(61, struct omapfb_vram_info) | ||
59 | #define OMAPFB_SET_TEARSYNC OMAP_IOW(62, struct omapfb_tearsync_info) | ||
53 | 60 | ||
54 | #define OMAPFB_CAPS_GENERIC_MASK 0x00000fff | 61 | #define OMAPFB_CAPS_GENERIC_MASK 0x00000fff |
55 | #define OMAPFB_CAPS_LCDC_MASK 0x00fff000 | 62 | #define OMAPFB_CAPS_LCDC_MASK 0x00fff000 |
@@ -87,6 +94,13 @@ enum omapfb_color_format { | |||
87 | OMAPFB_COLOR_CLUT_1BPP, | 94 | OMAPFB_COLOR_CLUT_1BPP, |
88 | OMAPFB_COLOR_RGB444, | 95 | OMAPFB_COLOR_RGB444, |
89 | OMAPFB_COLOR_YUY422, | 96 | OMAPFB_COLOR_YUY422, |
97 | |||
98 | OMAPFB_COLOR_ARGB16, | ||
99 | OMAPFB_COLOR_RGB24U, /* RGB24, 32-bit container */ | ||
100 | OMAPFB_COLOR_RGB24P, /* RGB24, 24-bit container */ | ||
101 | OMAPFB_COLOR_ARGB32, | ||
102 | OMAPFB_COLOR_RGBA32, | ||
103 | OMAPFB_COLOR_RGBX32, | ||
90 | }; | 104 | }; |
91 | 105 | ||
92 | struct omapfb_update_window { | 106 | struct omapfb_update_window { |
@@ -158,6 +172,40 @@ enum omapfb_update_mode { | |||
158 | OMAPFB_MANUAL_UPDATE | 172 | OMAPFB_MANUAL_UPDATE |
159 | }; | 173 | }; |
160 | 174 | ||
175 | struct omapfb_memory_read { | ||
176 | __u16 x; | ||
177 | __u16 y; | ||
178 | __u16 w; | ||
179 | __u16 h; | ||
180 | size_t buffer_size; | ||
181 | void __user *buffer; | ||
182 | }; | ||
183 | |||
184 | struct omapfb_ovl_colormode { | ||
185 | __u8 overlay_idx; | ||
186 | __u8 mode_idx; | ||
187 | __u32 bits_per_pixel; | ||
188 | __u32 nonstd; | ||
189 | struct fb_bitfield red; | ||
190 | struct fb_bitfield green; | ||
191 | struct fb_bitfield blue; | ||
192 | struct fb_bitfield transp; | ||
193 | }; | ||
194 | |||
195 | struct omapfb_vram_info { | ||
196 | __u32 total; | ||
197 | __u32 free; | ||
198 | __u32 largest_free_block; | ||
199 | __u32 reserved[5]; | ||
200 | }; | ||
201 | |||
202 | struct omapfb_tearsync_info { | ||
203 | __u8 enabled; | ||
204 | __u8 reserved1[3]; | ||
205 | __u16 line; | ||
206 | __u16 reserved2; | ||
207 | }; | ||
208 | |||
161 | #ifdef __KERNEL__ | 209 | #ifdef __KERNEL__ |
162 | 210 | ||
163 | #include <plat/board.h> | 211 | #include <plat/board.h> |
@@ -173,6 +221,11 @@ struct omapfb_mem_region { | |||
173 | void __iomem *vaddr; | 221 | void __iomem *vaddr; |
174 | unsigned long size; | 222 | unsigned long size; |
175 | u8 type; /* OMAPFB_PLANE_MEM_* */ | 223 | u8 type; /* OMAPFB_PLANE_MEM_* */ |
224 | enum omapfb_color_format format;/* OMAPFB_COLOR_* */ | ||
225 | unsigned format_used:1; /* Must be set when format is set. | ||
226 | * Needed b/c of the badly chosen 0 | ||
227 | * base for OMAPFB_COLOR_* values | ||
228 | */ | ||
176 | unsigned alloc:1; /* allocated by the driver */ | 229 | unsigned alloc:1; /* allocated by the driver */ |
177 | unsigned map:1; /* kernel mapped by the driver */ | 230 | unsigned map:1; /* kernel mapped by the driver */ |
178 | }; | 231 | }; |
@@ -189,6 +242,7 @@ struct omapfb_platform_data { | |||
189 | }; | 242 | }; |
190 | 243 | ||
191 | /* in arch/arm/plat-omap/fb.c */ | 244 | /* in arch/arm/plat-omap/fb.c */ |
245 | extern void omapfb_set_platform_data(struct omapfb_platform_data *data); | ||
192 | extern void omapfb_set_ctrl_platform_data(void *pdata); | 246 | extern void omapfb_set_ctrl_platform_data(void *pdata); |
193 | extern void omapfb_reserve_sdram(void); | 247 | extern void omapfb_reserve_sdram(void); |
194 | 248 | ||