aboutsummaryrefslogtreecommitdiffstats
path: root/include/video/omapdss.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/video/omapdss.h')
-rw-r--r--include/video/omapdss.h112
1 files changed, 93 insertions, 19 deletions
diff --git a/include/video/omapdss.h b/include/video/omapdss.h
index a6267a2d292b..3729173b7fbc 100644
--- a/include/video/omapdss.h
+++ b/include/video/omapdss.h
@@ -48,10 +48,10 @@
48#define DISPC_IRQ_FRAMEDONEWB (1 << 23) 48#define DISPC_IRQ_FRAMEDONEWB (1 << 23)
49#define DISPC_IRQ_FRAMEDONETV (1 << 24) 49#define DISPC_IRQ_FRAMEDONETV (1 << 24)
50#define DISPC_IRQ_WBBUFFEROVERFLOW (1 << 25) 50#define DISPC_IRQ_WBBUFFEROVERFLOW (1 << 25)
51#define DISPC_IRQ_FRAMEDONE3 (1 << 26) 51#define DISPC_IRQ_SYNC_LOST3 (1 << 27)
52#define DISPC_IRQ_VSYNC3 (1 << 27) 52#define DISPC_IRQ_VSYNC3 (1 << 28)
53#define DISPC_IRQ_ACBIAS_COUNT_STAT3 (1 << 28) 53#define DISPC_IRQ_ACBIAS_COUNT_STAT3 (1 << 29)
54#define DISPC_IRQ_SYNC_LOST3 (1 << 29) 54#define DISPC_IRQ_FRAMEDONE3 (1 << 30)
55 55
56struct omap_dss_device; 56struct omap_dss_device;
57struct omap_overlay_manager; 57struct omap_overlay_manager;
@@ -73,6 +73,7 @@ enum omap_plane {
73 OMAP_DSS_VIDEO1 = 1, 73 OMAP_DSS_VIDEO1 = 1,
74 OMAP_DSS_VIDEO2 = 2, 74 OMAP_DSS_VIDEO2 = 2,
75 OMAP_DSS_VIDEO3 = 3, 75 OMAP_DSS_VIDEO3 = 3,
76 OMAP_DSS_WB = 4,
76}; 77};
77 78
78enum omap_channel { 79enum omap_channel {
@@ -186,6 +187,8 @@ enum omap_overlay_caps {
186 OMAP_DSS_OVL_CAP_GLOBAL_ALPHA = 1 << 1, 187 OMAP_DSS_OVL_CAP_GLOBAL_ALPHA = 1 << 1,
187 OMAP_DSS_OVL_CAP_PRE_MULT_ALPHA = 1 << 2, 188 OMAP_DSS_OVL_CAP_PRE_MULT_ALPHA = 1 << 2,
188 OMAP_DSS_OVL_CAP_ZORDER = 1 << 3, 189 OMAP_DSS_OVL_CAP_ZORDER = 1 << 3,
190 OMAP_DSS_OVL_CAP_POS = 1 << 4,
191 OMAP_DSS_OVL_CAP_REPLICATION = 1 << 5,
189}; 192};
190 193
191enum omap_overlay_manager_caps { 194enum omap_overlay_manager_caps {
@@ -207,6 +210,16 @@ enum omap_hdmi_flags {
207 OMAP_HDMI_SDA_SCL_EXTERNAL_PULLUP = 1 << 0, 210 OMAP_HDMI_SDA_SCL_EXTERNAL_PULLUP = 1 << 0,
208}; 211};
209 212
213enum omap_dss_output_id {
214 OMAP_DSS_OUTPUT_DPI = 1 << 0,
215 OMAP_DSS_OUTPUT_DBI = 1 << 1,
216 OMAP_DSS_OUTPUT_SDI = 1 << 2,
217 OMAP_DSS_OUTPUT_DSI1 = 1 << 3,
218 OMAP_DSS_OUTPUT_DSI2 = 1 << 4,
219 OMAP_DSS_OUTPUT_VENC = 1 << 5,
220 OMAP_DSS_OUTPUT_HDMI = 1 << 6,
221};
222
210/* RFBI */ 223/* RFBI */
211 224
212struct rfbi_timings { 225struct rfbi_timings {
@@ -243,7 +256,7 @@ void rfbi_bus_unlock(void);
243 256
244/* DSI */ 257/* DSI */
245 258
246struct omap_dss_dsi_videomode_data { 259struct omap_dss_dsi_videomode_timings {
247 /* DSI video mode blanking data */ 260 /* DSI video mode blanking data */
248 /* Unit: byte clock cycles */ 261 /* Unit: byte clock cycles */
249 u16 hsa; 262 u16 hsa;
@@ -424,6 +437,8 @@ struct omap_overlay {
424 struct omap_overlay_info *info); 437 struct omap_overlay_info *info);
425 438
426 int (*wait_for_go)(struct omap_overlay *ovl); 439 int (*wait_for_go)(struct omap_overlay *ovl);
440
441 struct omap_dss_device *(*get_device)(struct omap_overlay *ovl);
427}; 442};
428 443
429struct omap_overlay_manager_info { 444struct omap_overlay_manager_info {
@@ -448,9 +463,10 @@ struct omap_overlay_manager {
448 enum omap_overlay_manager_caps caps; 463 enum omap_overlay_manager_caps caps;
449 struct list_head overlays; 464 struct list_head overlays;
450 enum omap_display_type supported_displays; 465 enum omap_display_type supported_displays;
466 enum omap_dss_output_id supported_outputs;
451 467
452 /* dynamic fields */ 468 /* dynamic fields */
453 struct omap_dss_device *device; 469 struct omap_dss_output *output;
454 470
455 /* 471 /*
456 * The following functions do not block: 472 * The following functions do not block:
@@ -463,9 +479,9 @@ struct omap_overlay_manager {
463 * interrupt context 479 * interrupt context
464 */ 480 */
465 481
466 int (*set_device)(struct omap_overlay_manager *mgr, 482 int (*set_output)(struct omap_overlay_manager *mgr,
467 struct omap_dss_device *dssdev); 483 struct omap_dss_output *output);
468 int (*unset_device)(struct omap_overlay_manager *mgr); 484 int (*unset_output)(struct omap_overlay_manager *mgr);
469 485
470 int (*set_manager_info)(struct omap_overlay_manager *mgr, 486 int (*set_manager_info)(struct omap_overlay_manager *mgr,
471 struct omap_overlay_manager_info *info); 487 struct omap_overlay_manager_info *info);
@@ -475,6 +491,8 @@ struct omap_overlay_manager {
475 int (*apply)(struct omap_overlay_manager *mgr); 491 int (*apply)(struct omap_overlay_manager *mgr);
476 int (*wait_for_go)(struct omap_overlay_manager *mgr); 492 int (*wait_for_go)(struct omap_overlay_manager *mgr);
477 int (*wait_for_vsync)(struct omap_overlay_manager *mgr); 493 int (*wait_for_vsync)(struct omap_overlay_manager *mgr);
494
495 struct omap_dss_device *(*get_device)(struct omap_overlay_manager *mgr);
478}; 496};
479 497
480/* 22 pins means 1 clk lane and 10 data lanes */ 498/* 22 pins means 1 clk lane and 10 data lanes */
@@ -492,6 +510,37 @@ struct omap_dsi_pin_config {
492 int pins[OMAP_DSS_MAX_DSI_PINS]; 510 int pins[OMAP_DSS_MAX_DSI_PINS];
493}; 511};
494 512
513struct omap_dss_writeback_info {
514 u32 paddr;
515 u32 p_uv_addr;
516 u16 buf_width;
517 u16 width;
518 u16 height;
519 enum omap_color_mode color_mode;
520 u8 rotation;
521 enum omap_dss_rotation_type rotation_type;
522 bool mirror;
523 u8 pre_mult_alpha;
524};
525
526struct omap_dss_output {
527 struct list_head list;
528
529 /* display type supported by the output */
530 enum omap_display_type type;
531
532 /* output instance */
533 enum omap_dss_output_id id;
534
535 /* output's platform device pointer */
536 struct platform_device *pdev;
537
538 /* dynamic fields */
539 struct omap_overlay_manager *manager;
540
541 struct omap_dss_device *device;
542};
543
495struct omap_dss_device { 544struct omap_dss_device {
496 struct device dev; 545 struct device dev;
497 546
@@ -564,7 +613,7 @@ struct omap_dss_device {
564 613
565 enum omap_dss_dsi_pixel_format dsi_pix_fmt; 614 enum omap_dss_dsi_pixel_format dsi_pix_fmt;
566 enum omap_dss_dsi_mode dsi_mode; 615 enum omap_dss_dsi_mode dsi_mode;
567 struct omap_dss_dsi_videomode_data dsi_vm_data; 616 struct omap_dss_dsi_videomode_timings dsi_vm_timings;
568 } panel; 617 } panel;
569 618
570 struct { 619 struct {
@@ -590,7 +639,7 @@ struct omap_dss_device {
590 639
591 enum omap_display_caps caps; 640 enum omap_display_caps caps;
592 641
593 struct omap_overlay_manager *manager; 642 struct omap_dss_output *output;
594 643
595 enum omap_dss_display_state state; 644 enum omap_dss_display_state state;
596 645
@@ -605,6 +654,8 @@ struct omap_dss_device {
605 654
606struct omap_dss_hdmi_data 655struct omap_dss_hdmi_data
607{ 656{
657 int ct_cp_hpd_gpio;
658 int ls_oe_gpio;
608 int hpd_gpio; 659 int hpd_gpio;
609}; 660};
610 661
@@ -699,6 +750,11 @@ struct omap_overlay_manager *omap_dss_get_overlay_manager(int num);
699int omap_dss_get_num_overlays(void); 750int omap_dss_get_num_overlays(void);
700struct omap_overlay *omap_dss_get_overlay(int num); 751struct omap_overlay *omap_dss_get_overlay(int num);
701 752
753struct omap_dss_output *omap_dss_get_output(enum omap_dss_output_id id);
754int omapdss_output_set_device(struct omap_dss_output *out,
755 struct omap_dss_device *dssdev);
756int omapdss_output_unset_device(struct omap_dss_output *out);
757
702void omapdss_default_get_resolution(struct omap_dss_device *dssdev, 758void omapdss_default_get_resolution(struct omap_dss_device *dssdev,
703 u16 *xres, u16 *yres); 759 u16 *xres, u16 *yres);
704int omapdss_default_get_recommended_bpp(struct omap_dss_device *dssdev); 760int omapdss_default_get_recommended_bpp(struct omap_dss_device *dssdev);
@@ -719,6 +775,15 @@ int omap_dispc_wait_for_irq_interruptible_timeout(u32 irqmask,
719void omapdss_dsi_vc_enable_hs(struct omap_dss_device *dssdev, int channel, 775void omapdss_dsi_vc_enable_hs(struct omap_dss_device *dssdev, int channel,
720 bool enable); 776 bool enable);
721int omapdss_dsi_enable_te(struct omap_dss_device *dssdev, bool enable); 777int omapdss_dsi_enable_te(struct omap_dss_device *dssdev, bool enable);
778void omapdss_dsi_set_timings(struct omap_dss_device *dssdev,
779 struct omap_video_timings *timings);
780void omapdss_dsi_set_size(struct omap_dss_device *dssdev, u16 w, u16 h);
781void omapdss_dsi_set_pixel_format(struct omap_dss_device *dssdev,
782 enum omap_dss_dsi_pixel_format fmt);
783void omapdss_dsi_set_operation_mode(struct omap_dss_device *dssdev,
784 enum omap_dss_dsi_mode mode);
785void omapdss_dsi_set_videomode_timings(struct omap_dss_device *dssdev,
786 struct omap_dss_dsi_videomode_timings *timings);
722 787
723int omap_dsi_update(struct omap_dss_device *dssdev, int channel, 788int omap_dsi_update(struct omap_dss_device *dssdev, int channel,
724 void (*callback)(int, void *), void *data); 789 void (*callback)(int, void *), void *data);
@@ -727,6 +792,8 @@ int omap_dsi_set_vc_id(struct omap_dss_device *dssdev, int channel, int vc_id);
727void omap_dsi_release_vc(struct omap_dss_device *dssdev, int channel); 792void omap_dsi_release_vc(struct omap_dss_device *dssdev, int channel);
728int omapdss_dsi_configure_pins(struct omap_dss_device *dssdev, 793int omapdss_dsi_configure_pins(struct omap_dss_device *dssdev,
729 const struct omap_dsi_pin_config *pin_cfg); 794 const struct omap_dsi_pin_config *pin_cfg);
795int omapdss_dsi_set_clocks(struct omap_dss_device *dssdev,
796 unsigned long ddr_clk, unsigned long lp_clk);
730 797
731int omapdss_dsi_display_enable(struct omap_dss_device *dssdev); 798int omapdss_dsi_display_enable(struct omap_dss_device *dssdev);
732void omapdss_dsi_display_disable(struct omap_dss_device *dssdev, 799void omapdss_dsi_display_disable(struct omap_dss_device *dssdev,
@@ -734,22 +801,29 @@ void omapdss_dsi_display_disable(struct omap_dss_device *dssdev,
734 801
735int omapdss_dpi_display_enable(struct omap_dss_device *dssdev); 802int omapdss_dpi_display_enable(struct omap_dss_device *dssdev);
736void omapdss_dpi_display_disable(struct omap_dss_device *dssdev); 803void omapdss_dpi_display_disable(struct omap_dss_device *dssdev);
737void dpi_set_timings(struct omap_dss_device *dssdev, 804void omapdss_dpi_set_timings(struct omap_dss_device *dssdev,
738 struct omap_video_timings *timings); 805 struct omap_video_timings *timings);
739int dpi_check_timings(struct omap_dss_device *dssdev, 806int dpi_check_timings(struct omap_dss_device *dssdev,
740 struct omap_video_timings *timings); 807 struct omap_video_timings *timings);
808void omapdss_dpi_set_data_lines(struct omap_dss_device *dssdev, int data_lines);
741 809
742int omapdss_sdi_display_enable(struct omap_dss_device *dssdev); 810int omapdss_sdi_display_enable(struct omap_dss_device *dssdev);
743void omapdss_sdi_display_disable(struct omap_dss_device *dssdev); 811void omapdss_sdi_display_disable(struct omap_dss_device *dssdev);
812void omapdss_sdi_set_timings(struct omap_dss_device *dssdev,
813 struct omap_video_timings *timings);
814void omapdss_sdi_set_datapairs(struct omap_dss_device *dssdev, int datapairs);
744 815
745int omapdss_rfbi_display_enable(struct omap_dss_device *dssdev); 816int omapdss_rfbi_display_enable(struct omap_dss_device *dssdev);
746void omapdss_rfbi_display_disable(struct omap_dss_device *dssdev); 817void omapdss_rfbi_display_disable(struct omap_dss_device *dssdev);
747int omap_rfbi_prepare_update(struct omap_dss_device *dssdev, 818int omap_rfbi_update(struct omap_dss_device *dssdev, void (*callback)(void *),
748 u16 *x, u16 *y, u16 *w, u16 *h); 819 void *data);
749int omap_rfbi_update(struct omap_dss_device *dssdev, 820int omap_rfbi_configure(struct omap_dss_device *dssdev);
750 u16 x, u16 y, u16 w, u16 h, 821void omapdss_rfbi_set_size(struct omap_dss_device *dssdev, u16 w, u16 h);
751 void (*callback)(void *), void *data); 822void omapdss_rfbi_set_pixel_size(struct omap_dss_device *dssdev,
752int omap_rfbi_configure(struct omap_dss_device *dssdev, int pixel_size, 823 int pixel_size);
824void omapdss_rfbi_set_data_lines(struct omap_dss_device *dssdev,
753 int data_lines); 825 int data_lines);
826void omapdss_rfbi_set_interface_timings(struct omap_dss_device *dssdev,
827 struct rfbi_timings *timings);
754 828
755#endif 829#endif