diff options
Diffstat (limited to 'include/video/omapdss.h')
-rw-r--r-- | include/video/omapdss.h | 47 |
1 files changed, 40 insertions, 7 deletions
diff --git a/include/video/omapdss.h b/include/video/omapdss.h index 1c46a14341dd..c8e59b4a3364 100644 --- a/include/video/omapdss.h +++ b/include/video/omapdss.h | |||
@@ -51,6 +51,8 @@ | |||
51 | 51 | ||
52 | struct omap_dss_device; | 52 | struct omap_dss_device; |
53 | struct omap_overlay_manager; | 53 | struct omap_overlay_manager; |
54 | struct snd_aes_iec958; | ||
55 | struct snd_cea_861_aud_if; | ||
54 | 56 | ||
55 | enum omap_display_type { | 57 | enum omap_display_type { |
56 | OMAP_DISPLAY_TYPE_NONE = 0, | 58 | OMAP_DISPLAY_TYPE_NONE = 0, |
@@ -158,6 +160,13 @@ enum omap_dss_display_state { | |||
158 | OMAP_DSS_DISPLAY_SUSPENDED, | 160 | OMAP_DSS_DISPLAY_SUSPENDED, |
159 | }; | 161 | }; |
160 | 162 | ||
163 | enum omap_dss_audio_state { | ||
164 | OMAP_DSS_AUDIO_DISABLED = 0, | ||
165 | OMAP_DSS_AUDIO_ENABLED, | ||
166 | OMAP_DSS_AUDIO_CONFIGURED, | ||
167 | OMAP_DSS_AUDIO_PLAYING, | ||
168 | }; | ||
169 | |||
161 | /* XXX perhaps this should be removed */ | 170 | /* XXX perhaps this should be removed */ |
162 | enum omap_dss_overlay_managers { | 171 | enum omap_dss_overlay_managers { |
163 | OMAP_DSS_OVL_MGR_LCD, | 172 | OMAP_DSS_OVL_MGR_LCD, |
@@ -166,8 +175,9 @@ enum omap_dss_overlay_managers { | |||
166 | }; | 175 | }; |
167 | 176 | ||
168 | enum omap_dss_rotation_type { | 177 | enum omap_dss_rotation_type { |
169 | OMAP_DSS_ROT_DMA = 0, | 178 | OMAP_DSS_ROT_DMA = 1 << 0, |
170 | OMAP_DSS_ROT_VRFB = 1, | 179 | OMAP_DSS_ROT_VRFB = 1 << 1, |
180 | OMAP_DSS_ROT_TILER = 1 << 2, | ||
171 | }; | 181 | }; |
172 | 182 | ||
173 | /* clockwise rotation angle */ | 183 | /* clockwise rotation angle */ |
@@ -309,6 +319,7 @@ struct omap_dss_board_info { | |||
309 | struct omap_dss_device *default_device; | 319 | struct omap_dss_device *default_device; |
310 | int (*dsi_enable_pads)(int dsi_id, unsigned lane_mask); | 320 | int (*dsi_enable_pads)(int dsi_id, unsigned lane_mask); |
311 | void (*dsi_disable_pads)(int dsi_id, unsigned lane_mask); | 321 | void (*dsi_disable_pads)(int dsi_id, unsigned lane_mask); |
322 | int (*set_min_bus_tput)(struct device *dev, unsigned long r); | ||
312 | }; | 323 | }; |
313 | 324 | ||
314 | /* Init with the board info */ | 325 | /* Init with the board info */ |
@@ -316,11 +327,6 @@ extern int omap_display_init(struct omap_dss_board_info *board_data); | |||
316 | /* HDMI mux init*/ | 327 | /* HDMI mux init*/ |
317 | extern int omap_hdmi_init(enum omap_hdmi_flags flags); | 328 | extern int omap_hdmi_init(enum omap_hdmi_flags flags); |
318 | 329 | ||
319 | struct omap_display_platform_data { | ||
320 | struct omap_dss_board_info *board_data; | ||
321 | /* TODO: Additional members to be added when PM is considered */ | ||
322 | }; | ||
323 | |||
324 | struct omap_video_timings { | 330 | struct omap_video_timings { |
325 | /* Unit: pixels */ | 331 | /* Unit: pixels */ |
326 | u16 x_res; | 332 | u16 x_res; |
@@ -587,6 +593,8 @@ struct omap_dss_device { | |||
587 | 593 | ||
588 | enum omap_dss_display_state state; | 594 | enum omap_dss_display_state state; |
589 | 595 | ||
596 | enum omap_dss_audio_state audio_state; | ||
597 | |||
590 | /* platform specific */ | 598 | /* platform specific */ |
591 | int (*platform_enable)(struct omap_dss_device *dssdev); | 599 | int (*platform_enable)(struct omap_dss_device *dssdev); |
592 | void (*platform_disable)(struct omap_dss_device *dssdev); | 600 | void (*platform_disable)(struct omap_dss_device *dssdev); |
@@ -599,6 +607,11 @@ struct omap_dss_hdmi_data | |||
599 | int hpd_gpio; | 607 | int hpd_gpio; |
600 | }; | 608 | }; |
601 | 609 | ||
610 | struct omap_dss_audio { | ||
611 | struct snd_aes_iec958 *iec; | ||
612 | struct snd_cea_861_aud_if *cea; | ||
613 | }; | ||
614 | |||
602 | struct omap_dss_driver { | 615 | struct omap_dss_driver { |
603 | struct device_driver driver; | 616 | struct device_driver driver; |
604 | 617 | ||
@@ -646,6 +659,24 @@ struct omap_dss_driver { | |||
646 | 659 | ||
647 | int (*read_edid)(struct omap_dss_device *dssdev, u8 *buf, int len); | 660 | int (*read_edid)(struct omap_dss_device *dssdev, u8 *buf, int len); |
648 | bool (*detect)(struct omap_dss_device *dssdev); | 661 | bool (*detect)(struct omap_dss_device *dssdev); |
662 | |||
663 | /* | ||
664 | * For display drivers that support audio. This encompasses | ||
665 | * HDMI and DisplayPort at the moment. | ||
666 | */ | ||
667 | /* | ||
668 | * Note: These functions might sleep. Do not call while | ||
669 | * holding a spinlock/readlock. | ||
670 | */ | ||
671 | int (*audio_enable)(struct omap_dss_device *dssdev); | ||
672 | void (*audio_disable)(struct omap_dss_device *dssdev); | ||
673 | bool (*audio_supported)(struct omap_dss_device *dssdev); | ||
674 | int (*audio_config)(struct omap_dss_device *dssdev, | ||
675 | struct omap_dss_audio *audio); | ||
676 | /* Note: These functions may not sleep */ | ||
677 | int (*audio_start)(struct omap_dss_device *dssdev); | ||
678 | void (*audio_stop)(struct omap_dss_device *dssdev); | ||
679 | |||
649 | }; | 680 | }; |
650 | 681 | ||
651 | int omap_dss_register_driver(struct omap_dss_driver *); | 682 | int omap_dss_register_driver(struct omap_dss_driver *); |
@@ -670,6 +701,8 @@ struct omap_overlay *omap_dss_get_overlay(int num); | |||
670 | void omapdss_default_get_resolution(struct omap_dss_device *dssdev, | 701 | void omapdss_default_get_resolution(struct omap_dss_device *dssdev, |
671 | u16 *xres, u16 *yres); | 702 | u16 *xres, u16 *yres); |
672 | int omapdss_default_get_recommended_bpp(struct omap_dss_device *dssdev); | 703 | int omapdss_default_get_recommended_bpp(struct omap_dss_device *dssdev); |
704 | void omapdss_default_get_timings(struct omap_dss_device *dssdev, | ||
705 | struct omap_video_timings *timings); | ||
673 | 706 | ||
674 | typedef void (*omap_dispc_isr_t) (void *arg, u32 mask); | 707 | typedef void (*omap_dispc_isr_t) (void *arg, u32 mask); |
675 | int omap_dispc_register_isr(omap_dispc_isr_t isr, void *arg, u32 mask); | 708 | int omap_dispc_register_isr(omap_dispc_isr_t isr, void *arg, u32 mask); |