diff options
author | Florian Tobias Schandinat <FlorianSchandinat@gmx.de> | 2011-10-14 20:19:52 -0400 |
---|---|---|
committer | Florian Tobias Schandinat <FlorianSchandinat@gmx.de> | 2011-10-14 20:19:52 -0400 |
commit | ef26b7943c5821aaff1efc14c098840c49fe15c0 (patch) | |
tree | a91834ef396633c5c56a0597c2fc525e0684fc30 /include/video | |
parent | 07aaae44f5a3962c3a410a6dd7936dfa7dece2b9 (diff) | |
parent | 3e28189038bb831512cf4f8313e1aead97c3e63f (diff) |
Merge branch 'for-florian' of git://gitorious.org/linux-omap-dss2/linux into fbdev-next
Diffstat (limited to 'include/video')
-rw-r--r-- | include/video/omap-panel-dvi.h | 37 | ||||
-rw-r--r-- | include/video/omap-panel-n8x0.h | 15 | ||||
-rw-r--r-- | include/video/omap-panel-nokia-dsi.h | 8 | ||||
-rw-r--r-- | include/video/omap-panel-picodlp.h | 23 | ||||
-rw-r--r-- | include/video/omapdss.h | 100 |
5 files changed, 163 insertions, 20 deletions
diff --git a/include/video/omap-panel-dvi.h b/include/video/omap-panel-dvi.h new file mode 100644 index 000000000000..87ad567b4229 --- /dev/null +++ b/include/video/omap-panel-dvi.h | |||
@@ -0,0 +1,37 @@ | |||
1 | /* | ||
2 | * Header for DVI output driver | ||
3 | * | ||
4 | * Copyright (C) 2011 Texas Instruments Inc | ||
5 | * Author: Tomi Valkeinen <tomi.valkeinen@ti.com> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it | ||
8 | * under the terms of the GNU General Public License version 2 as published by | ||
9 | * the Free Software Foundation. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, but WITHOUT | ||
12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
14 | * more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License along with | ||
17 | * this program. If not, see <http://www.gnu.org/licenses/>. | ||
18 | */ | ||
19 | |||
20 | #ifndef __OMAP_PANEL_DVI_H | ||
21 | #define __OMAP_PANEL_DVI_H | ||
22 | |||
23 | struct omap_dss_device; | ||
24 | |||
25 | /** | ||
26 | * struct panel_dvi_platform_data - panel driver configuration data | ||
27 | * @platform_enable: platform specific panel enable function | ||
28 | * @platform_disable: platform specific panel disable function | ||
29 | * @i2c_bus_num: i2c bus id for the panel | ||
30 | */ | ||
31 | struct panel_dvi_platform_data { | ||
32 | int (*platform_enable)(struct omap_dss_device *dssdev); | ||
33 | void (*platform_disable)(struct omap_dss_device *dssdev); | ||
34 | u16 i2c_bus_num; | ||
35 | }; | ||
36 | |||
37 | #endif /* __OMAP_PANEL_DVI_H */ | ||
diff --git a/include/video/omap-panel-n8x0.h b/include/video/omap-panel-n8x0.h new file mode 100644 index 000000000000..50a1302e2cfd --- /dev/null +++ b/include/video/omap-panel-n8x0.h | |||
@@ -0,0 +1,15 @@ | |||
1 | #ifndef __OMAP_PANEL_N8X0_H | ||
2 | #define __OMAP_PANEL_N8X0_H | ||
3 | |||
4 | struct omap_dss_device; | ||
5 | |||
6 | struct panel_n8x0_data { | ||
7 | int (*platform_enable)(struct omap_dss_device *dssdev); | ||
8 | void (*platform_disable)(struct omap_dss_device *dssdev); | ||
9 | int panel_reset; | ||
10 | int ctrl_pwrdown; | ||
11 | |||
12 | int (*set_backlight)(struct omap_dss_device *dssdev, int level); | ||
13 | }; | ||
14 | |||
15 | #endif | ||
diff --git a/include/video/omap-panel-nokia-dsi.h b/include/video/omap-panel-nokia-dsi.h index 921ae9327228..7dc71f9c13e6 100644 --- a/include/video/omap-panel-nokia-dsi.h +++ b/include/video/omap-panel-nokia-dsi.h | |||
@@ -10,9 +10,7 @@ struct omap_dss_device; | |||
10 | * @ext_te_gpio: external TE GPIO | 10 | * @ext_te_gpio: external TE GPIO |
11 | * @esd_interval: interval of ESD checks, 0 = disabled (ms) | 11 | * @esd_interval: interval of ESD checks, 0 = disabled (ms) |
12 | * @ulps_timeout: time to wait before entering ULPS, 0 = disabled (ms) | 12 | * @ulps_timeout: time to wait before entering ULPS, 0 = disabled (ms) |
13 | * @max_backlight_level: maximum backlight level | 13 | * @use_dsi_backlight: true if panel uses DSI command to control backlight |
14 | * @set_backlight: pointer to backlight set function | ||
15 | * @get_backlight: pointer to backlight get function | ||
16 | */ | 14 | */ |
17 | struct nokia_dsi_panel_data { | 15 | struct nokia_dsi_panel_data { |
18 | const char *name; | 16 | const char *name; |
@@ -25,9 +23,7 @@ struct nokia_dsi_panel_data { | |||
25 | unsigned esd_interval; | 23 | unsigned esd_interval; |
26 | unsigned ulps_timeout; | 24 | unsigned ulps_timeout; |
27 | 25 | ||
28 | int max_backlight_level; | 26 | bool use_dsi_backlight; |
29 | int (*set_backlight)(struct omap_dss_device *dssdev, int level); | ||
30 | int (*get_backlight)(struct omap_dss_device *dssdev); | ||
31 | }; | 27 | }; |
32 | 28 | ||
33 | #endif /* __OMAP_NOKIA_DSI_PANEL_H */ | 29 | #endif /* __OMAP_NOKIA_DSI_PANEL_H */ |
diff --git a/include/video/omap-panel-picodlp.h b/include/video/omap-panel-picodlp.h new file mode 100644 index 000000000000..1c342ef6f3a1 --- /dev/null +++ b/include/video/omap-panel-picodlp.h | |||
@@ -0,0 +1,23 @@ | |||
1 | /* | ||
2 | * panel data for picodlp panel | ||
3 | * | ||
4 | * Copyright (C) 2011 Texas Instruments | ||
5 | * | ||
6 | * Author: Mayuresh Janorkar <mayur@ti.com> | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | #ifndef __PANEL_PICODLP_H | ||
13 | #define __PANEL_PICODLP_H | ||
14 | /** | ||
15 | * struct : picodlp panel data | ||
16 | * picodlp_adapter_id: i2c_adapter number for picodlp | ||
17 | */ | ||
18 | struct picodlp_panel_data { | ||
19 | int picodlp_adapter_id; | ||
20 | int emu_done_gpio; | ||
21 | int pwrgood_gpio; | ||
22 | }; | ||
23 | #endif /* __PANEL_PICODLP_H */ | ||
diff --git a/include/video/omapdss.h b/include/video/omapdss.h index 3b55ef22f8db..b66ebb2032c6 100644 --- a/include/video/omapdss.h +++ b/include/video/omapdss.h | |||
@@ -41,8 +41,13 @@ | |||
41 | #define DISPC_IRQ_WAKEUP (1 << 16) | 41 | #define DISPC_IRQ_WAKEUP (1 << 16) |
42 | #define DISPC_IRQ_SYNC_LOST2 (1 << 17) | 42 | #define DISPC_IRQ_SYNC_LOST2 (1 << 17) |
43 | #define DISPC_IRQ_VSYNC2 (1 << 18) | 43 | #define DISPC_IRQ_VSYNC2 (1 << 18) |
44 | #define DISPC_IRQ_VID3_END_WIN (1 << 19) | ||
45 | #define DISPC_IRQ_VID3_FIFO_UNDERFLOW (1 << 20) | ||
44 | #define DISPC_IRQ_ACBIAS_COUNT_STAT2 (1 << 21) | 46 | #define DISPC_IRQ_ACBIAS_COUNT_STAT2 (1 << 21) |
45 | #define DISPC_IRQ_FRAMEDONE2 (1 << 22) | 47 | #define DISPC_IRQ_FRAMEDONE2 (1 << 22) |
48 | #define DISPC_IRQ_FRAMEDONEWB (1 << 23) | ||
49 | #define DISPC_IRQ_FRAMEDONETV (1 << 24) | ||
50 | #define DISPC_IRQ_WBBUFFEROVERFLOW (1 << 25) | ||
46 | 51 | ||
47 | struct omap_dss_device; | 52 | struct omap_dss_device; |
48 | struct omap_overlay_manager; | 53 | struct omap_overlay_manager; |
@@ -60,7 +65,8 @@ enum omap_display_type { | |||
60 | enum omap_plane { | 65 | enum omap_plane { |
61 | OMAP_DSS_GFX = 0, | 66 | OMAP_DSS_GFX = 0, |
62 | OMAP_DSS_VIDEO1 = 1, | 67 | OMAP_DSS_VIDEO1 = 1, |
63 | OMAP_DSS_VIDEO2 = 2 | 68 | OMAP_DSS_VIDEO2 = 2, |
69 | OMAP_DSS_VIDEO3 = 3, | ||
64 | }; | 70 | }; |
65 | 71 | ||
66 | enum omap_channel { | 72 | enum omap_channel { |
@@ -129,6 +135,18 @@ enum omap_dss_venc_type { | |||
129 | OMAP_DSS_VENC_TYPE_SVIDEO, | 135 | OMAP_DSS_VENC_TYPE_SVIDEO, |
130 | }; | 136 | }; |
131 | 137 | ||
138 | enum omap_dss_dsi_pixel_format { | ||
139 | OMAP_DSS_DSI_FMT_RGB888, | ||
140 | OMAP_DSS_DSI_FMT_RGB666, | ||
141 | OMAP_DSS_DSI_FMT_RGB666_PACKED, | ||
142 | OMAP_DSS_DSI_FMT_RGB565, | ||
143 | }; | ||
144 | |||
145 | enum omap_dss_dsi_mode { | ||
146 | OMAP_DSS_DSI_CMD_MODE = 0, | ||
147 | OMAP_DSS_DSI_VIDEO_MODE, | ||
148 | }; | ||
149 | |||
132 | enum omap_display_caps { | 150 | enum omap_display_caps { |
133 | OMAP_DSS_DISPLAY_CAP_MANUAL_UPDATE = 1 << 0, | 151 | OMAP_DSS_DISPLAY_CAP_MANUAL_UPDATE = 1 << 0, |
134 | OMAP_DSS_DISPLAY_CAP_TEAR_ELIM = 1 << 1, | 152 | OMAP_DSS_DISPLAY_CAP_TEAR_ELIM = 1 << 1, |
@@ -162,11 +180,13 @@ enum omap_dss_rotation_angle { | |||
162 | 180 | ||
163 | enum omap_overlay_caps { | 181 | enum omap_overlay_caps { |
164 | OMAP_DSS_OVL_CAP_SCALE = 1 << 0, | 182 | OMAP_DSS_OVL_CAP_SCALE = 1 << 0, |
165 | OMAP_DSS_OVL_CAP_DISPC = 1 << 1, | 183 | OMAP_DSS_OVL_CAP_GLOBAL_ALPHA = 1 << 1, |
184 | OMAP_DSS_OVL_CAP_PRE_MULT_ALPHA = 1 << 2, | ||
185 | OMAP_DSS_OVL_CAP_ZORDER = 1 << 3, | ||
166 | }; | 186 | }; |
167 | 187 | ||
168 | enum omap_overlay_manager_caps { | 188 | enum omap_overlay_manager_caps { |
169 | OMAP_DSS_OVL_MGR_CAP_DISPC = 1 << 0, | 189 | OMAP_DSS_DUMMY_VALUE, /* add a dummy value to prevent compiler error */ |
170 | }; | 190 | }; |
171 | 191 | ||
172 | enum omap_dss_clk_source { | 192 | enum omap_dss_clk_source { |
@@ -215,26 +235,67 @@ void rfbi_bus_lock(void); | |||
215 | void rfbi_bus_unlock(void); | 235 | void rfbi_bus_unlock(void); |
216 | 236 | ||
217 | /* DSI */ | 237 | /* DSI */ |
238 | |||
239 | struct omap_dss_dsi_videomode_data { | ||
240 | /* DSI video mode blanking data */ | ||
241 | /* Unit: byte clock cycles */ | ||
242 | u16 hsa; | ||
243 | u16 hfp; | ||
244 | u16 hbp; | ||
245 | /* Unit: line clocks */ | ||
246 | u16 vsa; | ||
247 | u16 vfp; | ||
248 | u16 vbp; | ||
249 | |||
250 | /* DSI blanking modes */ | ||
251 | int blanking_mode; | ||
252 | int hsa_blanking_mode; | ||
253 | int hbp_blanking_mode; | ||
254 | int hfp_blanking_mode; | ||
255 | |||
256 | /* Video port sync events */ | ||
257 | int vp_de_pol; | ||
258 | int vp_hsync_pol; | ||
259 | int vp_vsync_pol; | ||
260 | bool vp_vsync_end; | ||
261 | bool vp_hsync_end; | ||
262 | |||
263 | bool ddr_clk_always_on; | ||
264 | int window_sync; | ||
265 | }; | ||
266 | |||
218 | void dsi_bus_lock(struct omap_dss_device *dssdev); | 267 | void dsi_bus_lock(struct omap_dss_device *dssdev); |
219 | void dsi_bus_unlock(struct omap_dss_device *dssdev); | 268 | void dsi_bus_unlock(struct omap_dss_device *dssdev); |
220 | int dsi_vc_dcs_write(struct omap_dss_device *dssdev, int channel, u8 *data, | 269 | int dsi_vc_dcs_write(struct omap_dss_device *dssdev, int channel, u8 *data, |
221 | int len); | 270 | int len); |
222 | int dsi_vc_dcs_write_0(struct omap_dss_device *dssdev, int channel, | 271 | int dsi_vc_generic_write(struct omap_dss_device *dssdev, int channel, u8 *data, |
223 | u8 dcs_cmd); | 272 | int len); |
273 | int dsi_vc_dcs_write_0(struct omap_dss_device *dssdev, int channel, u8 dcs_cmd); | ||
274 | int dsi_vc_generic_write_0(struct omap_dss_device *dssdev, int channel); | ||
224 | int dsi_vc_dcs_write_1(struct omap_dss_device *dssdev, int channel, u8 dcs_cmd, | 275 | int dsi_vc_dcs_write_1(struct omap_dss_device *dssdev, int channel, u8 dcs_cmd, |
225 | u8 param); | 276 | u8 param); |
277 | int dsi_vc_generic_write_1(struct omap_dss_device *dssdev, int channel, | ||
278 | u8 param); | ||
279 | int dsi_vc_generic_write_2(struct omap_dss_device *dssdev, int channel, | ||
280 | u8 param1, u8 param2); | ||
226 | int dsi_vc_dcs_write_nosync(struct omap_dss_device *dssdev, int channel, | 281 | int dsi_vc_dcs_write_nosync(struct omap_dss_device *dssdev, int channel, |
227 | u8 *data, int len); | 282 | u8 *data, int len); |
283 | int dsi_vc_generic_write_nosync(struct omap_dss_device *dssdev, int channel, | ||
284 | u8 *data, int len); | ||
228 | int dsi_vc_dcs_read(struct omap_dss_device *dssdev, int channel, u8 dcs_cmd, | 285 | int dsi_vc_dcs_read(struct omap_dss_device *dssdev, int channel, u8 dcs_cmd, |
229 | u8 *buf, int buflen); | 286 | u8 *buf, int buflen); |
230 | int dsi_vc_dcs_read_1(struct omap_dss_device *dssdev, int channel, u8 dcs_cmd, | 287 | int dsi_vc_generic_read_0(struct omap_dss_device *dssdev, int channel, u8 *buf, |
231 | u8 *data); | 288 | int buflen); |
232 | int dsi_vc_dcs_read_2(struct omap_dss_device *dssdev, int channel, u8 dcs_cmd, | 289 | int dsi_vc_generic_read_1(struct omap_dss_device *dssdev, int channel, u8 param, |
233 | u8 *data1, u8 *data2); | 290 | u8 *buf, int buflen); |
291 | int dsi_vc_generic_read_2(struct omap_dss_device *dssdev, int channel, | ||
292 | u8 param1, u8 param2, u8 *buf, int buflen); | ||
234 | int dsi_vc_set_max_rx_packet_size(struct omap_dss_device *dssdev, int channel, | 293 | int dsi_vc_set_max_rx_packet_size(struct omap_dss_device *dssdev, int channel, |
235 | u16 len); | 294 | u16 len); |
236 | int dsi_vc_send_null(struct omap_dss_device *dssdev, int channel); | 295 | int dsi_vc_send_null(struct omap_dss_device *dssdev, int channel); |
237 | int dsi_vc_send_bta_sync(struct omap_dss_device *dssdev, int channel); | 296 | int dsi_vc_send_bta_sync(struct omap_dss_device *dssdev, int channel); |
297 | int dsi_video_mode_enable(struct omap_dss_device *dssdev, int channel); | ||
298 | void dsi_video_mode_disable(struct omap_dss_device *dssdev, int channel); | ||
238 | 299 | ||
239 | /* Board specific data */ | 300 | /* Board specific data */ |
240 | struct omap_dss_board_info { | 301 | struct omap_dss_board_info { |
@@ -242,7 +303,8 @@ struct omap_dss_board_info { | |||
242 | int num_devices; | 303 | int num_devices; |
243 | struct omap_dss_device **devices; | 304 | struct omap_dss_device **devices; |
244 | struct omap_dss_device *default_device; | 305 | struct omap_dss_device *default_device; |
245 | void (*dsi_mux_pads)(bool enable); | 306 | int (*dsi_enable_pads)(int dsi_id, unsigned lane_mask); |
307 | void (*dsi_disable_pads)(int dsi_id, unsigned lane_mask); | ||
246 | }; | 308 | }; |
247 | 309 | ||
248 | #if defined(CONFIG_OMAP2_DSS_MODULE) || defined(CONFIG_OMAP2_DSS) | 310 | #if defined(CONFIG_OMAP2_DSS_MODULE) || defined(CONFIG_OMAP2_DSS) |
@@ -300,7 +362,6 @@ struct omap_overlay_info { | |||
300 | bool enabled; | 362 | bool enabled; |
301 | 363 | ||
302 | u32 paddr; | 364 | u32 paddr; |
303 | void __iomem *vaddr; | ||
304 | u32 p_uv_addr; /* for NV12 format */ | 365 | u32 p_uv_addr; /* for NV12 format */ |
305 | u16 screen_width; | 366 | u16 screen_width; |
306 | u16 width; | 367 | u16 width; |
@@ -316,6 +377,7 @@ struct omap_overlay_info { | |||
316 | u16 out_height; /* if 0, out_height == height */ | 377 | u16 out_height; /* if 0, out_height == height */ |
317 | u8 global_alpha; | 378 | u8 global_alpha; |
318 | u8 pre_mult_alpha; | 379 | u8 pre_mult_alpha; |
380 | u8 zorder; | ||
319 | }; | 381 | }; |
320 | 382 | ||
321 | struct omap_overlay { | 383 | struct omap_overlay { |
@@ -324,7 +386,7 @@ struct omap_overlay { | |||
324 | 386 | ||
325 | /* static fields */ | 387 | /* static fields */ |
326 | const char *name; | 388 | const char *name; |
327 | int id; | 389 | enum omap_plane id; |
328 | enum omap_color_mode supported_modes; | 390 | enum omap_color_mode supported_modes; |
329 | enum omap_overlay_caps caps; | 391 | enum omap_overlay_caps caps; |
330 | 392 | ||
@@ -332,6 +394,7 @@ struct omap_overlay { | |||
332 | struct omap_overlay_manager *manager; | 394 | struct omap_overlay_manager *manager; |
333 | struct omap_overlay_info info; | 395 | struct omap_overlay_info info; |
334 | 396 | ||
397 | bool manager_changed; | ||
335 | /* if true, info has been changed, but not applied() yet */ | 398 | /* if true, info has been changed, but not applied() yet */ |
336 | bool info_dirty; | 399 | bool info_dirty; |
337 | 400 | ||
@@ -354,7 +417,7 @@ struct omap_overlay_manager_info { | |||
354 | u32 trans_key; | 417 | u32 trans_key; |
355 | bool trans_enabled; | 418 | bool trans_enabled; |
356 | 419 | ||
357 | bool alpha_enabled; | 420 | bool partial_alpha_enabled; |
358 | 421 | ||
359 | bool cpr_enable; | 422 | bool cpr_enable; |
360 | struct omap_dss_cpr_coefs cpr_coefs; | 423 | struct omap_dss_cpr_coefs cpr_coefs; |
@@ -366,7 +429,7 @@ struct omap_overlay_manager { | |||
366 | 429 | ||
367 | /* static fields */ | 430 | /* static fields */ |
368 | const char *name; | 431 | const char *name; |
369 | int id; | 432 | enum omap_channel id; |
370 | enum omap_overlay_manager_caps caps; | 433 | enum omap_overlay_manager_caps caps; |
371 | int num_overlays; | 434 | int num_overlays; |
372 | struct omap_overlay **overlays; | 435 | struct omap_overlay **overlays; |
@@ -454,6 +517,7 @@ struct omap_dss_device { | |||
454 | } dispc; | 517 | } dispc; |
455 | 518 | ||
456 | struct { | 519 | struct { |
520 | /* regn is one greater than TRM's REGN value */ | ||
457 | u16 regn; | 521 | u16 regn; |
458 | u16 regm; | 522 | u16 regm; |
459 | u16 regm_dispc; | 523 | u16 regm_dispc; |
@@ -464,6 +528,7 @@ struct omap_dss_device { | |||
464 | } dsi; | 528 | } dsi; |
465 | 529 | ||
466 | struct { | 530 | struct { |
531 | /* regn is one greater than TRM's REGN value */ | ||
467 | u16 regn; | 532 | u16 regn; |
468 | u16 regm2; | 533 | u16 regm2; |
469 | } hdmi; | 534 | } hdmi; |
@@ -477,6 +542,10 @@ struct omap_dss_device { | |||
477 | int acb; /* ac-bias pin frequency */ | 542 | int acb; /* ac-bias pin frequency */ |
478 | 543 | ||
479 | enum omap_panel_config config; | 544 | enum omap_panel_config config; |
545 | |||
546 | enum omap_dss_dsi_pixel_format dsi_pix_fmt; | ||
547 | enum omap_dss_dsi_mode dsi_mode; | ||
548 | struct omap_dss_dsi_videomode_data dsi_vm_data; | ||
480 | } panel; | 549 | } panel; |
481 | 550 | ||
482 | struct { | 551 | struct { |
@@ -557,6 +626,9 @@ struct omap_dss_driver { | |||
557 | 626 | ||
558 | int (*set_wss)(struct omap_dss_device *dssdev, u32 wss); | 627 | int (*set_wss)(struct omap_dss_device *dssdev, u32 wss); |
559 | u32 (*get_wss)(struct omap_dss_device *dssdev); | 628 | u32 (*get_wss)(struct omap_dss_device *dssdev); |
629 | |||
630 | int (*read_edid)(struct omap_dss_device *dssdev, u8 *buf, int len); | ||
631 | bool (*detect)(struct omap_dss_device *dssdev); | ||
560 | }; | 632 | }; |
561 | 633 | ||
562 | int omap_dss_register_driver(struct omap_dss_driver *); | 634 | int omap_dss_register_driver(struct omap_dss_driver *); |