diff options
Diffstat (limited to 'include/video/omapdss.h')
| -rw-r--r-- | include/video/omapdss.h | 100 |
1 files changed, 86 insertions, 14 deletions
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 *); |
