aboutsummaryrefslogtreecommitdiffstats
path: root/include/video
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-05-02 22:40:34 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-05-02 22:40:34 -0400
commit20a2078ce7705a6e0722ef5184336eb8657a58d8 (patch)
tree5b927c96516380aa0ecd68d8a609f7cd72120ad5 /include/video
parent0279b3c0ada1d78882f24acf94ac4595bd657a89 (diff)
parent307b9c022720f9de90d58e51743e01e9a42aec59 (diff)
Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux
Pull drm updates from Dave Airlie: "This is the main drm pull request for 3.10. Wierd bits: - OMAP drm changes required OMAP dss changes, in drivers/video, so I took them in here. - one more fbcon fix for font handover - VT switch avoidance in pm code - scatterlist helpers for gpu drivers - have acks from akpm Highlights: - qxl kms driver - driver for the spice qxl virtual GPU Nouveau: - fermi/kepler VRAM compression - GK110/nvf0 modesetting support. Tegra: - host1x core merged with 2D engine support i915: - vt switchless resume - more valleyview support - vblank fixes - modesetting pipe config rework radeon: - UVD engine support - SI chip tiling support - GPU registers initialisation from golden values. exynos: - device tree changes - fimc block support Otherwise: - bunches of fixes all over the place." * 'drm-next' of git://people.freedesktop.org/~airlied/linux: (513 commits) qxl: update to new idr interfaces. drm/nouveau: fix build with nv50->nvc0 drm/radeon: fix handling of v6 power tables drm/radeon: clarify family checks in pm table parsing drm/radeon: consolidate UVD clock programming drm/radeon: fix UPLL_REF_DIV_MASK definition radeon: add bo tracking debugfs drm/radeon: add new richland pci ids drm/radeon: add some new SI PCI ids drm/radeon: fix scratch reg handling for UVD fence drm/radeon: allocate SA bo in the requested domain drm/radeon: fix possible segfault when parsing pm tables drm/radeon: fix endian bugs in atom_allocate_fb_scratch() OMAPDSS: TFP410: return EPROBE_DEFER if the i2c adapter not found OMAPDSS: VENC: Add error handling for venc_probe_pdata OMAPDSS: HDMI: Add error handling for hdmi_probe_pdata OMAPDSS: RFBI: Add error handling for rfbi_probe_pdata OMAPDSS: DSI: Add error handling for dsi_probe_pdata OMAPDSS: SDI: Add error handling for sdi_probe_pdata OMAPDSS: DPI: Add error handling for dpi_probe_pdata ...
Diffstat (limited to 'include/video')
-rw-r--r--include/video/omap-panel-data.h150
-rw-r--r--include/video/omap-panel-generic-dpi.h37
-rw-r--r--include/video/omap-panel-n8x0.h15
-rw-r--r--include/video/omap-panel-nokia-dsi.h32
-rw-r--r--include/video/omap-panel-picodlp.h23
-rw-r--r--include/video/omap-panel-tfp410.h35
-rw-r--r--include/video/omapdss.h86
7 files changed, 192 insertions, 186 deletions
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
30struct 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 */
41struct 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 */
54struct 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
72struct 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 */
92struct 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 */
103struct 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 */
116struct 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 */
128struct 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 */
137struct 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 */
146struct 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
23struct 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 */
31struct 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
4struct omap_dss_device;
5
6struct 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
4struct 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 */
16struct 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 */
18struct 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
23struct 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 */
30struct 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..62ca9a77c1d6 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
260enum 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
260struct omap_dss_dsi_videomode_timings { 269struct 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
304struct 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
285void dsi_bus_lock(struct omap_dss_device *dssdev); 316void dsi_bus_lock(struct omap_dss_device *dssdev);
286void dsi_bus_unlock(struct omap_dss_device *dssdev); 317void dsi_bus_unlock(struct omap_dss_device *dssdev);
287int dsi_vc_dcs_write(struct omap_dss_device *dssdev, int channel, u8 *data, 318int dsi_vc_dcs_write(struct omap_dss_device *dssdev, int channel, u8 *data,
@@ -541,9 +572,14 @@ struct omap_dss_writeback_info {
541struct omap_dss_output { 572struct 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 {
@@ -829,15 +836,8 @@ int dispc_ovl_setup(enum omap_plane plane, const struct omap_overlay_info *oi,
829void omapdss_dsi_vc_enable_hs(struct omap_dss_device *dssdev, int channel, 836void omapdss_dsi_vc_enable_hs(struct omap_dss_device *dssdev, int channel,
830 bool enable); 837 bool enable);
831int omapdss_dsi_enable_te(struct omap_dss_device *dssdev, bool enable); 838int omapdss_dsi_enable_te(struct omap_dss_device *dssdev, bool enable);
832void omapdss_dsi_set_timings(struct omap_dss_device *dssdev, 839int omapdss_dsi_set_config(struct omap_dss_device *dssdev,
833 struct omap_video_timings *timings); 840 const struct omap_dss_dsi_config *config);
834void omapdss_dsi_set_size(struct omap_dss_device *dssdev, u16 w, u16 h);
835void omapdss_dsi_set_pixel_format(struct omap_dss_device *dssdev,
836 enum omap_dss_dsi_pixel_format fmt);
837void omapdss_dsi_set_operation_mode(struct omap_dss_device *dssdev,
838 enum omap_dss_dsi_mode mode);
839void omapdss_dsi_set_videomode_timings(struct omap_dss_device *dssdev,
840 struct omap_dss_dsi_videomode_timings *timings);
841 841
842int omap_dsi_update(struct omap_dss_device *dssdev, int channel, 842int omap_dsi_update(struct omap_dss_device *dssdev, int channel,
843 void (*callback)(int, void *), void *data); 843 void (*callback)(int, void *), void *data);
@@ -846,8 +846,6 @@ int omap_dsi_set_vc_id(struct omap_dss_device *dssdev, int channel, int vc_id);
846void omap_dsi_release_vc(struct omap_dss_device *dssdev, int channel); 846void omap_dsi_release_vc(struct omap_dss_device *dssdev, int channel);
847int omapdss_dsi_configure_pins(struct omap_dss_device *dssdev, 847int omapdss_dsi_configure_pins(struct omap_dss_device *dssdev,
848 const struct omap_dsi_pin_config *pin_cfg); 848 const struct omap_dsi_pin_config *pin_cfg);
849int omapdss_dsi_set_clocks(struct omap_dss_device *dssdev,
850 unsigned long ddr_clk, unsigned long lp_clk);
851 849
852int omapdss_dsi_display_enable(struct omap_dss_device *dssdev); 850int omapdss_dsi_display_enable(struct omap_dss_device *dssdev);
853void omapdss_dsi_display_disable(struct omap_dss_device *dssdev, 851void omapdss_dsi_display_disable(struct omap_dss_device *dssdev,