aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/asm-arm/arch-omap/hwa742.h12
-rw-r--r--include/asm-arm/arch-omap/omapfb.h61
2 files changed, 63 insertions, 10 deletions
diff --git a/include/asm-arm/arch-omap/hwa742.h b/include/asm-arm/arch-omap/hwa742.h
new file mode 100644
index 000000000000..577f492f2d3c
--- /dev/null
+++ b/include/asm-arm/arch-omap/hwa742.h
@@ -0,0 +1,12 @@
1#ifndef _HWA742_H
2#define _HWA742_H
3
4struct hwa742_platform_data {
5 void (*power_up)(struct device *dev);
6 void (*power_down)(struct device *dev);
7 unsigned long (*get_clock_rate)(struct device *dev);
8
9 unsigned te_connected:1;
10};
11
12#endif
diff --git a/include/asm-arm/arch-omap/omapfb.h b/include/asm-arm/arch-omap/omapfb.h
index adf1d81f22d1..46d7a4f60854 100644
--- a/include/asm-arm/arch-omap/omapfb.h
+++ b/include/asm-arm/arch-omap/omapfb.h
@@ -38,30 +38,47 @@
38#define OMAPFB_SYNC_GFX OMAP_IO(37) 38#define OMAPFB_SYNC_GFX OMAP_IO(37)
39#define OMAPFB_VSYNC OMAP_IO(38) 39#define OMAPFB_VSYNC OMAP_IO(38)
40#define OMAPFB_SET_UPDATE_MODE OMAP_IOW(40, int) 40#define OMAPFB_SET_UPDATE_MODE OMAP_IOW(40, int)
41#define OMAPFB_UPDATE_WINDOW_OLD OMAP_IOW(41, struct omapfb_update_window_old) 41#define OMAPFB_GET_CAPS OMAP_IOR(42, struct omapfb_caps)
42#define OMAPFB_GET_UPDATE_MODE OMAP_IOW(43, int) 42#define OMAPFB_GET_UPDATE_MODE OMAP_IOW(43, int)
43#define OMAPFB_LCD_TEST OMAP_IOW(45, int) 43#define OMAPFB_LCD_TEST OMAP_IOW(45, int)
44#define OMAPFB_CTRL_TEST OMAP_IOW(46, int) 44#define OMAPFB_CTRL_TEST OMAP_IOW(46, int)
45#define OMAPFB_UPDATE_WINDOW OMAP_IOW(47, struct omapfb_update_window) 45#define OMAPFB_UPDATE_WINDOW_OLD OMAP_IOW(47, struct omapfb_update_window_old)
46#define OMAPFB_SET_COLOR_KEY OMAP_IOW(50, struct omapfb_color_key) 46#define OMAPFB_SET_COLOR_KEY OMAP_IOW(50, struct omapfb_color_key)
47#define OMAPFB_GET_COLOR_KEY OMAP_IOW(51, struct omapfb_color_key) 47#define OMAPFB_GET_COLOR_KEY OMAP_IOW(51, struct omapfb_color_key)
48#define OMAPFB_SETUP_PLANE OMAP_IOW(52, struct omapfb_plane_info) 48#define OMAPFB_SETUP_PLANE OMAP_IOW(52, struct omapfb_plane_info)
49#define OMAPFB_QUERY_PLANE OMAP_IOW(53, struct omapfb_plane_info) 49#define OMAPFB_QUERY_PLANE OMAP_IOW(53, struct omapfb_plane_info)
50#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_QUERY_MEM OMAP_IOW(56, struct omapfb_mem_info)
50 53
51#define OMAPFB_CAPS_GENERIC_MASK 0x00000fff 54#define OMAPFB_CAPS_GENERIC_MASK 0x00000fff
52#define OMAPFB_CAPS_LCDC_MASK 0x00fff000 55#define OMAPFB_CAPS_LCDC_MASK 0x00fff000
53#define OMAPFB_CAPS_PANEL_MASK 0xff000000 56#define OMAPFB_CAPS_PANEL_MASK 0xff000000
54 57
55#define OMAPFB_CAPS_MANUAL_UPDATE 0x00001000 58#define OMAPFB_CAPS_MANUAL_UPDATE 0x00001000
59#define OMAPFB_CAPS_TEARSYNC 0x00002000
60#define OMAPFB_CAPS_PLANE_RELOCATE_MEM 0x00004000
61#define OMAPFB_CAPS_PLANE_SCALE 0x00008000
62#define OMAPFB_CAPS_WINDOW_PIXEL_DOUBLE 0x00010000
63#define OMAPFB_CAPS_WINDOW_SCALE 0x00020000
64#define OMAPFB_CAPS_WINDOW_OVERLAY 0x00040000
56#define OMAPFB_CAPS_SET_BACKLIGHT 0x01000000 65#define OMAPFB_CAPS_SET_BACKLIGHT 0x01000000
57 66
58/* Values from DSP must map to lower 16-bits */ 67/* Values from DSP must map to lower 16-bits */
59#define OMAPFB_FORMAT_MASK 0x00ff 68#define OMAPFB_FORMAT_MASK 0x00ff
60#define OMAPFB_FORMAT_FLAG_DOUBLE 0x0100 69#define OMAPFB_FORMAT_FLAG_DOUBLE 0x0100
70#define OMAPFB_FORMAT_FLAG_TEARSYNC 0x0200
71#define OMAPFB_FORMAT_FLAG_FORCE_VSYNC 0x0400
72#define OMAPFB_FORMAT_FLAG_ENABLE_OVERLAY 0x0800
73#define OMAPFB_FORMAT_FLAG_DISABLE_OVERLAY 0x1000
61 74
62#define OMAPFB_EVENT_READY 1 75#define OMAPFB_EVENT_READY 1
63#define OMAPFB_EVENT_DISABLED 2 76#define OMAPFB_EVENT_DISABLED 2
64 77
78#define OMAPFB_MEMTYPE_SDRAM 0
79#define OMAPFB_MEMTYPE_SRAM 1
80#define OMAPFB_MEMTYPE_MAX 1
81
65enum omapfb_color_format { 82enum omapfb_color_format {
66 OMAPFB_COLOR_RGB565 = 0, 83 OMAPFB_COLOR_RGB565 = 0,
67 OMAPFB_COLOR_YUV422, 84 OMAPFB_COLOR_YUV422,
@@ -78,11 +95,15 @@ struct omapfb_update_window {
78 __u32 x, y; 95 __u32 x, y;
79 __u32 width, height; 96 __u32 width, height;
80 __u32 format; 97 __u32 format;
98 __u32 out_x, out_y;
99 __u32 out_width, out_height;
100 __u32 reserved[8];
81}; 101};
82 102
83struct omapfb_update_window_old { 103struct omapfb_update_window_old {
84 __u32 x, y; 104 __u32 x, y;
85 __u32 width, height; 105 __u32 width, height;
106 __u32 format;
86}; 107};
87 108
88enum omapfb_plane { 109enum omapfb_plane {
@@ -108,6 +129,18 @@ struct omapfb_plane_info {
108 __u32 reserved2[12]; 129 __u32 reserved2[12];
109}; 130};
110 131
132struct omapfb_mem_info {
133 __u32 size;
134 __u8 type;
135 __u8 reserved[3];
136};
137
138struct omapfb_caps {
139 __u32 ctrl;
140 __u32 plane_color;
141 __u32 wnd_color;
142};
143
111enum omapfb_color_key_type { 144enum omapfb_color_key_type {
112 OMAPFB_COLOR_KEY_DISABLED = 0, 145 OMAPFB_COLOR_KEY_DISABLED = 0,
113 OMAPFB_COLOR_KEY_GFX_DST, 146 OMAPFB_COLOR_KEY_GFX_DST,
@@ -191,8 +224,6 @@ struct lcd_panel {
191 int (*run_test) (struct lcd_panel *panel, int test_num); 224 int (*run_test) (struct lcd_panel *panel, int test_num);
192}; 225};
193 226
194struct omapfb_device;
195
196struct extif_timings { 227struct extif_timings {
197 int cs_on_time; 228 int cs_on_time;
198 int cs_off_time; 229 int cs_off_time;
@@ -216,6 +247,7 @@ struct lcd_ctrl_extif {
216 int (*init) (struct omapfb_device *fbdev); 247 int (*init) (struct omapfb_device *fbdev);
217 void (*cleanup) (void); 248 void (*cleanup) (void);
218 void (*get_clk_info) (u32 *clk_period, u32 *max_clk_div); 249 void (*get_clk_info) (u32 *clk_period, u32 *max_clk_div);
250 unsigned long (*get_max_tx_rate)(void);
219 int (*convert_timings) (struct extif_timings *timings); 251 int (*convert_timings) (struct extif_timings *timings);
220 void (*set_timings) (const struct extif_timings *timings); 252 void (*set_timings) (const struct extif_timings *timings);
221 void (*set_bits_per_cycle)(int bpc); 253 void (*set_bits_per_cycle)(int bpc);
@@ -224,6 +256,10 @@ struct lcd_ctrl_extif {
224 void (*write_data) (const void *buf, unsigned int len); 256 void (*write_data) (const void *buf, unsigned int len);
225 void (*transfer_area) (int width, int height, 257 void (*transfer_area) (int width, int height,
226 void (callback)(void * data), void *data); 258 void (callback)(void * data), void *data);
259 int (*setup_tearsync) (unsigned pin_cnt,
260 unsigned hs_pulse_time, unsigned vs_pulse_time,
261 int hs_pol_inv, int vs_pol_inv, int div);
262 int (*enable_tearsync) (int enable, unsigned line);
227 263
228 unsigned long max_transmit_size; 264 unsigned long max_transmit_size;
229}; 265};
@@ -242,7 +278,9 @@ struct omapfb_mem_region {
242 dma_addr_t paddr; 278 dma_addr_t paddr;
243 void *vaddr; 279 void *vaddr;
244 unsigned long size; 280 unsigned long size;
245 int alloc:1; 281 u8 type; /* OMAPFB_PLANE_MEM_* */
282 unsigned alloc:1; /* allocated by the driver */
283 unsigned map:1; /* kernel mapped by the driver */
246}; 284};
247 285
248struct omapfb_mem_desc { 286struct omapfb_mem_desc {
@@ -259,7 +297,7 @@ struct lcd_ctrl {
259 struct omapfb_mem_desc *req_md); 297 struct omapfb_mem_desc *req_md);
260 void (*cleanup) (void); 298 void (*cleanup) (void);
261 void (*bind_client) (struct omapfb_notifier_block *nb); 299 void (*bind_client) (struct omapfb_notifier_block *nb);
262 unsigned long (*get_caps) (void); 300 void (*get_caps) (int plane, struct omapfb_caps *caps);
263 int (*set_update_mode)(enum omapfb_update_mode mode); 301 int (*set_update_mode)(enum omapfb_update_mode mode);
264 enum omapfb_update_mode (*get_update_mode)(void); 302 enum omapfb_update_mode (*get_update_mode)(void);
265 int (*setup_plane) (int plane, int channel_out, 303 int (*setup_plane) (int plane, int channel_out,
@@ -267,6 +305,10 @@ struct lcd_ctrl {
267 int screen_width, 305 int screen_width,
268 int pos_x, int pos_y, int width, 306 int pos_x, int pos_y, int width,
269 int height, int color_mode); 307 int height, int color_mode);
308 int (*setup_mem) (int plane, size_t size,
309 int mem_type, unsigned long *paddr);
310 int (*mmap) (struct fb_info *info,
311 struct vm_area_struct *vma);
270 int (*set_scale) (int plane, 312 int (*set_scale) (int plane,
271 int orig_width, int orig_height, 313 int orig_width, int orig_height,
272 int out_width, int out_height); 314 int out_width, int out_height);
@@ -284,7 +326,6 @@ struct lcd_ctrl {
284 int update_hw_mem); 326 int update_hw_mem);
285 int (*set_color_key) (struct omapfb_color_key *ck); 327 int (*set_color_key) (struct omapfb_color_key *ck);
286 int (*get_color_key) (struct omapfb_color_key *ck); 328 int (*get_color_key) (struct omapfb_color_key *ck);
287
288}; 329};
289 330
290enum omapfb_state { 331enum omapfb_state {
@@ -315,6 +356,7 @@ struct omapfb_device {
315 struct lcd_ctrl_extif *ext_if; /* LCD ctrl external 356 struct lcd_ctrl_extif *ext_if; /* LCD ctrl external
316 interface */ 357 interface */
317 struct device *dev; 358 struct device *dev;
359 struct fb_var_screeninfo new_var; /* for mode changes */
318 360
319 struct omapfb_mem_desc mem_desc; 361 struct omapfb_mem_desc mem_desc;
320 struct fb_info *fb_info[OMAPFB_PLANE_NUM]; 362 struct fb_info *fb_info[OMAPFB_PLANE_NUM];
@@ -346,7 +388,6 @@ extern int omapfb_update_window_async(struct fb_info *fbi,
346 void *callback_data); 388 void *callback_data);
347 389
348/* in arch/arm/plat-omap/fb.c */ 390/* in arch/arm/plat-omap/fb.c */
349extern void omapfb_reserve_mem(void);
350extern void omapfb_set_ctrl_platform_data(void *pdata); 391extern void omapfb_set_ctrl_platform_data(void *pdata);
351 392
352#endif /* __KERNEL__ */ 393#endif /* __KERNEL__ */