diff options
Diffstat (limited to 'include/video')
-rw-r--r-- | include/video/atmel_lcdc.h | 4 | ||||
-rw-r--r-- | include/video/auo_k190xfb.h | 3 | ||||
-rw-r--r-- | include/video/display_timing.h | 57 | ||||
-rw-r--r-- | include/video/omap-panel-data.h | 150 | ||||
-rw-r--r-- | include/video/omap-panel-generic-dpi.h | 37 | ||||
-rw-r--r-- | include/video/omap-panel-n8x0.h | 15 | ||||
-rw-r--r-- | include/video/omap-panel-nokia-dsi.h | 32 | ||||
-rw-r--r-- | include/video/omap-panel-picodlp.h | 23 | ||||
-rw-r--r-- | include/video/omap-panel-tfp410.h | 35 | ||||
-rw-r--r-- | include/video/omapdss.h | 87 | ||||
-rw-r--r-- | include/video/platform_lcd.h | 1 | ||||
-rw-r--r-- | include/video/videomode.h | 18 |
12 files changed, 230 insertions, 232 deletions
diff --git a/include/video/atmel_lcdc.h b/include/video/atmel_lcdc.h index 28447f1594fa..0f5a2fc69af9 100644 --- a/include/video/atmel_lcdc.h +++ b/include/video/atmel_lcdc.h | |||
@@ -30,8 +30,8 @@ | |||
30 | */ | 30 | */ |
31 | #define ATMEL_LCDC_WIRING_BGR 0 | 31 | #define ATMEL_LCDC_WIRING_BGR 0 |
32 | #define ATMEL_LCDC_WIRING_RGB 1 | 32 | #define ATMEL_LCDC_WIRING_RGB 1 |
33 | #define ATMEL_LCDC_WIRING_RGB555 2 | ||
34 | 33 | ||
34 | struct atmel_lcdfb_config; | ||
35 | 35 | ||
36 | /* LCD Controller info data structure, stored in device platform_data */ | 36 | /* LCD Controller info data structure, stored in device platform_data */ |
37 | struct atmel_lcdfb_info { | 37 | struct atmel_lcdfb_info { |
@@ -62,6 +62,8 @@ struct atmel_lcdfb_info { | |||
62 | void (*atmel_lcdfb_power_control)(int on); | 62 | void (*atmel_lcdfb_power_control)(int on); |
63 | struct fb_monspecs *default_monspecs; | 63 | struct fb_monspecs *default_monspecs; |
64 | u32 pseudo_palette[16]; | 64 | u32 pseudo_palette[16]; |
65 | |||
66 | struct atmel_lcdfb_config *config; | ||
65 | }; | 67 | }; |
66 | 68 | ||
67 | #define ATMEL_LCDC_DMABADDR1 0x00 | 69 | #define ATMEL_LCDC_DMABADDR1 0x00 |
diff --git a/include/video/auo_k190xfb.h b/include/video/auo_k190xfb.h index 609efe8c686e..ac329ee1d753 100644 --- a/include/video/auo_k190xfb.h +++ b/include/video/auo_k190xfb.h | |||
@@ -22,6 +22,8 @@ | |||
22 | */ | 22 | */ |
23 | #define AUOK190X_RESOLUTION_800_600 0 | 23 | #define AUOK190X_RESOLUTION_800_600 0 |
24 | #define AUOK190X_RESOLUTION_1024_768 1 | 24 | #define AUOK190X_RESOLUTION_1024_768 1 |
25 | #define AUOK190X_RESOLUTION_600_800 4 | ||
26 | #define AUOK190X_RESOLUTION_768_1024 5 | ||
25 | 27 | ||
26 | /* | 28 | /* |
27 | * struct used by auok190x. board specific stuff comes from *board | 29 | * struct used by auok190x. board specific stuff comes from *board |
@@ -98,7 +100,6 @@ struct auok190x_board { | |||
98 | int gpio_nbusy; | 100 | int gpio_nbusy; |
99 | 101 | ||
100 | int resolution; | 102 | int resolution; |
101 | int rotation; | ||
102 | int quirks; | 103 | int quirks; |
103 | int fps; | 104 | int fps; |
104 | }; | 105 | }; |
diff --git a/include/video/display_timing.h b/include/video/display_timing.h index 71e9a383a981..5d0259b08e01 100644 --- a/include/video/display_timing.h +++ b/include/video/display_timing.h | |||
@@ -12,19 +12,22 @@ | |||
12 | #include <linux/bitops.h> | 12 | #include <linux/bitops.h> |
13 | #include <linux/types.h> | 13 | #include <linux/types.h> |
14 | 14 | ||
15 | /* VESA display monitor timing parameters */ | 15 | enum display_flags { |
16 | #define VESA_DMT_HSYNC_LOW BIT(0) | 16 | DISPLAY_FLAGS_HSYNC_LOW = BIT(0), |
17 | #define VESA_DMT_HSYNC_HIGH BIT(1) | 17 | DISPLAY_FLAGS_HSYNC_HIGH = BIT(1), |
18 | #define VESA_DMT_VSYNC_LOW BIT(2) | 18 | DISPLAY_FLAGS_VSYNC_LOW = BIT(2), |
19 | #define VESA_DMT_VSYNC_HIGH BIT(3) | 19 | DISPLAY_FLAGS_VSYNC_HIGH = BIT(3), |
20 | 20 | ||
21 | /* display specific flags */ | 21 | /* data enable flag */ |
22 | #define DISPLAY_FLAGS_DE_LOW BIT(0) /* data enable flag */ | 22 | DISPLAY_FLAGS_DE_LOW = BIT(4), |
23 | #define DISPLAY_FLAGS_DE_HIGH BIT(1) | 23 | DISPLAY_FLAGS_DE_HIGH = BIT(5), |
24 | #define DISPLAY_FLAGS_PIXDATA_POSEDGE BIT(2) /* drive data on pos. edge */ | 24 | /* drive data on pos. edge */ |
25 | #define DISPLAY_FLAGS_PIXDATA_NEGEDGE BIT(3) /* drive data on neg. edge */ | 25 | DISPLAY_FLAGS_PIXDATA_POSEDGE = BIT(6), |
26 | #define DISPLAY_FLAGS_INTERLACED BIT(4) | 26 | /* drive data on neg. edge */ |
27 | #define DISPLAY_FLAGS_DOUBLESCAN BIT(5) | 27 | DISPLAY_FLAGS_PIXDATA_NEGEDGE = BIT(7), |
28 | DISPLAY_FLAGS_INTERLACED = BIT(8), | ||
29 | DISPLAY_FLAGS_DOUBLESCAN = BIT(9), | ||
30 | }; | ||
28 | 31 | ||
29 | /* | 32 | /* |
30 | * A single signal can be specified via a range of minimal and maximal values | 33 | * A single signal can be specified via a range of minimal and maximal values |
@@ -36,12 +39,6 @@ struct timing_entry { | |||
36 | u32 max; | 39 | u32 max; |
37 | }; | 40 | }; |
38 | 41 | ||
39 | enum timing_entry_index { | ||
40 | TE_MIN = 0, | ||
41 | TE_TYP = 1, | ||
42 | TE_MAX = 2, | ||
43 | }; | ||
44 | |||
45 | /* | 42 | /* |
46 | * Single "mode" entry. This describes one set of signal timings a display can | 43 | * Single "mode" entry. This describes one set of signal timings a display can |
47 | * have in one setting. This struct can later be converted to struct videomode | 44 | * have in one setting. This struct can later be converted to struct videomode |
@@ -72,8 +69,7 @@ struct display_timing { | |||
72 | struct timing_entry vback_porch; /* ver. back porch */ | 69 | struct timing_entry vback_porch; /* ver. back porch */ |
73 | struct timing_entry vsync_len; /* ver. sync len */ | 70 | struct timing_entry vsync_len; /* ver. sync len */ |
74 | 71 | ||
75 | unsigned int dmt_flags; /* VESA DMT flags */ | 72 | enum display_flags flags; /* display flags */ |
76 | unsigned int data_flags; /* video data flags */ | ||
77 | }; | 73 | }; |
78 | 74 | ||
79 | /* | 75 | /* |
@@ -89,25 +85,6 @@ struct display_timings { | |||
89 | struct display_timing **timings; | 85 | struct display_timing **timings; |
90 | }; | 86 | }; |
91 | 87 | ||
92 | /* get value specified by index from struct timing_entry */ | ||
93 | static inline u32 display_timing_get_value(const struct timing_entry *te, | ||
94 | enum timing_entry_index index) | ||
95 | { | ||
96 | switch (index) { | ||
97 | case TE_MIN: | ||
98 | return te->min; | ||
99 | break; | ||
100 | case TE_TYP: | ||
101 | return te->typ; | ||
102 | break; | ||
103 | case TE_MAX: | ||
104 | return te->max; | ||
105 | break; | ||
106 | default: | ||
107 | return te->typ; | ||
108 | } | ||
109 | } | ||
110 | |||
111 | /* get one entry from struct display_timings */ | 88 | /* get one entry from struct display_timings */ |
112 | static inline struct display_timing *display_timings_get(const struct | 89 | static inline struct display_timing *display_timings_get(const struct |
113 | display_timings *disp, | 90 | display_timings *disp, |
diff --git a/include/video/omap-panel-data.h b/include/video/omap-panel-data.h new file mode 100644 index 000000000000..0c3b46d3daf3 --- /dev/null +++ b/include/video/omap-panel-data.h | |||
@@ -0,0 +1,150 @@ | |||
1 | /* | ||
2 | * Header containing platform_data structs for omap panels | ||
3 | * | ||
4 | * Copyright (C) 2013 Texas Instruments | ||
5 | * Author: Tomi Valkeinen <tomi.valkeinen@ti.com> | ||
6 | * Archit Taneja <archit@ti.com> | ||
7 | * | ||
8 | * Copyright (C) 2011 Texas Instruments | ||
9 | * Author: Mayuresh Janorkar <mayur@ti.com> | ||
10 | * | ||
11 | * Copyright (C) 2010 Canonical Ltd. | ||
12 | * Author: Bryan Wu <bryan.wu@canonical.com> | ||
13 | * | ||
14 | * This program is free software; you can redistribute it and/or modify it | ||
15 | * under the terms of the GNU General Public License version 2 as published by | ||
16 | * the Free Software Foundation. | ||
17 | * | ||
18 | * This program is distributed in the hope that it will be useful, but WITHOUT | ||
19 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
20 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
21 | * more details. | ||
22 | * | ||
23 | * You should have received a copy of the GNU General Public License along with | ||
24 | * this program. If not, see <http://www.gnu.org/licenses/>. | ||
25 | */ | ||
26 | |||
27 | #ifndef __OMAP_PANEL_DATA_H | ||
28 | #define __OMAP_PANEL_DATA_H | ||
29 | |||
30 | struct omap_dss_device; | ||
31 | |||
32 | /** | ||
33 | * struct panel_generic_dpi_data - panel driver configuration data | ||
34 | * @name: panel name | ||
35 | * @platform_enable: platform specific panel enable function | ||
36 | * @platform_disable: platform specific panel disable function | ||
37 | * @num_gpios: number of gpios connected to panel | ||
38 | * @gpios: gpio numbers on the platform | ||
39 | * @gpio_invert: configure gpio as active high or low | ||
40 | */ | ||
41 | struct panel_generic_dpi_data { | ||
42 | const char *name; | ||
43 | int (*platform_enable)(struct omap_dss_device *dssdev); | ||
44 | void (*platform_disable)(struct omap_dss_device *dssdev); | ||
45 | |||
46 | int num_gpios; | ||
47 | int gpios[10]; | ||
48 | bool gpio_invert[10]; | ||
49 | }; | ||
50 | |||
51 | /** | ||
52 | * struct panel_n8x0_data - N800 panel driver configuration data | ||
53 | */ | ||
54 | struct panel_n8x0_data { | ||
55 | int (*platform_enable)(struct omap_dss_device *dssdev); | ||
56 | void (*platform_disable)(struct omap_dss_device *dssdev); | ||
57 | int panel_reset; | ||
58 | int ctrl_pwrdown; | ||
59 | }; | ||
60 | |||
61 | /** | ||
62 | * struct nokia_dsi_panel_data - Nokia DSI panel driver configuration data | ||
63 | * @name: panel name | ||
64 | * @use_ext_te: use external TE | ||
65 | * @ext_te_gpio: external TE GPIO | ||
66 | * @esd_interval: interval of ESD checks, 0 = disabled (ms) | ||
67 | * @ulps_timeout: time to wait before entering ULPS, 0 = disabled (ms) | ||
68 | * @use_dsi_backlight: true if panel uses DSI command to control backlight | ||
69 | * @pin_config: DSI pin configuration | ||
70 | */ | ||
71 | |||
72 | struct nokia_dsi_panel_data { | ||
73 | const char *name; | ||
74 | |||
75 | int reset_gpio; | ||
76 | |||
77 | bool use_ext_te; | ||
78 | int ext_te_gpio; | ||
79 | |||
80 | unsigned esd_interval; | ||
81 | unsigned ulps_timeout; | ||
82 | |||
83 | bool use_dsi_backlight; | ||
84 | |||
85 | struct omap_dsi_pin_config pin_config; | ||
86 | }; | ||
87 | |||
88 | /** | ||
89 | * struct picodlp_panel_data - picodlp panel driver configuration data | ||
90 | * @picodlp_adapter_id: i2c_adapter number for picodlp | ||
91 | */ | ||
92 | struct picodlp_panel_data { | ||
93 | int picodlp_adapter_id; | ||
94 | int emu_done_gpio; | ||
95 | int pwrgood_gpio; | ||
96 | }; | ||
97 | |||
98 | /** | ||
99 | * struct tfp410_platform_data - tfp410 panel driver configuration data | ||
100 | * @i2c_bus_num: i2c bus id for the panel | ||
101 | * @power_down_gpio: gpio number for PD pin (or -1 if not available) | ||
102 | */ | ||
103 | struct tfp410_platform_data { | ||
104 | int i2c_bus_num; | ||
105 | int power_down_gpio; | ||
106 | }; | ||
107 | |||
108 | /** | ||
109 | * sharp ls panel driver configuration data | ||
110 | * @resb_gpio: reset signal | ||
111 | * @ini_gpio: power on control | ||
112 | * @mo_gpio: selection for resolution(VGA/QVGA) | ||
113 | * @lr_gpio: selection for horizontal scanning direction | ||
114 | * @ud_gpio: selection for vertical scanning direction | ||
115 | */ | ||
116 | struct panel_sharp_ls037v7dw01_data { | ||
117 | int resb_gpio; | ||
118 | int ini_gpio; | ||
119 | int mo_gpio; | ||
120 | int lr_gpio; | ||
121 | int ud_gpio; | ||
122 | }; | ||
123 | |||
124 | /** | ||
125 | * acx565akm panel driver configuration data | ||
126 | * @reset_gpio: reset signal | ||
127 | */ | ||
128 | struct panel_acx565akm_data { | ||
129 | int reset_gpio; | ||
130 | }; | ||
131 | |||
132 | /** | ||
133 | * nec nl8048 panel driver configuration data | ||
134 | * @res_gpio: reset signal | ||
135 | * @qvga_gpio: selection for resolution(QVGA/WVGA) | ||
136 | */ | ||
137 | struct panel_nec_nl8048_data { | ||
138 | int res_gpio; | ||
139 | int qvga_gpio; | ||
140 | }; | ||
141 | |||
142 | /** | ||
143 | * tpo td043 panel driver configuration data | ||
144 | * @nreset_gpio: reset signal | ||
145 | */ | ||
146 | struct panel_tpo_td043_data { | ||
147 | int nreset_gpio; | ||
148 | }; | ||
149 | |||
150 | #endif /* __OMAP_PANEL_DATA_H */ | ||
diff --git a/include/video/omap-panel-generic-dpi.h b/include/video/omap-panel-generic-dpi.h deleted file mode 100644 index 127e3f20328e..000000000000 --- a/include/video/omap-panel-generic-dpi.h +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | /* | ||
2 | * Header for generic DPI panel driver | ||
3 | * | ||
4 | * Copyright (C) 2010 Canonical Ltd. | ||
5 | * Author: Bryan Wu <bryan.wu@canonical.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_GENERIC_DPI_H | ||
21 | #define __OMAP_PANEL_GENERIC_DPI_H | ||
22 | |||
23 | struct omap_dss_device; | ||
24 | |||
25 | /** | ||
26 | * struct panel_generic_dpi_data - panel driver configuration data | ||
27 | * @name: panel name | ||
28 | * @platform_enable: platform specific panel enable function | ||
29 | * @platform_disable: platform specific panel disable function | ||
30 | */ | ||
31 | struct panel_generic_dpi_data { | ||
32 | const char *name; | ||
33 | int (*platform_enable)(struct omap_dss_device *dssdev); | ||
34 | void (*platform_disable)(struct omap_dss_device *dssdev); | ||
35 | }; | ||
36 | |||
37 | #endif /* __OMAP_PANEL_GENERIC_DPI_H */ | ||
diff --git a/include/video/omap-panel-n8x0.h b/include/video/omap-panel-n8x0.h deleted file mode 100644 index 50a1302e2cfd..000000000000 --- a/include/video/omap-panel-n8x0.h +++ /dev/null | |||
@@ -1,15 +0,0 @@ | |||
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 deleted file mode 100644 index 04219a295539..000000000000 --- a/include/video/omap-panel-nokia-dsi.h +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | #ifndef __OMAP_NOKIA_DSI_PANEL_H | ||
2 | #define __OMAP_NOKIA_DSI_PANEL_H | ||
3 | |||
4 | struct omap_dss_device; | ||
5 | |||
6 | /** | ||
7 | * struct nokia_dsi_panel_data - Nokia DSI panel driver configuration | ||
8 | * @name: panel name | ||
9 | * @use_ext_te: use external TE | ||
10 | * @ext_te_gpio: external TE GPIO | ||
11 | * @esd_interval: interval of ESD checks, 0 = disabled (ms) | ||
12 | * @ulps_timeout: time to wait before entering ULPS, 0 = disabled (ms) | ||
13 | * @use_dsi_backlight: true if panel uses DSI command to control backlight | ||
14 | * @pin_config: DSI pin configuration | ||
15 | */ | ||
16 | struct nokia_dsi_panel_data { | ||
17 | const char *name; | ||
18 | |||
19 | int reset_gpio; | ||
20 | |||
21 | bool use_ext_te; | ||
22 | int ext_te_gpio; | ||
23 | |||
24 | unsigned esd_interval; | ||
25 | unsigned ulps_timeout; | ||
26 | |||
27 | bool use_dsi_backlight; | ||
28 | |||
29 | struct omap_dsi_pin_config pin_config; | ||
30 | }; | ||
31 | |||
32 | #endif /* __OMAP_NOKIA_DSI_PANEL_H */ | ||
diff --git a/include/video/omap-panel-picodlp.h b/include/video/omap-panel-picodlp.h deleted file mode 100644 index 1c342ef6f3a1..000000000000 --- a/include/video/omap-panel-picodlp.h +++ /dev/null | |||
@@ -1,23 +0,0 @@ | |||
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/omap-panel-tfp410.h b/include/video/omap-panel-tfp410.h deleted file mode 100644 index aef35e48bc7e..000000000000 --- a/include/video/omap-panel-tfp410.h +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | /* | ||
2 | * Header for TFP410 chip 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_TFP410_H | ||
21 | #define __OMAP_PANEL_TFP410_H | ||
22 | |||
23 | struct omap_dss_device; | ||
24 | |||
25 | /** | ||
26 | * struct tfp410_platform_data - panel driver configuration data | ||
27 | * @i2c_bus_num: i2c bus id for the panel | ||
28 | * @power_down_gpio: gpio number for PD pin (or -1 if not available) | ||
29 | */ | ||
30 | struct tfp410_platform_data { | ||
31 | int i2c_bus_num; | ||
32 | int power_down_gpio; | ||
33 | }; | ||
34 | |||
35 | #endif /* __OMAP_PANEL_TFP410_H */ | ||
diff --git a/include/video/omapdss.h b/include/video/omapdss.h index caefa093337d..aeb4e9a0c5d1 100644 --- a/include/video/omapdss.h +++ b/include/video/omapdss.h | |||
@@ -257,10 +257,31 @@ void rfbi_bus_unlock(void); | |||
257 | 257 | ||
258 | /* DSI */ | 258 | /* DSI */ |
259 | 259 | ||
260 | enum omap_dss_dsi_trans_mode { | ||
261 | /* Sync Pulses: both sync start and end packets sent */ | ||
262 | OMAP_DSS_DSI_PULSE_MODE, | ||
263 | /* Sync Events: only sync start packets sent */ | ||
264 | OMAP_DSS_DSI_EVENT_MODE, | ||
265 | /* Burst: only sync start packets sent, pixels are time compressed */ | ||
266 | OMAP_DSS_DSI_BURST_MODE, | ||
267 | }; | ||
268 | |||
260 | struct omap_dss_dsi_videomode_timings { | 269 | struct omap_dss_dsi_videomode_timings { |
270 | unsigned long hsclk; | ||
271 | |||
272 | unsigned ndl; | ||
273 | unsigned bitspp; | ||
274 | |||
275 | /* pixels */ | ||
276 | u16 hact; | ||
277 | /* lines */ | ||
278 | u16 vact; | ||
279 | |||
261 | /* DSI video mode blanking data */ | 280 | /* DSI video mode blanking data */ |
262 | /* Unit: byte clock cycles */ | 281 | /* Unit: byte clock cycles */ |
282 | u16 hss; | ||
263 | u16 hsa; | 283 | u16 hsa; |
284 | u16 hse; | ||
264 | u16 hfp; | 285 | u16 hfp; |
265 | u16 hbp; | 286 | u16 hbp; |
266 | /* Unit: line clocks */ | 287 | /* Unit: line clocks */ |
@@ -274,14 +295,24 @@ struct omap_dss_dsi_videomode_timings { | |||
274 | int hbp_blanking_mode; | 295 | int hbp_blanking_mode; |
275 | int hfp_blanking_mode; | 296 | int hfp_blanking_mode; |
276 | 297 | ||
277 | /* Video port sync events */ | 298 | enum omap_dss_dsi_trans_mode trans_mode; |
278 | bool vp_vsync_end; | ||
279 | bool vp_hsync_end; | ||
280 | 299 | ||
281 | bool ddr_clk_always_on; | 300 | bool ddr_clk_always_on; |
282 | int window_sync; | 301 | int window_sync; |
283 | }; | 302 | }; |
284 | 303 | ||
304 | struct omap_dss_dsi_config { | ||
305 | enum omap_dss_dsi_mode mode; | ||
306 | enum omap_dss_dsi_pixel_format pixel_format; | ||
307 | const struct omap_video_timings *timings; | ||
308 | |||
309 | unsigned long hs_clk_min, hs_clk_max; | ||
310 | unsigned long lp_clk_min, lp_clk_max; | ||
311 | |||
312 | bool ddr_clk_always_on; | ||
313 | enum omap_dss_dsi_trans_mode trans_mode; | ||
314 | }; | ||
315 | |||
285 | void dsi_bus_lock(struct omap_dss_device *dssdev); | 316 | void dsi_bus_lock(struct omap_dss_device *dssdev); |
286 | void dsi_bus_unlock(struct omap_dss_device *dssdev); | 317 | void dsi_bus_unlock(struct omap_dss_device *dssdev); |
287 | int dsi_vc_dcs_write(struct omap_dss_device *dssdev, int channel, u8 *data, | 318 | int dsi_vc_dcs_write(struct omap_dss_device *dssdev, int channel, u8 *data, |
@@ -541,9 +572,14 @@ struct omap_dss_writeback_info { | |||
541 | struct omap_dss_output { | 572 | struct omap_dss_output { |
542 | struct list_head list; | 573 | struct list_head list; |
543 | 574 | ||
575 | const char *name; | ||
576 | |||
544 | /* display type supported by the output */ | 577 | /* display type supported by the output */ |
545 | enum omap_display_type type; | 578 | enum omap_display_type type; |
546 | 579 | ||
580 | /* DISPC channel for this output */ | ||
581 | enum omap_channel dispc_channel; | ||
582 | |||
547 | /* output instance */ | 583 | /* output instance */ |
548 | enum omap_dss_output_id id; | 584 | enum omap_dss_output_id id; |
549 | 585 | ||
@@ -561,6 +597,7 @@ struct omap_dss_device { | |||
561 | 597 | ||
562 | enum omap_display_type type; | 598 | enum omap_display_type type; |
563 | 599 | ||
600 | /* obsolete, to be removed */ | ||
564 | enum omap_channel channel; | 601 | enum omap_channel channel; |
565 | 602 | ||
566 | union { | 603 | union { |
@@ -591,40 +628,10 @@ struct omap_dss_device { | |||
591 | } phy; | 628 | } phy; |
592 | 629 | ||
593 | struct { | 630 | struct { |
594 | struct { | ||
595 | struct { | ||
596 | u16 lck_div; | ||
597 | u16 pck_div; | ||
598 | enum omap_dss_clk_source lcd_clk_src; | ||
599 | } channel; | ||
600 | |||
601 | enum omap_dss_clk_source dispc_fclk_src; | ||
602 | } dispc; | ||
603 | |||
604 | struct { | ||
605 | /* regn is one greater than TRM's REGN value */ | ||
606 | u16 regn; | ||
607 | u16 regm; | ||
608 | u16 regm_dispc; | ||
609 | u16 regm_dsi; | ||
610 | |||
611 | u16 lp_clk_div; | ||
612 | enum omap_dss_clk_source dsi_fclk_src; | ||
613 | } dsi; | ||
614 | |||
615 | struct { | ||
616 | /* regn is one greater than TRM's REGN value */ | ||
617 | u16 regn; | ||
618 | u16 regm2; | ||
619 | } hdmi; | ||
620 | } clocks; | ||
621 | |||
622 | struct { | ||
623 | struct omap_video_timings timings; | 631 | struct omap_video_timings timings; |
624 | 632 | ||
625 | enum omap_dss_dsi_pixel_format dsi_pix_fmt; | 633 | enum omap_dss_dsi_pixel_format dsi_pix_fmt; |
626 | enum omap_dss_dsi_mode dsi_mode; | 634 | enum omap_dss_dsi_mode dsi_mode; |
627 | struct omap_dss_dsi_videomode_timings dsi_vm_timings; | ||
628 | } panel; | 635 | } panel; |
629 | 636 | ||
630 | struct { | 637 | struct { |
@@ -741,6 +748,7 @@ struct omap_dss_driver { | |||
741 | }; | 748 | }; |
742 | 749 | ||
743 | enum omapdss_version omapdss_get_version(void); | 750 | enum omapdss_version omapdss_get_version(void); |
751 | bool omapdss_is_initialized(void); | ||
744 | 752 | ||
745 | int omap_dss_register_driver(struct omap_dss_driver *); | 753 | int omap_dss_register_driver(struct omap_dss_driver *); |
746 | void omap_dss_unregister_driver(struct omap_dss_driver *); | 754 | void omap_dss_unregister_driver(struct omap_dss_driver *); |
@@ -829,15 +837,8 @@ int dispc_ovl_setup(enum omap_plane plane, const struct omap_overlay_info *oi, | |||
829 | void omapdss_dsi_vc_enable_hs(struct omap_dss_device *dssdev, int channel, | 837 | void omapdss_dsi_vc_enable_hs(struct omap_dss_device *dssdev, int channel, |
830 | bool enable); | 838 | bool enable); |
831 | int omapdss_dsi_enable_te(struct omap_dss_device *dssdev, bool enable); | 839 | int omapdss_dsi_enable_te(struct omap_dss_device *dssdev, bool enable); |
832 | void omapdss_dsi_set_timings(struct omap_dss_device *dssdev, | 840 | int omapdss_dsi_set_config(struct omap_dss_device *dssdev, |
833 | struct omap_video_timings *timings); | 841 | const struct omap_dss_dsi_config *config); |
834 | void omapdss_dsi_set_size(struct omap_dss_device *dssdev, u16 w, u16 h); | ||
835 | void omapdss_dsi_set_pixel_format(struct omap_dss_device *dssdev, | ||
836 | enum omap_dss_dsi_pixel_format fmt); | ||
837 | void omapdss_dsi_set_operation_mode(struct omap_dss_device *dssdev, | ||
838 | enum omap_dss_dsi_mode mode); | ||
839 | void omapdss_dsi_set_videomode_timings(struct omap_dss_device *dssdev, | ||
840 | struct omap_dss_dsi_videomode_timings *timings); | ||
841 | 842 | ||
842 | int omap_dsi_update(struct omap_dss_device *dssdev, int channel, | 843 | int omap_dsi_update(struct omap_dss_device *dssdev, int channel, |
843 | void (*callback)(int, void *), void *data); | 844 | void (*callback)(int, void *), void *data); |
@@ -846,8 +847,6 @@ int omap_dsi_set_vc_id(struct omap_dss_device *dssdev, int channel, int vc_id); | |||
846 | void omap_dsi_release_vc(struct omap_dss_device *dssdev, int channel); | 847 | void omap_dsi_release_vc(struct omap_dss_device *dssdev, int channel); |
847 | int omapdss_dsi_configure_pins(struct omap_dss_device *dssdev, | 848 | int omapdss_dsi_configure_pins(struct omap_dss_device *dssdev, |
848 | const struct omap_dsi_pin_config *pin_cfg); | 849 | const struct omap_dsi_pin_config *pin_cfg); |
849 | int omapdss_dsi_set_clocks(struct omap_dss_device *dssdev, | ||
850 | unsigned long ddr_clk, unsigned long lp_clk); | ||
851 | 850 | ||
852 | int omapdss_dsi_display_enable(struct omap_dss_device *dssdev); | 851 | int omapdss_dsi_display_enable(struct omap_dss_device *dssdev); |
853 | void omapdss_dsi_display_disable(struct omap_dss_device *dssdev, | 852 | void omapdss_dsi_display_disable(struct omap_dss_device *dssdev, |
diff --git a/include/video/platform_lcd.h b/include/video/platform_lcd.h index ad3bdfe743b2..23864b284147 100644 --- a/include/video/platform_lcd.h +++ b/include/video/platform_lcd.h | |||
@@ -15,6 +15,7 @@ struct plat_lcd_data; | |||
15 | struct fb_info; | 15 | struct fb_info; |
16 | 16 | ||
17 | struct plat_lcd_data { | 17 | struct plat_lcd_data { |
18 | int (*probe)(struct plat_lcd_data *); | ||
18 | void (*set_power)(struct plat_lcd_data *, unsigned int power); | 19 | void (*set_power)(struct plat_lcd_data *, unsigned int power); |
19 | int (*match_fb)(struct plat_lcd_data *, struct fb_info *); | 20 | int (*match_fb)(struct plat_lcd_data *, struct fb_info *); |
20 | }; | 21 | }; |
diff --git a/include/video/videomode.h b/include/video/videomode.h index a42156234dd4..3f1049d870d5 100644 --- a/include/video/videomode.h +++ b/include/video/videomode.h | |||
@@ -29,20 +29,30 @@ struct videomode { | |||
29 | u32 vback_porch; | 29 | u32 vback_porch; |
30 | u32 vsync_len; | 30 | u32 vsync_len; |
31 | 31 | ||
32 | unsigned int dmt_flags; /* VESA DMT flags */ | 32 | enum display_flags flags; /* display flags */ |
33 | unsigned int data_flags; /* video data flags */ | ||
34 | }; | 33 | }; |
35 | 34 | ||
36 | /** | 35 | /** |
37 | * videomode_from_timing - convert display timing to videomode | 36 | * videomode_from_timing - convert display timing to videomode |
37 | * @dt: display_timing structure | ||
38 | * @vm: return value | ||
39 | * | ||
40 | * DESCRIPTION: | ||
41 | * This function converts a struct display_timing to a struct videomode. | ||
42 | */ | ||
43 | void videomode_from_timing(const struct display_timing *dt, | ||
44 | struct videomode *vm); | ||
45 | |||
46 | /** | ||
47 | * videomode_from_timings - convert one display timings entry to videomode | ||
38 | * @disp: structure with all possible timing entries | 48 | * @disp: structure with all possible timing entries |
39 | * @vm: return value | 49 | * @vm: return value |
40 | * @index: index into the list of display timings in devicetree | 50 | * @index: index into the list of display timings in devicetree |
41 | * | 51 | * |
42 | * DESCRIPTION: | 52 | * DESCRIPTION: |
43 | * This function converts a struct display_timing to a struct videomode. | 53 | * This function converts one struct display_timing entry to a struct videomode. |
44 | */ | 54 | */ |
45 | int videomode_from_timing(const struct display_timings *disp, | 55 | int videomode_from_timings(const struct display_timings *disp, |
46 | struct videomode *vm, unsigned int index); | 56 | struct videomode *vm, unsigned int index); |
47 | 57 | ||
48 | #endif | 58 | #endif |