diff options
Diffstat (limited to 'include/video')
-rw-r--r-- | include/video/auo_k190xfb.h | 106 | ||||
-rw-r--r-- | include/video/exynos_dp.h | 2 | ||||
-rw-r--r-- | include/video/exynos_mipi_dsim.h | 1 | ||||
-rw-r--r-- | include/video/omapdss.h | 47 | ||||
-rw-r--r-- | include/video/sh_mobile_hdmi.h | 12 |
5 files changed, 159 insertions, 9 deletions
diff --git a/include/video/auo_k190xfb.h b/include/video/auo_k190xfb.h new file mode 100644 index 000000000000..609efe8c686e --- /dev/null +++ b/include/video/auo_k190xfb.h | |||
@@ -0,0 +1,106 @@ | |||
1 | /* | ||
2 | * Definitions for AUO-K190X framebuffer drivers | ||
3 | * | ||
4 | * Copyright (C) 2012 Heiko Stuebner <heiko@sntech.de> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | |||
11 | #ifndef _LINUX_VIDEO_AUO_K190XFB_H_ | ||
12 | #define _LINUX_VIDEO_AUO_K190XFB_H_ | ||
13 | |||
14 | /* Controller standby command needs a param */ | ||
15 | #define AUOK190X_QUIRK_STANDBYPARAM (1 << 0) | ||
16 | |||
17 | /* Controller standby is completely broken */ | ||
18 | #define AUOK190X_QUIRK_STANDBYBROKEN (1 << 1) | ||
19 | |||
20 | /* | ||
21 | * Resolutions for the displays | ||
22 | */ | ||
23 | #define AUOK190X_RESOLUTION_800_600 0 | ||
24 | #define AUOK190X_RESOLUTION_1024_768 1 | ||
25 | |||
26 | /* | ||
27 | * struct used by auok190x. board specific stuff comes from *board | ||
28 | */ | ||
29 | struct auok190xfb_par { | ||
30 | struct fb_info *info; | ||
31 | struct auok190x_board *board; | ||
32 | |||
33 | struct regulator *regulator; | ||
34 | |||
35 | struct mutex io_lock; | ||
36 | struct delayed_work work; | ||
37 | wait_queue_head_t waitq; | ||
38 | int resolution; | ||
39 | int rotation; | ||
40 | int consecutive_threshold; | ||
41 | int update_cnt; | ||
42 | |||
43 | /* panel and controller informations */ | ||
44 | int epd_type; | ||
45 | int panel_size_int; | ||
46 | int panel_size_float; | ||
47 | int panel_model; | ||
48 | int tcon_version; | ||
49 | int lut_version; | ||
50 | |||
51 | /* individual controller callbacks */ | ||
52 | void (*update_partial)(struct auok190xfb_par *par, u16 y1, u16 y2); | ||
53 | void (*update_all)(struct auok190xfb_par *par); | ||
54 | bool (*need_refresh)(struct auok190xfb_par *par); | ||
55 | void (*init)(struct auok190xfb_par *par); | ||
56 | void (*recover)(struct auok190xfb_par *par); | ||
57 | |||
58 | int update_mode; /* mode to use for updates */ | ||
59 | int last_mode; /* update mode last used */ | ||
60 | int flash; | ||
61 | |||
62 | /* power management */ | ||
63 | int autosuspend_delay; | ||
64 | bool standby; | ||
65 | bool manual_standby; | ||
66 | }; | ||
67 | |||
68 | /** | ||
69 | * Board specific platform-data | ||
70 | * @init: initialize the controller interface | ||
71 | * @cleanup: cleanup the controller interface | ||
72 | * @wait_for_rdy: wait until the controller is not busy anymore | ||
73 | * @set_ctl: change an interface control | ||
74 | * @set_hdb: write a value to the data register | ||
75 | * @get_hdb: read a value from the data register | ||
76 | * @setup_irq: method to setup the irq handling on the busy gpio | ||
77 | * @gpio_nsleep: sleep gpio | ||
78 | * @gpio_nrst: reset gpio | ||
79 | * @gpio_nbusy: busy gpio | ||
80 | * @resolution: one of the AUOK190X_RESOLUTION constants | ||
81 | * @rotation: rotation of the framebuffer | ||
82 | * @quirks: controller quirks to honor | ||
83 | * @fps: frames per second for defio | ||
84 | */ | ||
85 | struct auok190x_board { | ||
86 | int (*init)(struct auok190xfb_par *); | ||
87 | void (*cleanup)(struct auok190xfb_par *); | ||
88 | int (*wait_for_rdy)(struct auok190xfb_par *); | ||
89 | |||
90 | void (*set_ctl)(struct auok190xfb_par *, unsigned char, u8); | ||
91 | void (*set_hdb)(struct auok190xfb_par *, u16); | ||
92 | u16 (*get_hdb)(struct auok190xfb_par *); | ||
93 | |||
94 | int (*setup_irq)(struct fb_info *); | ||
95 | |||
96 | int gpio_nsleep; | ||
97 | int gpio_nrst; | ||
98 | int gpio_nbusy; | ||
99 | |||
100 | int resolution; | ||
101 | int rotation; | ||
102 | int quirks; | ||
103 | int fps; | ||
104 | }; | ||
105 | |||
106 | #endif | ||
diff --git a/include/video/exynos_dp.h b/include/video/exynos_dp.h index 8847a9d6dd42..bd8cabd344db 100644 --- a/include/video/exynos_dp.h +++ b/include/video/exynos_dp.h | |||
@@ -14,7 +14,7 @@ | |||
14 | 14 | ||
15 | #define DP_TIMEOUT_LOOP_COUNT 100 | 15 | #define DP_TIMEOUT_LOOP_COUNT 100 |
16 | #define MAX_CR_LOOP 5 | 16 | #define MAX_CR_LOOP 5 |
17 | #define MAX_EQ_LOOP 4 | 17 | #define MAX_EQ_LOOP 5 |
18 | 18 | ||
19 | enum link_rate_type { | 19 | enum link_rate_type { |
20 | LINK_RATE_1_62GBPS = 0x06, | 20 | LINK_RATE_1_62GBPS = 0x06, |
diff --git a/include/video/exynos_mipi_dsim.h b/include/video/exynos_mipi_dsim.h index 772c770535f1..83ce5e667d47 100644 --- a/include/video/exynos_mipi_dsim.h +++ b/include/video/exynos_mipi_dsim.h | |||
@@ -315,6 +315,7 @@ struct mipi_dsim_lcd_device { | |||
315 | int id; | 315 | int id; |
316 | int bus_id; | 316 | int bus_id; |
317 | int irq; | 317 | int irq; |
318 | int panel_reverse; | ||
318 | 319 | ||
319 | struct mipi_dsim_device *master; | 320 | struct mipi_dsim_device *master; |
320 | void *platform_data; | 321 | void *platform_data; |
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); |
diff --git a/include/video/sh_mobile_hdmi.h b/include/video/sh_mobile_hdmi.h index 728f9de9c258..63d20efa254a 100644 --- a/include/video/sh_mobile_hdmi.h +++ b/include/video/sh_mobile_hdmi.h | |||
@@ -18,9 +18,11 @@ struct clk; | |||
18 | /* | 18 | /* |
19 | * flags format | 19 | * flags format |
20 | * | 20 | * |
21 | * 0x0000000A | 21 | * 0x00000CBA |
22 | * | 22 | * |
23 | * A: Audio source select | 23 | * A: Audio source select |
24 | * B: Int output option | ||
25 | * C: Chip specific option | ||
24 | */ | 26 | */ |
25 | 27 | ||
26 | /* Audio source select */ | 28 | /* Audio source select */ |
@@ -30,6 +32,14 @@ struct clk; | |||
30 | #define HDMI_SND_SRC_DSD (2 << 0) | 32 | #define HDMI_SND_SRC_DSD (2 << 0) |
31 | #define HDMI_SND_SRC_HBR (3 << 0) | 33 | #define HDMI_SND_SRC_HBR (3 << 0) |
32 | 34 | ||
35 | /* Int output option */ | ||
36 | #define HDMI_OUTPUT_PUSH_PULL (1 << 4) /* System control : output mode */ | ||
37 | #define HDMI_OUTPUT_POLARITY_HI (1 << 5) /* System control : output polarity */ | ||
38 | |||
39 | /* Chip specific option */ | ||
40 | #define HDMI_32BIT_REG (1 << 8) | ||
41 | #define HDMI_HAS_HTOP1 (1 << 9) | ||
42 | |||
33 | struct sh_mobile_hdmi_info { | 43 | struct sh_mobile_hdmi_info { |
34 | unsigned int flags; | 44 | unsigned int flags; |
35 | long (*clk_optimize_parent)(unsigned long target, unsigned long *best_freq, | 45 | long (*clk_optimize_parent)(unsigned long target, unsigned long *best_freq, |