diff options
author | Peter Ujfalusi <peter.ujfalusi@ti.com> | 2016-05-31 04:43:12 -0400 |
---|---|---|
committer | Peter Ujfalusi <peter.ujfalusi@ti.com> | 2016-06-03 09:06:38 -0400 |
commit | 62d9e44ee29f42367b3fae3480825a5c742ec3fc (patch) | |
tree | e74d7c1f862de67cc38e3b7dc65e745eaea4f19d | |
parent | 32043da7dcf2af3510d0410b0cacfbcde95e5d26 (diff) |
omapfb: Create new header file for omapfb DSS implementation
Copy the content of video/omapdss.h to a new (video/omapfb_dss.h) header
file and convert the omapfb drivers to use this new file.
The new header file is needed to complete the separation of omapdrm and
omapfb implementation of DSS.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
48 files changed, 927 insertions, 47 deletions
diff --git a/drivers/video/fbdev/omap2/omapfb/displays/connector-analog-tv.c b/drivers/video/fbdev/omap2/omapfb/displays/connector-analog-tv.c index d963b4a9cfc0..9d78411a3bf7 100644 --- a/drivers/video/fbdev/omap2/omapfb/displays/connector-analog-tv.c +++ b/drivers/video/fbdev/omap2/omapfb/displays/connector-analog-tv.c | |||
@@ -14,7 +14,7 @@ | |||
14 | #include <linux/platform_device.h> | 14 | #include <linux/platform_device.h> |
15 | #include <linux/of.h> | 15 | #include <linux/of.h> |
16 | 16 | ||
17 | #include <video/omapdss.h> | 17 | #include <video/omapfb_dss.h> |
18 | #include <video/omap-panel-data.h> | 18 | #include <video/omap-panel-data.h> |
19 | 19 | ||
20 | struct panel_drv_data { | 20 | struct panel_drv_data { |
diff --git a/drivers/video/fbdev/omap2/omapfb/displays/connector-dvi.c b/drivers/video/fbdev/omap2/omapfb/displays/connector-dvi.c index f2abbec7602a..06e1db34541e 100644 --- a/drivers/video/fbdev/omap2/omapfb/displays/connector-dvi.c +++ b/drivers/video/fbdev/omap2/omapfb/displays/connector-dvi.c | |||
@@ -16,7 +16,7 @@ | |||
16 | 16 | ||
17 | #include <drm/drm_edid.h> | 17 | #include <drm/drm_edid.h> |
18 | 18 | ||
19 | #include <video/omapdss.h> | 19 | #include <video/omapfb_dss.h> |
20 | 20 | ||
21 | static const struct omap_video_timings dvic_default_timings = { | 21 | static const struct omap_video_timings dvic_default_timings = { |
22 | .x_res = 640, | 22 | .x_res = 640, |
diff --git a/drivers/video/fbdev/omap2/omapfb/displays/connector-hdmi.c b/drivers/video/fbdev/omap2/omapfb/displays/connector-hdmi.c index 231b8588a59f..58d5803ede67 100644 --- a/drivers/video/fbdev/omap2/omapfb/displays/connector-hdmi.c +++ b/drivers/video/fbdev/omap2/omapfb/displays/connector-hdmi.c | |||
@@ -17,7 +17,7 @@ | |||
17 | 17 | ||
18 | #include <drm/drm_edid.h> | 18 | #include <drm/drm_edid.h> |
19 | 19 | ||
20 | #include <video/omapdss.h> | 20 | #include <video/omapfb_dss.h> |
21 | 21 | ||
22 | static const struct omap_video_timings hdmic_default_timings = { | 22 | static const struct omap_video_timings hdmic_default_timings = { |
23 | .x_res = 640, | 23 | .x_res = 640, |
diff --git a/drivers/video/fbdev/omap2/omapfb/displays/encoder-opa362.c b/drivers/video/fbdev/omap2/omapfb/displays/encoder-opa362.c index 8c246c213e06..a9a67167cc3d 100644 --- a/drivers/video/fbdev/omap2/omapfb/displays/encoder-opa362.c +++ b/drivers/video/fbdev/omap2/omapfb/displays/encoder-opa362.c | |||
@@ -20,7 +20,7 @@ | |||
20 | #include <linux/slab.h> | 20 | #include <linux/slab.h> |
21 | #include <linux/of_gpio.h> | 21 | #include <linux/of_gpio.h> |
22 | 22 | ||
23 | #include <video/omapdss.h> | 23 | #include <video/omapfb_dss.h> |
24 | 24 | ||
25 | struct panel_drv_data { | 25 | struct panel_drv_data { |
26 | struct omap_dss_device dssdev; | 26 | struct omap_dss_device dssdev; |
diff --git a/drivers/video/fbdev/omap2/omapfb/displays/encoder-tfp410.c b/drivers/video/fbdev/omap2/omapfb/displays/encoder-tfp410.c index 778e3b384c2f..8c0953d069b7 100644 --- a/drivers/video/fbdev/omap2/omapfb/displays/encoder-tfp410.c +++ b/drivers/video/fbdev/omap2/omapfb/displays/encoder-tfp410.c | |||
@@ -15,7 +15,7 @@ | |||
15 | #include <linux/slab.h> | 15 | #include <linux/slab.h> |
16 | #include <linux/of_gpio.h> | 16 | #include <linux/of_gpio.h> |
17 | 17 | ||
18 | #include <video/omapdss.h> | 18 | #include <video/omapfb_dss.h> |
19 | 19 | ||
20 | struct panel_drv_data { | 20 | struct panel_drv_data { |
21 | struct omap_dss_device dssdev; | 21 | struct omap_dss_device dssdev; |
diff --git a/drivers/video/fbdev/omap2/omapfb/displays/encoder-tpd12s015.c b/drivers/video/fbdev/omap2/omapfb/displays/encoder-tpd12s015.c index 7939157af957..80dc47347e21 100644 --- a/drivers/video/fbdev/omap2/omapfb/displays/encoder-tpd12s015.c +++ b/drivers/video/fbdev/omap2/omapfb/displays/encoder-tpd12s015.c | |||
@@ -16,7 +16,7 @@ | |||
16 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
17 | #include <linux/gpio/consumer.h> | 17 | #include <linux/gpio/consumer.h> |
18 | 18 | ||
19 | #include <video/omapdss.h> | 19 | #include <video/omapfb_dss.h> |
20 | 20 | ||
21 | struct panel_drv_data { | 21 | struct panel_drv_data { |
22 | struct omap_dss_device dssdev; | 22 | struct omap_dss_device dssdev; |
diff --git a/drivers/video/fbdev/omap2/omapfb/displays/panel-dpi.c b/drivers/video/fbdev/omap2/omapfb/displays/panel-dpi.c index e780fd4f8b46..ace3d818afe5 100644 --- a/drivers/video/fbdev/omap2/omapfb/displays/panel-dpi.c +++ b/drivers/video/fbdev/omap2/omapfb/displays/panel-dpi.c | |||
@@ -16,7 +16,7 @@ | |||
16 | #include <linux/of.h> | 16 | #include <linux/of.h> |
17 | #include <linux/of_gpio.h> | 17 | #include <linux/of_gpio.h> |
18 | 18 | ||
19 | #include <video/omapdss.h> | 19 | #include <video/omapfb_dss.h> |
20 | #include <video/omap-panel-data.h> | 20 | #include <video/omap-panel-data.h> |
21 | #include <video/of_display_timing.h> | 21 | #include <video/of_display_timing.h> |
22 | 22 | ||
diff --git a/drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.c b/drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.c index a4eac6962b76..b58012b82b6f 100644 --- a/drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.c +++ b/drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.c | |||
@@ -25,7 +25,7 @@ | |||
25 | #include <linux/of_device.h> | 25 | #include <linux/of_device.h> |
26 | #include <linux/of_gpio.h> | 26 | #include <linux/of_gpio.h> |
27 | 27 | ||
28 | #include <video/omapdss.h> | 28 | #include <video/omapfb_dss.h> |
29 | #include <video/mipi_display.h> | 29 | #include <video/mipi_display.h> |
30 | 30 | ||
31 | /* DSI Virtual channel. Hardcoded for now. */ | 31 | /* DSI Virtual channel. Hardcoded for now. */ |
diff --git a/drivers/video/fbdev/omap2/omapfb/displays/panel-lgphilips-lb035q02.c b/drivers/video/fbdev/omap2/omapfb/displays/panel-lgphilips-lb035q02.c index 6d5207c7b22c..f14691ce8d02 100644 --- a/drivers/video/fbdev/omap2/omapfb/displays/panel-lgphilips-lb035q02.c +++ b/drivers/video/fbdev/omap2/omapfb/displays/panel-lgphilips-lb035q02.c | |||
@@ -16,7 +16,7 @@ | |||
16 | #include <linux/mutex.h> | 16 | #include <linux/mutex.h> |
17 | #include <linux/gpio.h> | 17 | #include <linux/gpio.h> |
18 | 18 | ||
19 | #include <video/omapdss.h> | 19 | #include <video/omapfb_dss.h> |
20 | 20 | ||
21 | static struct omap_video_timings lb035q02_timings = { | 21 | static struct omap_video_timings lb035q02_timings = { |
22 | .x_res = 320, | 22 | .x_res = 320, |
diff --git a/drivers/video/fbdev/omap2/omapfb/displays/panel-nec-nl8048hl11.c b/drivers/video/fbdev/omap2/omapfb/displays/panel-nec-nl8048hl11.c index 3852cea3c947..a2cbadd3eca3 100644 --- a/drivers/video/fbdev/omap2/omapfb/displays/panel-nec-nl8048hl11.c +++ b/drivers/video/fbdev/omap2/omapfb/displays/panel-nec-nl8048hl11.c | |||
@@ -18,7 +18,7 @@ | |||
18 | #include <linux/gpio.h> | 18 | #include <linux/gpio.h> |
19 | #include <linux/of_gpio.h> | 19 | #include <linux/of_gpio.h> |
20 | 20 | ||
21 | #include <video/omapdss.h> | 21 | #include <video/omapfb_dss.h> |
22 | 22 | ||
23 | struct panel_drv_data { | 23 | struct panel_drv_data { |
24 | struct omap_dss_device dssdev; | 24 | struct omap_dss_device dssdev; |
diff --git a/drivers/video/fbdev/omap2/omapfb/displays/panel-sharp-ls037v7dw01.c b/drivers/video/fbdev/omap2/omapfb/displays/panel-sharp-ls037v7dw01.c index a1e590155a26..a8be18a87fa0 100644 --- a/drivers/video/fbdev/omap2/omapfb/displays/panel-sharp-ls037v7dw01.c +++ b/drivers/video/fbdev/omap2/omapfb/displays/panel-sharp-ls037v7dw01.c | |||
@@ -17,7 +17,7 @@ | |||
17 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
18 | #include <linux/slab.h> | 18 | #include <linux/slab.h> |
19 | #include <linux/regulator/consumer.h> | 19 | #include <linux/regulator/consumer.h> |
20 | #include <video/omapdss.h> | 20 | #include <video/omapfb_dss.h> |
21 | 21 | ||
22 | struct panel_drv_data { | 22 | struct panel_drv_data { |
23 | struct omap_dss_device dssdev; | 23 | struct omap_dss_device dssdev; |
diff --git a/drivers/video/fbdev/omap2/omapfb/displays/panel-sony-acx565akm.c b/drivers/video/fbdev/omap2/omapfb/displays/panel-sony-acx565akm.c index 31efcca801bd..468560a6daae 100644 --- a/drivers/video/fbdev/omap2/omapfb/displays/panel-sony-acx565akm.c +++ b/drivers/video/fbdev/omap2/omapfb/displays/panel-sony-acx565akm.c | |||
@@ -33,7 +33,7 @@ | |||
33 | #include <linux/of.h> | 33 | #include <linux/of.h> |
34 | #include <linux/of_gpio.h> | 34 | #include <linux/of_gpio.h> |
35 | 35 | ||
36 | #include <video/omapdss.h> | 36 | #include <video/omapfb_dss.h> |
37 | #include <video/omap-panel-data.h> | 37 | #include <video/omap-panel-data.h> |
38 | 38 | ||
39 | #define MIPID_CMD_READ_DISP_ID 0x04 | 39 | #define MIPID_CMD_READ_DISP_ID 0x04 |
diff --git a/drivers/video/fbdev/omap2/omapfb/displays/panel-tpo-td028ttec1.c b/drivers/video/fbdev/omap2/omapfb/displays/panel-tpo-td028ttec1.c index f4dc023868ae..b529a8c2b652 100644 --- a/drivers/video/fbdev/omap2/omapfb/displays/panel-tpo-td028ttec1.c +++ b/drivers/video/fbdev/omap2/omapfb/displays/panel-tpo-td028ttec1.c | |||
@@ -28,7 +28,7 @@ | |||
28 | #include <linux/delay.h> | 28 | #include <linux/delay.h> |
29 | #include <linux/spi/spi.h> | 29 | #include <linux/spi/spi.h> |
30 | #include <linux/gpio.h> | 30 | #include <linux/gpio.h> |
31 | #include <video/omapdss.h> | 31 | #include <video/omapfb_dss.h> |
32 | 32 | ||
33 | struct panel_drv_data { | 33 | struct panel_drv_data { |
34 | struct omap_dss_device dssdev; | 34 | struct omap_dss_device dssdev; |
diff --git a/drivers/video/fbdev/omap2/omapfb/displays/panel-tpo-td043mtea1.c b/drivers/video/fbdev/omap2/omapfb/displays/panel-tpo-td043mtea1.c index f49e60da5bd3..51e628b85f4a 100644 --- a/drivers/video/fbdev/omap2/omapfb/displays/panel-tpo-td043mtea1.c +++ b/drivers/video/fbdev/omap2/omapfb/displays/panel-tpo-td043mtea1.c | |||
@@ -19,7 +19,7 @@ | |||
19 | #include <linux/slab.h> | 19 | #include <linux/slab.h> |
20 | #include <linux/of_gpio.h> | 20 | #include <linux/of_gpio.h> |
21 | 21 | ||
22 | #include <video/omapdss.h> | 22 | #include <video/omapfb_dss.h> |
23 | 23 | ||
24 | #define TPO_R02_MODE(x) ((x) & 7) | 24 | #define TPO_R02_MODE(x) ((x) & 7) |
25 | #define TPO_R02_MODE_800x480 7 | 25 | #define TPO_R02_MODE_800x480 7 |
diff --git a/drivers/video/fbdev/omap2/omapfb/dss/apply.c b/drivers/video/fbdev/omap2/omapfb/dss/apply.c index 663ccc3bf4e5..2481f4871f66 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/apply.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/apply.c | |||
@@ -23,7 +23,7 @@ | |||
23 | #include <linux/spinlock.h> | 23 | #include <linux/spinlock.h> |
24 | #include <linux/jiffies.h> | 24 | #include <linux/jiffies.h> |
25 | 25 | ||
26 | #include <video/omapdss.h> | 26 | #include <video/omapfb_dss.h> |
27 | 27 | ||
28 | #include "dss.h" | 28 | #include "dss.h" |
29 | #include "dss_features.h" | 29 | #include "dss_features.h" |
diff --git a/drivers/video/fbdev/omap2/omapfb/dss/core.c b/drivers/video/fbdev/omap2/omapfb/dss/core.c index b9de21d3ff09..29de4827589d 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/core.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/core.c | |||
@@ -35,7 +35,7 @@ | |||
35 | #include <linux/suspend.h> | 35 | #include <linux/suspend.h> |
36 | #include <linux/slab.h> | 36 | #include <linux/slab.h> |
37 | 37 | ||
38 | #include <video/omapdss.h> | 38 | #include <video/omapfb_dss.h> |
39 | 39 | ||
40 | #include "dss.h" | 40 | #include "dss.h" |
41 | #include "dss_features.h" | 41 | #include "dss_features.h" |
diff --git a/drivers/video/fbdev/omap2/omapfb/dss/dispc-compat.c b/drivers/video/fbdev/omap2/omapfb/dss/dispc-compat.c index 6607db37a5e4..3691bde4ce0a 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/dispc-compat.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/dispc-compat.c | |||
@@ -26,7 +26,7 @@ | |||
26 | #include <linux/interrupt.h> | 26 | #include <linux/interrupt.h> |
27 | #include <linux/seq_file.h> | 27 | #include <linux/seq_file.h> |
28 | 28 | ||
29 | #include <video/omapdss.h> | 29 | #include <video/omapfb_dss.h> |
30 | 30 | ||
31 | #include "dss.h" | 31 | #include "dss.h" |
32 | #include "dss_features.h" | 32 | #include "dss_features.h" |
diff --git a/drivers/video/fbdev/omap2/omapfb/dss/dispc.c b/drivers/video/fbdev/omap2/omapfb/dss/dispc.c index 5491e304f4fe..7a75dfda9845 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/dispc.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/dispc.c | |||
@@ -41,7 +41,7 @@ | |||
41 | #include <linux/of.h> | 41 | #include <linux/of.h> |
42 | #include <linux/component.h> | 42 | #include <linux/component.h> |
43 | 43 | ||
44 | #include <video/omapdss.h> | 44 | #include <video/omapfb_dss.h> |
45 | 45 | ||
46 | #include "dss.h" | 46 | #include "dss.h" |
47 | #include "dss_features.h" | 47 | #include "dss_features.h" |
diff --git a/drivers/video/fbdev/omap2/omapfb/dss/dispc_coefs.c b/drivers/video/fbdev/omap2/omapfb/dss/dispc_coefs.c index 038c15b04215..59c9a5c47ca9 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/dispc_coefs.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/dispc_coefs.c | |||
@@ -18,7 +18,7 @@ | |||
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
21 | #include <video/omapdss.h> | 21 | #include <video/omapfb_dss.h> |
22 | 22 | ||
23 | #include "dispc.h" | 23 | #include "dispc.h" |
24 | 24 | ||
diff --git a/drivers/video/fbdev/omap2/omapfb/dss/display-sysfs.c b/drivers/video/fbdev/omap2/omapfb/dss/display-sysfs.c index 75b5286029ee..b3fdbfd0b82d 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/display-sysfs.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/display-sysfs.c | |||
@@ -25,7 +25,7 @@ | |||
25 | #include <linux/platform_device.h> | 25 | #include <linux/platform_device.h> |
26 | #include <linux/sysfs.h> | 26 | #include <linux/sysfs.h> |
27 | 27 | ||
28 | #include <video/omapdss.h> | 28 | #include <video/omapfb_dss.h> |
29 | #include "dss.h" | 29 | #include "dss.h" |
30 | 30 | ||
31 | static ssize_t display_name_show(struct omap_dss_device *dssdev, char *buf) | 31 | static ssize_t display_name_show(struct omap_dss_device *dssdev, char *buf) |
diff --git a/drivers/video/fbdev/omap2/omapfb/dss/display.c b/drivers/video/fbdev/omap2/omapfb/dss/display.c index ef5b9027985d..dd5468695c43 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/display.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/display.c | |||
@@ -28,7 +28,7 @@ | |||
28 | #include <linux/platform_device.h> | 28 | #include <linux/platform_device.h> |
29 | #include <linux/of.h> | 29 | #include <linux/of.h> |
30 | 30 | ||
31 | #include <video/omapdss.h> | 31 | #include <video/omapfb_dss.h> |
32 | #include "dss.h" | 32 | #include "dss.h" |
33 | #include "dss_features.h" | 33 | #include "dss_features.h" |
34 | 34 | ||
diff --git a/drivers/video/fbdev/omap2/omapfb/dss/dpi.c b/drivers/video/fbdev/omap2/omapfb/dss/dpi.c index 7953e6a52346..da09806b940c 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/dpi.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/dpi.c | |||
@@ -34,7 +34,7 @@ | |||
34 | #include <linux/clk.h> | 34 | #include <linux/clk.h> |
35 | #include <linux/component.h> | 35 | #include <linux/component.h> |
36 | 36 | ||
37 | #include <video/omapdss.h> | 37 | #include <video/omapfb_dss.h> |
38 | 38 | ||
39 | #include "dss.h" | 39 | #include "dss.h" |
40 | #include "dss_features.h" | 40 | #include "dss_features.h" |
diff --git a/drivers/video/fbdev/omap2/omapfb/dss/dsi.c b/drivers/video/fbdev/omap2/omapfb/dss/dsi.c index d63e59807707..9e4800a4e3d1 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/dsi.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/dsi.c | |||
@@ -42,7 +42,7 @@ | |||
42 | #include <linux/of_platform.h> | 42 | #include <linux/of_platform.h> |
43 | #include <linux/component.h> | 43 | #include <linux/component.h> |
44 | 44 | ||
45 | #include <video/omapdss.h> | 45 | #include <video/omapfb_dss.h> |
46 | #include <video/mipi_display.h> | 46 | #include <video/mipi_display.h> |
47 | 47 | ||
48 | #include "dss.h" | 48 | #include "dss.h" |
diff --git a/drivers/video/fbdev/omap2/omapfb/dss/dss-of.c b/drivers/video/fbdev/omap2/omapfb/dss/dss-of.c index bf407b6ba15c..d356a252ab4a 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/dss-of.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/dss-of.c | |||
@@ -18,7 +18,7 @@ | |||
18 | #include <linux/of.h> | 18 | #include <linux/of.h> |
19 | #include <linux/seq_file.h> | 19 | #include <linux/seq_file.h> |
20 | 20 | ||
21 | #include <video/omapdss.h> | 21 | #include <video/omapfb_dss.h> |
22 | 22 | ||
23 | #include "dss.h" | 23 | #include "dss.h" |
24 | 24 | ||
diff --git a/drivers/video/fbdev/omap2/omapfb/dss/dss.c b/drivers/video/fbdev/omap2/omapfb/dss/dss.c index 0078c4d1fc31..47d7f69ad9ad 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/dss.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/dss.c | |||
@@ -41,7 +41,7 @@ | |||
41 | #include <linux/suspend.h> | 41 | #include <linux/suspend.h> |
42 | #include <linux/component.h> | 42 | #include <linux/component.h> |
43 | 43 | ||
44 | #include <video/omapdss.h> | 44 | #include <video/omapfb_dss.h> |
45 | 45 | ||
46 | #include "dss.h" | 46 | #include "dss.h" |
47 | #include "dss_features.h" | 47 | #include "dss_features.h" |
diff --git a/drivers/video/fbdev/omap2/omapfb/dss/dss_features.c b/drivers/video/fbdev/omap2/omapfb/dss/dss_features.c index c886a2927f73..8fc843b56b26 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/dss_features.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/dss_features.c | |||
@@ -23,7 +23,7 @@ | |||
23 | #include <linux/err.h> | 23 | #include <linux/err.h> |
24 | #include <linux/slab.h> | 24 | #include <linux/slab.h> |
25 | 25 | ||
26 | #include <video/omapdss.h> | 26 | #include <video/omapfb_dss.h> |
27 | 27 | ||
28 | #include "dss.h" | 28 | #include "dss.h" |
29 | #include "dss_features.h" | 29 | #include "dss_features.h" |
diff --git a/drivers/video/fbdev/omap2/omapfb/dss/hdmi.h b/drivers/video/fbdev/omap2/omapfb/dss/hdmi.h index c32a21a26054..f6de87e078b0 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/hdmi.h +++ b/drivers/video/fbdev/omap2/omapfb/dss/hdmi.h | |||
@@ -23,7 +23,7 @@ | |||
23 | #include <linux/io.h> | 23 | #include <linux/io.h> |
24 | #include <linux/platform_device.h> | 24 | #include <linux/platform_device.h> |
25 | #include <linux/hdmi.h> | 25 | #include <linux/hdmi.h> |
26 | #include <video/omapdss.h> | 26 | #include <video/omapfb_dss.h> |
27 | #include <sound/omap-hdmi-audio.h> | 27 | #include <sound/omap-hdmi-audio.h> |
28 | 28 | ||
29 | #include "dss.h" | 29 | #include "dss.h" |
diff --git a/drivers/video/fbdev/omap2/omapfb/dss/hdmi4.c b/drivers/video/fbdev/omap2/omapfb/dss/hdmi4.c index 2e71aec838b1..926a6f20dbb2 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/hdmi4.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/hdmi4.c | |||
@@ -33,7 +33,7 @@ | |||
33 | #include <linux/gpio.h> | 33 | #include <linux/gpio.h> |
34 | #include <linux/regulator/consumer.h> | 34 | #include <linux/regulator/consumer.h> |
35 | #include <linux/component.h> | 35 | #include <linux/component.h> |
36 | #include <video/omapdss.h> | 36 | #include <video/omapfb_dss.h> |
37 | #include <sound/omap-hdmi-audio.h> | 37 | #include <sound/omap-hdmi-audio.h> |
38 | 38 | ||
39 | #include "hdmi4_core.h" | 39 | #include "hdmi4_core.h" |
diff --git a/drivers/video/fbdev/omap2/omapfb/dss/hdmi5.c b/drivers/video/fbdev/omap2/omapfb/dss/hdmi5.c index aade6d99662a..0ee829a165c3 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/hdmi5.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/hdmi5.c | |||
@@ -38,7 +38,7 @@ | |||
38 | #include <linux/gpio.h> | 38 | #include <linux/gpio.h> |
39 | #include <linux/regulator/consumer.h> | 39 | #include <linux/regulator/consumer.h> |
40 | #include <linux/component.h> | 40 | #include <linux/component.h> |
41 | #include <video/omapdss.h> | 41 | #include <video/omapfb_dss.h> |
42 | #include <sound/omap-hdmi-audio.h> | 42 | #include <sound/omap-hdmi-audio.h> |
43 | 43 | ||
44 | #include "hdmi5_core.h" | 44 | #include "hdmi5_core.h" |
diff --git a/drivers/video/fbdev/omap2/omapfb/dss/hdmi_common.c b/drivers/video/fbdev/omap2/omapfb/dss/hdmi_common.c index 1b8fcc6c4ba1..189a5ad125a3 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/hdmi_common.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/hdmi_common.c | |||
@@ -4,7 +4,7 @@ | |||
4 | #include <linux/kernel.h> | 4 | #include <linux/kernel.h> |
5 | #include <linux/err.h> | 5 | #include <linux/err.h> |
6 | #include <linux/of.h> | 6 | #include <linux/of.h> |
7 | #include <video/omapdss.h> | 7 | #include <video/omapfb_dss.h> |
8 | 8 | ||
9 | #include "hdmi.h" | 9 | #include "hdmi.h" |
10 | 10 | ||
diff --git a/drivers/video/fbdev/omap2/omapfb/dss/hdmi_phy.c b/drivers/video/fbdev/omap2/omapfb/dss/hdmi_phy.c index 1f5d19c119ce..9a13c35fd6d8 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/hdmi_phy.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/hdmi_phy.c | |||
@@ -13,7 +13,7 @@ | |||
13 | #include <linux/io.h> | 13 | #include <linux/io.h> |
14 | #include <linux/platform_device.h> | 14 | #include <linux/platform_device.h> |
15 | #include <linux/slab.h> | 15 | #include <linux/slab.h> |
16 | #include <video/omapdss.h> | 16 | #include <video/omapfb_dss.h> |
17 | 17 | ||
18 | #include "dss.h" | 18 | #include "dss.h" |
19 | #include "hdmi.h" | 19 | #include "hdmi.h" |
diff --git a/drivers/video/fbdev/omap2/omapfb/dss/hdmi_pll.c b/drivers/video/fbdev/omap2/omapfb/dss/hdmi_pll.c index 06e23a7c432c..eac3665aba6c 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/hdmi_pll.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/hdmi_pll.c | |||
@@ -17,7 +17,7 @@ | |||
17 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
18 | #include <linux/clk.h> | 18 | #include <linux/clk.h> |
19 | 19 | ||
20 | #include <video/omapdss.h> | 20 | #include <video/omapfb_dss.h> |
21 | 21 | ||
22 | #include "dss.h" | 22 | #include "dss.h" |
23 | #include "hdmi.h" | 23 | #include "hdmi.h" |
diff --git a/drivers/video/fbdev/omap2/omapfb/dss/hdmi_wp.c b/drivers/video/fbdev/omap2/omapfb/dss/hdmi_wp.c index 7c544bc56fb5..705373e4cf38 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/hdmi_wp.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/hdmi_wp.c | |||
@@ -14,7 +14,7 @@ | |||
14 | #include <linux/err.h> | 14 | #include <linux/err.h> |
15 | #include <linux/io.h> | 15 | #include <linux/io.h> |
16 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
17 | #include <video/omapdss.h> | 17 | #include <video/omapfb_dss.h> |
18 | 18 | ||
19 | #include "dss.h" | 19 | #include "dss.h" |
20 | #include "hdmi.h" | 20 | #include "hdmi.h" |
diff --git a/drivers/video/fbdev/omap2/omapfb/dss/manager-sysfs.c b/drivers/video/fbdev/omap2/omapfb/dss/manager-sysfs.c index a7414fb12830..9e2a67fdf4d2 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/manager-sysfs.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/manager-sysfs.c | |||
@@ -26,7 +26,7 @@ | |||
26 | #include <linux/platform_device.h> | 26 | #include <linux/platform_device.h> |
27 | #include <linux/jiffies.h> | 27 | #include <linux/jiffies.h> |
28 | 28 | ||
29 | #include <video/omapdss.h> | 29 | #include <video/omapfb_dss.h> |
30 | 30 | ||
31 | #include "dss.h" | 31 | #include "dss.h" |
32 | #include "dss_features.h" | 32 | #include "dss_features.h" |
diff --git a/drivers/video/fbdev/omap2/omapfb/dss/manager.c b/drivers/video/fbdev/omap2/omapfb/dss/manager.c index 08a67f4f6a20..986e3cfaa1d9 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/manager.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/manager.c | |||
@@ -28,7 +28,7 @@ | |||
28 | #include <linux/platform_device.h> | 28 | #include <linux/platform_device.h> |
29 | #include <linux/jiffies.h> | 29 | #include <linux/jiffies.h> |
30 | 30 | ||
31 | #include <video/omapdss.h> | 31 | #include <video/omapfb_dss.h> |
32 | 32 | ||
33 | #include "dss.h" | 33 | #include "dss.h" |
34 | #include "dss_features.h" | 34 | #include "dss_features.h" |
diff --git a/drivers/video/fbdev/omap2/omapfb/dss/output.c b/drivers/video/fbdev/omap2/omapfb/dss/output.c index 16072159bd24..bed9a978269d 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/output.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/output.c | |||
@@ -21,7 +21,7 @@ | |||
21 | #include <linux/slab.h> | 21 | #include <linux/slab.h> |
22 | #include <linux/of.h> | 22 | #include <linux/of.h> |
23 | 23 | ||
24 | #include <video/omapdss.h> | 24 | #include <video/omapfb_dss.h> |
25 | 25 | ||
26 | #include "dss.h" | 26 | #include "dss.h" |
27 | 27 | ||
diff --git a/drivers/video/fbdev/omap2/omapfb/dss/overlay-sysfs.c b/drivers/video/fbdev/omap2/omapfb/dss/overlay-sysfs.c index 4cc5ddebfb34..f1f6c0aea752 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/overlay-sysfs.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/overlay-sysfs.c | |||
@@ -26,7 +26,7 @@ | |||
26 | #include <linux/kobject.h> | 26 | #include <linux/kobject.h> |
27 | #include <linux/platform_device.h> | 27 | #include <linux/platform_device.h> |
28 | 28 | ||
29 | #include <video/omapdss.h> | 29 | #include <video/omapfb_dss.h> |
30 | 30 | ||
31 | #include "dss.h" | 31 | #include "dss.h" |
32 | #include "dss_features.h" | 32 | #include "dss_features.h" |
diff --git a/drivers/video/fbdev/omap2/omapfb/dss/overlay.c b/drivers/video/fbdev/omap2/omapfb/dss/overlay.c index 2f7cee985cdd..d6c5d75d2ef8 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/overlay.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/overlay.c | |||
@@ -30,7 +30,7 @@ | |||
30 | #include <linux/delay.h> | 30 | #include <linux/delay.h> |
31 | #include <linux/slab.h> | 31 | #include <linux/slab.h> |
32 | 32 | ||
33 | #include <video/omapdss.h> | 33 | #include <video/omapfb_dss.h> |
34 | 34 | ||
35 | #include "dss.h" | 35 | #include "dss.h" |
36 | #include "dss_features.h" | 36 | #include "dss_features.h" |
diff --git a/drivers/video/fbdev/omap2/omapfb/dss/pll.c b/drivers/video/fbdev/omap2/omapfb/dss/pll.c index f974ddcd3b6e..0564c5606cd0 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/pll.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/pll.c | |||
@@ -22,7 +22,7 @@ | |||
22 | #include <linux/regulator/consumer.h> | 22 | #include <linux/regulator/consumer.h> |
23 | #include <linux/sched.h> | 23 | #include <linux/sched.h> |
24 | 24 | ||
25 | #include <video/omapdss.h> | 25 | #include <video/omapfb_dss.h> |
26 | 26 | ||
27 | #include "dss.h" | 27 | #include "dss.h" |
28 | 28 | ||
diff --git a/drivers/video/fbdev/omap2/omapfb/dss/rfbi.c b/drivers/video/fbdev/omap2/omapfb/dss/rfbi.c index aea6a1d0fb20..562b0c4ae0c6 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/rfbi.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/rfbi.c | |||
@@ -38,7 +38,7 @@ | |||
38 | #include <linux/pm_runtime.h> | 38 | #include <linux/pm_runtime.h> |
39 | #include <linux/component.h> | 39 | #include <linux/component.h> |
40 | 40 | ||
41 | #include <video/omapdss.h> | 41 | #include <video/omapfb_dss.h> |
42 | #include "dss.h" | 42 | #include "dss.h" |
43 | 43 | ||
44 | struct rfbi_reg { u16 idx; }; | 44 | struct rfbi_reg { u16 idx; }; |
diff --git a/drivers/video/fbdev/omap2/omapfb/dss/sdi.c b/drivers/video/fbdev/omap2/omapfb/dss/sdi.c index d747cc6b59e1..c4be732a4714 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/sdi.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/sdi.c | |||
@@ -29,7 +29,7 @@ | |||
29 | #include <linux/of.h> | 29 | #include <linux/of.h> |
30 | #include <linux/component.h> | 30 | #include <linux/component.h> |
31 | 31 | ||
32 | #include <video/omapdss.h> | 32 | #include <video/omapfb_dss.h> |
33 | #include "dss.h" | 33 | #include "dss.h" |
34 | 34 | ||
35 | static struct { | 35 | static struct { |
diff --git a/drivers/video/fbdev/omap2/omapfb/dss/venc.c b/drivers/video/fbdev/omap2/omapfb/dss/venc.c index 26e0ee30adf8..392464da12e4 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/venc.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/venc.c | |||
@@ -37,7 +37,7 @@ | |||
37 | #include <linux/of.h> | 37 | #include <linux/of.h> |
38 | #include <linux/component.h> | 38 | #include <linux/component.h> |
39 | 39 | ||
40 | #include <video/omapdss.h> | 40 | #include <video/omapfb_dss.h> |
41 | 41 | ||
42 | #include "dss.h" | 42 | #include "dss.h" |
43 | #include "dss_features.h" | 43 | #include "dss_features.h" |
diff --git a/drivers/video/fbdev/omap2/omapfb/dss/video-pll.c b/drivers/video/fbdev/omap2/omapfb/dss/video-pll.c index b1ec59e42940..a890540f2037 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/video-pll.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/video-pll.c | |||
@@ -17,7 +17,7 @@ | |||
17 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
18 | #include <linux/sched.h> | 18 | #include <linux/sched.h> |
19 | 19 | ||
20 | #include <video/omapdss.h> | 20 | #include <video/omapfb_dss.h> |
21 | 21 | ||
22 | #include "dss.h" | 22 | #include "dss.h" |
23 | #include "dss_features.h" | 23 | #include "dss_features.h" |
diff --git a/drivers/video/fbdev/omap2/omapfb/omapfb-ioctl.c b/drivers/video/fbdev/omap2/omapfb/omapfb-ioctl.c index 9ddfdd63b84c..ef69273074ba 100644 --- a/drivers/video/fbdev/omap2/omapfb/omapfb-ioctl.c +++ b/drivers/video/fbdev/omap2/omapfb/omapfb-ioctl.c | |||
@@ -30,7 +30,7 @@ | |||
30 | #include <linux/export.h> | 30 | #include <linux/export.h> |
31 | #include <linux/sizes.h> | 31 | #include <linux/sizes.h> |
32 | 32 | ||
33 | #include <video/omapdss.h> | 33 | #include <video/omapfb_dss.h> |
34 | #include <video/omapvrfb.h> | 34 | #include <video/omapvrfb.h> |
35 | 35 | ||
36 | #include "omapfb.h" | 36 | #include "omapfb.h" |
diff --git a/drivers/video/fbdev/omap2/omapfb/omapfb-main.c b/drivers/video/fbdev/omap2/omapfb/omapfb-main.c index d3af01c94a58..2fb90cb6803f 100644 --- a/drivers/video/fbdev/omap2/omapfb/omapfb-main.c +++ b/drivers/video/fbdev/omap2/omapfb/omapfb-main.c | |||
@@ -30,7 +30,7 @@ | |||
30 | #include <linux/platform_device.h> | 30 | #include <linux/platform_device.h> |
31 | #include <linux/omapfb.h> | 31 | #include <linux/omapfb.h> |
32 | 32 | ||
33 | #include <video/omapdss.h> | 33 | #include <video/omapfb_dss.h> |
34 | #include <video/omapvrfb.h> | 34 | #include <video/omapvrfb.h> |
35 | 35 | ||
36 | #include "omapfb.h" | 36 | #include "omapfb.h" |
diff --git a/drivers/video/fbdev/omap2/omapfb/omapfb-sysfs.c b/drivers/video/fbdev/omap2/omapfb/omapfb-sysfs.c index 18fa9e1d0033..8087a009c54f 100644 --- a/drivers/video/fbdev/omap2/omapfb/omapfb-sysfs.c +++ b/drivers/video/fbdev/omap2/omapfb/omapfb-sysfs.c | |||
@@ -29,7 +29,7 @@ | |||
29 | #include <linux/mm.h> | 29 | #include <linux/mm.h> |
30 | #include <linux/omapfb.h> | 30 | #include <linux/omapfb.h> |
31 | 31 | ||
32 | #include <video/omapdss.h> | 32 | #include <video/omapfb_dss.h> |
33 | #include <video/omapvrfb.h> | 33 | #include <video/omapvrfb.h> |
34 | 34 | ||
35 | #include "omapfb.h" | 35 | #include "omapfb.h" |
diff --git a/drivers/video/fbdev/omap2/omapfb/omapfb.h b/drivers/video/fbdev/omap2/omapfb/omapfb.h index 623cd872a367..bcb9ff4a607d 100644 --- a/drivers/video/fbdev/omap2/omapfb/omapfb.h +++ b/drivers/video/fbdev/omap2/omapfb/omapfb.h | |||
@@ -31,7 +31,7 @@ | |||
31 | #include <linux/dma-attrs.h> | 31 | #include <linux/dma-attrs.h> |
32 | #include <linux/dma-mapping.h> | 32 | #include <linux/dma-mapping.h> |
33 | 33 | ||
34 | #include <video/omapdss.h> | 34 | #include <video/omapfb_dss.h> |
35 | 35 | ||
36 | #ifdef DEBUG | 36 | #ifdef DEBUG |
37 | extern bool omapfb_debug; | 37 | extern bool omapfb_debug; |
diff --git a/include/video/omapfb_dss.h b/include/video/omapfb_dss.h new file mode 100644 index 000000000000..65738c47256e --- /dev/null +++ b/include/video/omapfb_dss.h | |||
@@ -0,0 +1,880 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2016 Texas Instruments, Inc. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | */ | ||
9 | |||
10 | #ifndef __OMAPFB_DSS_H | ||
11 | #define __OMAPFB_DSS_H | ||
12 | |||
13 | #include <linux/list.h> | ||
14 | #include <linux/kobject.h> | ||
15 | #include <linux/device.h> | ||
16 | #include <linux/interrupt.h> | ||
17 | #include <linux/platform_data/omapdss.h> | ||
18 | |||
19 | #include <video/videomode.h> | ||
20 | |||
21 | #define DISPC_IRQ_FRAMEDONE (1 << 0) | ||
22 | #define DISPC_IRQ_VSYNC (1 << 1) | ||
23 | #define DISPC_IRQ_EVSYNC_EVEN (1 << 2) | ||
24 | #define DISPC_IRQ_EVSYNC_ODD (1 << 3) | ||
25 | #define DISPC_IRQ_ACBIAS_COUNT_STAT (1 << 4) | ||
26 | #define DISPC_IRQ_PROG_LINE_NUM (1 << 5) | ||
27 | #define DISPC_IRQ_GFX_FIFO_UNDERFLOW (1 << 6) | ||
28 | #define DISPC_IRQ_GFX_END_WIN (1 << 7) | ||
29 | #define DISPC_IRQ_PAL_GAMMA_MASK (1 << 8) | ||
30 | #define DISPC_IRQ_OCP_ERR (1 << 9) | ||
31 | #define DISPC_IRQ_VID1_FIFO_UNDERFLOW (1 << 10) | ||
32 | #define DISPC_IRQ_VID1_END_WIN (1 << 11) | ||
33 | #define DISPC_IRQ_VID2_FIFO_UNDERFLOW (1 << 12) | ||
34 | #define DISPC_IRQ_VID2_END_WIN (1 << 13) | ||
35 | #define DISPC_IRQ_SYNC_LOST (1 << 14) | ||
36 | #define DISPC_IRQ_SYNC_LOST_DIGIT (1 << 15) | ||
37 | #define DISPC_IRQ_WAKEUP (1 << 16) | ||
38 | #define DISPC_IRQ_SYNC_LOST2 (1 << 17) | ||
39 | #define DISPC_IRQ_VSYNC2 (1 << 18) | ||
40 | #define DISPC_IRQ_VID3_END_WIN (1 << 19) | ||
41 | #define DISPC_IRQ_VID3_FIFO_UNDERFLOW (1 << 20) | ||
42 | #define DISPC_IRQ_ACBIAS_COUNT_STAT2 (1 << 21) | ||
43 | #define DISPC_IRQ_FRAMEDONE2 (1 << 22) | ||
44 | #define DISPC_IRQ_FRAMEDONEWB (1 << 23) | ||
45 | #define DISPC_IRQ_FRAMEDONETV (1 << 24) | ||
46 | #define DISPC_IRQ_WBBUFFEROVERFLOW (1 << 25) | ||
47 | #define DISPC_IRQ_WBUNCOMPLETEERROR (1 << 26) | ||
48 | #define DISPC_IRQ_SYNC_LOST3 (1 << 27) | ||
49 | #define DISPC_IRQ_VSYNC3 (1 << 28) | ||
50 | #define DISPC_IRQ_ACBIAS_COUNT_STAT3 (1 << 29) | ||
51 | #define DISPC_IRQ_FRAMEDONE3 (1 << 30) | ||
52 | |||
53 | struct omap_dss_device; | ||
54 | struct omap_overlay_manager; | ||
55 | struct dss_lcd_mgr_config; | ||
56 | struct snd_aes_iec958; | ||
57 | struct snd_cea_861_aud_if; | ||
58 | struct hdmi_avi_infoframe; | ||
59 | |||
60 | enum omap_display_type { | ||
61 | OMAP_DISPLAY_TYPE_NONE = 0, | ||
62 | OMAP_DISPLAY_TYPE_DPI = 1 << 0, | ||
63 | OMAP_DISPLAY_TYPE_DBI = 1 << 1, | ||
64 | OMAP_DISPLAY_TYPE_SDI = 1 << 2, | ||
65 | OMAP_DISPLAY_TYPE_DSI = 1 << 3, | ||
66 | OMAP_DISPLAY_TYPE_VENC = 1 << 4, | ||
67 | OMAP_DISPLAY_TYPE_HDMI = 1 << 5, | ||
68 | OMAP_DISPLAY_TYPE_DVI = 1 << 6, | ||
69 | }; | ||
70 | |||
71 | enum omap_plane { | ||
72 | OMAP_DSS_GFX = 0, | ||
73 | OMAP_DSS_VIDEO1 = 1, | ||
74 | OMAP_DSS_VIDEO2 = 2, | ||
75 | OMAP_DSS_VIDEO3 = 3, | ||
76 | OMAP_DSS_WB = 4, | ||
77 | }; | ||
78 | |||
79 | enum omap_channel { | ||
80 | OMAP_DSS_CHANNEL_LCD = 0, | ||
81 | OMAP_DSS_CHANNEL_DIGIT = 1, | ||
82 | OMAP_DSS_CHANNEL_LCD2 = 2, | ||
83 | OMAP_DSS_CHANNEL_LCD3 = 3, | ||
84 | OMAP_DSS_CHANNEL_WB = 4, | ||
85 | }; | ||
86 | |||
87 | enum omap_color_mode { | ||
88 | OMAP_DSS_COLOR_CLUT1 = 1 << 0, /* BITMAP 1 */ | ||
89 | OMAP_DSS_COLOR_CLUT2 = 1 << 1, /* BITMAP 2 */ | ||
90 | OMAP_DSS_COLOR_CLUT4 = 1 << 2, /* BITMAP 4 */ | ||
91 | OMAP_DSS_COLOR_CLUT8 = 1 << 3, /* BITMAP 8 */ | ||
92 | OMAP_DSS_COLOR_RGB12U = 1 << 4, /* RGB12, 16-bit container */ | ||
93 | OMAP_DSS_COLOR_ARGB16 = 1 << 5, /* ARGB16 */ | ||
94 | OMAP_DSS_COLOR_RGB16 = 1 << 6, /* RGB16 */ | ||
95 | OMAP_DSS_COLOR_RGB24U = 1 << 7, /* RGB24, 32-bit container */ | ||
96 | OMAP_DSS_COLOR_RGB24P = 1 << 8, /* RGB24, 24-bit container */ | ||
97 | OMAP_DSS_COLOR_YUV2 = 1 << 9, /* YUV2 4:2:2 co-sited */ | ||
98 | OMAP_DSS_COLOR_UYVY = 1 << 10, /* UYVY 4:2:2 co-sited */ | ||
99 | OMAP_DSS_COLOR_ARGB32 = 1 << 11, /* ARGB32 */ | ||
100 | OMAP_DSS_COLOR_RGBA32 = 1 << 12, /* RGBA32 */ | ||
101 | OMAP_DSS_COLOR_RGBX32 = 1 << 13, /* RGBx32 */ | ||
102 | OMAP_DSS_COLOR_NV12 = 1 << 14, /* NV12 format: YUV 4:2:0 */ | ||
103 | OMAP_DSS_COLOR_RGBA16 = 1 << 15, /* RGBA16 - 4444 */ | ||
104 | OMAP_DSS_COLOR_RGBX16 = 1 << 16, /* RGBx16 - 4444 */ | ||
105 | OMAP_DSS_COLOR_ARGB16_1555 = 1 << 17, /* ARGB16 - 1555 */ | ||
106 | OMAP_DSS_COLOR_XRGB16_1555 = 1 << 18, /* xRGB16 - 1555 */ | ||
107 | }; | ||
108 | |||
109 | enum omap_dss_load_mode { | ||
110 | OMAP_DSS_LOAD_CLUT_AND_FRAME = 0, | ||
111 | OMAP_DSS_LOAD_CLUT_ONLY = 1, | ||
112 | OMAP_DSS_LOAD_FRAME_ONLY = 2, | ||
113 | OMAP_DSS_LOAD_CLUT_ONCE_FRAME = 3, | ||
114 | }; | ||
115 | |||
116 | enum omap_dss_trans_key_type { | ||
117 | OMAP_DSS_COLOR_KEY_GFX_DST = 0, | ||
118 | OMAP_DSS_COLOR_KEY_VID_SRC = 1, | ||
119 | }; | ||
120 | |||
121 | enum omap_rfbi_te_mode { | ||
122 | OMAP_DSS_RFBI_TE_MODE_1 = 1, | ||
123 | OMAP_DSS_RFBI_TE_MODE_2 = 2, | ||
124 | }; | ||
125 | |||
126 | enum omap_dss_signal_level { | ||
127 | OMAPDSS_SIG_ACTIVE_LOW, | ||
128 | OMAPDSS_SIG_ACTIVE_HIGH, | ||
129 | }; | ||
130 | |||
131 | enum omap_dss_signal_edge { | ||
132 | OMAPDSS_DRIVE_SIG_FALLING_EDGE, | ||
133 | OMAPDSS_DRIVE_SIG_RISING_EDGE, | ||
134 | }; | ||
135 | |||
136 | enum omap_dss_venc_type { | ||
137 | OMAP_DSS_VENC_TYPE_COMPOSITE, | ||
138 | OMAP_DSS_VENC_TYPE_SVIDEO, | ||
139 | }; | ||
140 | |||
141 | enum omap_dss_dsi_pixel_format { | ||
142 | OMAP_DSS_DSI_FMT_RGB888, | ||
143 | OMAP_DSS_DSI_FMT_RGB666, | ||
144 | OMAP_DSS_DSI_FMT_RGB666_PACKED, | ||
145 | OMAP_DSS_DSI_FMT_RGB565, | ||
146 | }; | ||
147 | |||
148 | enum omap_dss_dsi_mode { | ||
149 | OMAP_DSS_DSI_CMD_MODE = 0, | ||
150 | OMAP_DSS_DSI_VIDEO_MODE, | ||
151 | }; | ||
152 | |||
153 | enum omap_display_caps { | ||
154 | OMAP_DSS_DISPLAY_CAP_MANUAL_UPDATE = 1 << 0, | ||
155 | OMAP_DSS_DISPLAY_CAP_TEAR_ELIM = 1 << 1, | ||
156 | }; | ||
157 | |||
158 | enum omap_dss_display_state { | ||
159 | OMAP_DSS_DISPLAY_DISABLED = 0, | ||
160 | OMAP_DSS_DISPLAY_ACTIVE, | ||
161 | }; | ||
162 | |||
163 | enum omap_dss_rotation_type { | ||
164 | OMAP_DSS_ROT_DMA = 1 << 0, | ||
165 | OMAP_DSS_ROT_VRFB = 1 << 1, | ||
166 | OMAP_DSS_ROT_TILER = 1 << 2, | ||
167 | }; | ||
168 | |||
169 | /* clockwise rotation angle */ | ||
170 | enum omap_dss_rotation_angle { | ||
171 | OMAP_DSS_ROT_0 = 0, | ||
172 | OMAP_DSS_ROT_90 = 1, | ||
173 | OMAP_DSS_ROT_180 = 2, | ||
174 | OMAP_DSS_ROT_270 = 3, | ||
175 | }; | ||
176 | |||
177 | enum omap_overlay_caps { | ||
178 | OMAP_DSS_OVL_CAP_SCALE = 1 << 0, | ||
179 | OMAP_DSS_OVL_CAP_GLOBAL_ALPHA = 1 << 1, | ||
180 | OMAP_DSS_OVL_CAP_PRE_MULT_ALPHA = 1 << 2, | ||
181 | OMAP_DSS_OVL_CAP_ZORDER = 1 << 3, | ||
182 | OMAP_DSS_OVL_CAP_POS = 1 << 4, | ||
183 | OMAP_DSS_OVL_CAP_REPLICATION = 1 << 5, | ||
184 | }; | ||
185 | |||
186 | enum omap_overlay_manager_caps { | ||
187 | OMAP_DSS_DUMMY_VALUE, /* add a dummy value to prevent compiler error */ | ||
188 | }; | ||
189 | |||
190 | enum omap_dss_clk_source { | ||
191 | OMAP_DSS_CLK_SRC_FCK = 0, /* OMAP2/3: DSS1_ALWON_FCLK | ||
192 | * OMAP4: DSS_FCLK */ | ||
193 | OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DISPC, /* OMAP3: DSI1_PLL_FCLK | ||
194 | * OMAP4: PLL1_CLK1 */ | ||
195 | OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DSI, /* OMAP3: DSI2_PLL_FCLK | ||
196 | * OMAP4: PLL1_CLK2 */ | ||
197 | OMAP_DSS_CLK_SRC_DSI2_PLL_HSDIV_DISPC, /* OMAP4: PLL2_CLK1 */ | ||
198 | OMAP_DSS_CLK_SRC_DSI2_PLL_HSDIV_DSI, /* OMAP4: PLL2_CLK2 */ | ||
199 | }; | ||
200 | |||
201 | enum omap_hdmi_flags { | ||
202 | OMAP_HDMI_SDA_SCL_EXTERNAL_PULLUP = 1 << 0, | ||
203 | }; | ||
204 | |||
205 | enum omap_dss_output_id { | ||
206 | OMAP_DSS_OUTPUT_DPI = 1 << 0, | ||
207 | OMAP_DSS_OUTPUT_DBI = 1 << 1, | ||
208 | OMAP_DSS_OUTPUT_SDI = 1 << 2, | ||
209 | OMAP_DSS_OUTPUT_DSI1 = 1 << 3, | ||
210 | OMAP_DSS_OUTPUT_DSI2 = 1 << 4, | ||
211 | OMAP_DSS_OUTPUT_VENC = 1 << 5, | ||
212 | OMAP_DSS_OUTPUT_HDMI = 1 << 6, | ||
213 | }; | ||
214 | |||
215 | /* RFBI */ | ||
216 | |||
217 | struct rfbi_timings { | ||
218 | int cs_on_time; | ||
219 | int cs_off_time; | ||
220 | int we_on_time; | ||
221 | int we_off_time; | ||
222 | int re_on_time; | ||
223 | int re_off_time; | ||
224 | int we_cycle_time; | ||
225 | int re_cycle_time; | ||
226 | int cs_pulse_width; | ||
227 | int access_time; | ||
228 | |||
229 | int clk_div; | ||
230 | |||
231 | u32 tim[5]; /* set by rfbi_convert_timings() */ | ||
232 | |||
233 | int converted; | ||
234 | }; | ||
235 | |||
236 | /* DSI */ | ||
237 | |||
238 | enum omap_dss_dsi_trans_mode { | ||
239 | /* Sync Pulses: both sync start and end packets sent */ | ||
240 | OMAP_DSS_DSI_PULSE_MODE, | ||
241 | /* Sync Events: only sync start packets sent */ | ||
242 | OMAP_DSS_DSI_EVENT_MODE, | ||
243 | /* Burst: only sync start packets sent, pixels are time compressed */ | ||
244 | OMAP_DSS_DSI_BURST_MODE, | ||
245 | }; | ||
246 | |||
247 | struct omap_dss_dsi_videomode_timings { | ||
248 | unsigned long hsclk; | ||
249 | |||
250 | unsigned ndl; | ||
251 | unsigned bitspp; | ||
252 | |||
253 | /* pixels */ | ||
254 | u16 hact; | ||
255 | /* lines */ | ||
256 | u16 vact; | ||
257 | |||
258 | /* DSI video mode blanking data */ | ||
259 | /* Unit: byte clock cycles */ | ||
260 | u16 hss; | ||
261 | u16 hsa; | ||
262 | u16 hse; | ||
263 | u16 hfp; | ||
264 | u16 hbp; | ||
265 | /* Unit: line clocks */ | ||
266 | u16 vsa; | ||
267 | u16 vfp; | ||
268 | u16 vbp; | ||
269 | |||
270 | /* DSI blanking modes */ | ||
271 | int blanking_mode; | ||
272 | int hsa_blanking_mode; | ||
273 | int hbp_blanking_mode; | ||
274 | int hfp_blanking_mode; | ||
275 | |||
276 | enum omap_dss_dsi_trans_mode trans_mode; | ||
277 | |||
278 | bool ddr_clk_always_on; | ||
279 | int window_sync; | ||
280 | }; | ||
281 | |||
282 | struct omap_dss_dsi_config { | ||
283 | enum omap_dss_dsi_mode mode; | ||
284 | enum omap_dss_dsi_pixel_format pixel_format; | ||
285 | const struct omap_video_timings *timings; | ||
286 | |||
287 | unsigned long hs_clk_min, hs_clk_max; | ||
288 | unsigned long lp_clk_min, lp_clk_max; | ||
289 | |||
290 | bool ddr_clk_always_on; | ||
291 | enum omap_dss_dsi_trans_mode trans_mode; | ||
292 | }; | ||
293 | |||
294 | struct omap_video_timings { | ||
295 | /* Unit: pixels */ | ||
296 | u16 x_res; | ||
297 | /* Unit: pixels */ | ||
298 | u16 y_res; | ||
299 | /* Unit: Hz */ | ||
300 | u32 pixelclock; | ||
301 | /* Unit: pixel clocks */ | ||
302 | u16 hsw; /* Horizontal synchronization pulse width */ | ||
303 | /* Unit: pixel clocks */ | ||
304 | u16 hfp; /* Horizontal front porch */ | ||
305 | /* Unit: pixel clocks */ | ||
306 | u16 hbp; /* Horizontal back porch */ | ||
307 | /* Unit: line clocks */ | ||
308 | u16 vsw; /* Vertical synchronization pulse width */ | ||
309 | /* Unit: line clocks */ | ||
310 | u16 vfp; /* Vertical front porch */ | ||
311 | /* Unit: line clocks */ | ||
312 | u16 vbp; /* Vertical back porch */ | ||
313 | |||
314 | /* Vsync logic level */ | ||
315 | enum omap_dss_signal_level vsync_level; | ||
316 | /* Hsync logic level */ | ||
317 | enum omap_dss_signal_level hsync_level; | ||
318 | /* Interlaced or Progressive timings */ | ||
319 | bool interlace; | ||
320 | /* Pixel clock edge to drive LCD data */ | ||
321 | enum omap_dss_signal_edge data_pclk_edge; | ||
322 | /* Data enable logic level */ | ||
323 | enum omap_dss_signal_level de_level; | ||
324 | /* Pixel clock edges to drive HSYNC and VSYNC signals */ | ||
325 | enum omap_dss_signal_edge sync_pclk_edge; | ||
326 | |||
327 | bool double_pixel; | ||
328 | }; | ||
329 | |||
330 | /* Hardcoded timings for tv modes. Venc only uses these to | ||
331 | * identify the mode, and does not actually use the configs | ||
332 | * itself. However, the configs should be something that | ||
333 | * a normal monitor can also show */ | ||
334 | extern const struct omap_video_timings omap_dss_pal_timings; | ||
335 | extern const struct omap_video_timings omap_dss_ntsc_timings; | ||
336 | |||
337 | struct omap_dss_cpr_coefs { | ||
338 | s16 rr, rg, rb; | ||
339 | s16 gr, gg, gb; | ||
340 | s16 br, bg, bb; | ||
341 | }; | ||
342 | |||
343 | struct omap_overlay_info { | ||
344 | dma_addr_t paddr; | ||
345 | dma_addr_t p_uv_addr; /* for NV12 format */ | ||
346 | u16 screen_width; | ||
347 | u16 width; | ||
348 | u16 height; | ||
349 | enum omap_color_mode color_mode; | ||
350 | u8 rotation; | ||
351 | enum omap_dss_rotation_type rotation_type; | ||
352 | bool mirror; | ||
353 | |||
354 | u16 pos_x; | ||
355 | u16 pos_y; | ||
356 | u16 out_width; /* if 0, out_width == width */ | ||
357 | u16 out_height; /* if 0, out_height == height */ | ||
358 | u8 global_alpha; | ||
359 | u8 pre_mult_alpha; | ||
360 | u8 zorder; | ||
361 | }; | ||
362 | |||
363 | struct omap_overlay { | ||
364 | struct kobject kobj; | ||
365 | struct list_head list; | ||
366 | |||
367 | /* static fields */ | ||
368 | const char *name; | ||
369 | enum omap_plane id; | ||
370 | enum omap_color_mode supported_modes; | ||
371 | enum omap_overlay_caps caps; | ||
372 | |||
373 | /* dynamic fields */ | ||
374 | struct omap_overlay_manager *manager; | ||
375 | |||
376 | /* | ||
377 | * The following functions do not block: | ||
378 | * | ||
379 | * is_enabled | ||
380 | * set_overlay_info | ||
381 | * get_overlay_info | ||
382 | * | ||
383 | * The rest of the functions may block and cannot be called from | ||
384 | * interrupt context | ||
385 | */ | ||
386 | |||
387 | int (*enable)(struct omap_overlay *ovl); | ||
388 | int (*disable)(struct omap_overlay *ovl); | ||
389 | bool (*is_enabled)(struct omap_overlay *ovl); | ||
390 | |||
391 | int (*set_manager)(struct omap_overlay *ovl, | ||
392 | struct omap_overlay_manager *mgr); | ||
393 | int (*unset_manager)(struct omap_overlay *ovl); | ||
394 | |||
395 | int (*set_overlay_info)(struct omap_overlay *ovl, | ||
396 | struct omap_overlay_info *info); | ||
397 | void (*get_overlay_info)(struct omap_overlay *ovl, | ||
398 | struct omap_overlay_info *info); | ||
399 | |||
400 | int (*wait_for_go)(struct omap_overlay *ovl); | ||
401 | |||
402 | struct omap_dss_device *(*get_device)(struct omap_overlay *ovl); | ||
403 | }; | ||
404 | |||
405 | struct omap_overlay_manager_info { | ||
406 | u32 default_color; | ||
407 | |||
408 | enum omap_dss_trans_key_type trans_key_type; | ||
409 | u32 trans_key; | ||
410 | bool trans_enabled; | ||
411 | |||
412 | bool partial_alpha_enabled; | ||
413 | |||
414 | bool cpr_enable; | ||
415 | struct omap_dss_cpr_coefs cpr_coefs; | ||
416 | }; | ||
417 | |||
418 | struct omap_overlay_manager { | ||
419 | struct kobject kobj; | ||
420 | |||
421 | /* static fields */ | ||
422 | const char *name; | ||
423 | enum omap_channel id; | ||
424 | enum omap_overlay_manager_caps caps; | ||
425 | struct list_head overlays; | ||
426 | enum omap_display_type supported_displays; | ||
427 | enum omap_dss_output_id supported_outputs; | ||
428 | |||
429 | /* dynamic fields */ | ||
430 | struct omap_dss_device *output; | ||
431 | |||
432 | /* | ||
433 | * The following functions do not block: | ||
434 | * | ||
435 | * set_manager_info | ||
436 | * get_manager_info | ||
437 | * apply | ||
438 | * | ||
439 | * The rest of the functions may block and cannot be called from | ||
440 | * interrupt context | ||
441 | */ | ||
442 | |||
443 | int (*set_output)(struct omap_overlay_manager *mgr, | ||
444 | struct omap_dss_device *output); | ||
445 | int (*unset_output)(struct omap_overlay_manager *mgr); | ||
446 | |||
447 | int (*set_manager_info)(struct omap_overlay_manager *mgr, | ||
448 | struct omap_overlay_manager_info *info); | ||
449 | void (*get_manager_info)(struct omap_overlay_manager *mgr, | ||
450 | struct omap_overlay_manager_info *info); | ||
451 | |||
452 | int (*apply)(struct omap_overlay_manager *mgr); | ||
453 | int (*wait_for_go)(struct omap_overlay_manager *mgr); | ||
454 | int (*wait_for_vsync)(struct omap_overlay_manager *mgr); | ||
455 | |||
456 | struct omap_dss_device *(*get_device)(struct omap_overlay_manager *mgr); | ||
457 | }; | ||
458 | |||
459 | /* 22 pins means 1 clk lane and 10 data lanes */ | ||
460 | #define OMAP_DSS_MAX_DSI_PINS 22 | ||
461 | |||
462 | struct omap_dsi_pin_config { | ||
463 | int num_pins; | ||
464 | /* | ||
465 | * pin numbers in the following order: | ||
466 | * clk+, clk- | ||
467 | * data1+, data1- | ||
468 | * data2+, data2- | ||
469 | * ... | ||
470 | */ | ||
471 | int pins[OMAP_DSS_MAX_DSI_PINS]; | ||
472 | }; | ||
473 | |||
474 | struct omap_dss_writeback_info { | ||
475 | u32 paddr; | ||
476 | u32 p_uv_addr; | ||
477 | u16 buf_width; | ||
478 | u16 width; | ||
479 | u16 height; | ||
480 | enum omap_color_mode color_mode; | ||
481 | u8 rotation; | ||
482 | enum omap_dss_rotation_type rotation_type; | ||
483 | bool mirror; | ||
484 | u8 pre_mult_alpha; | ||
485 | }; | ||
486 | |||
487 | struct omapdss_dpi_ops { | ||
488 | int (*connect)(struct omap_dss_device *dssdev, | ||
489 | struct omap_dss_device *dst); | ||
490 | void (*disconnect)(struct omap_dss_device *dssdev, | ||
491 | struct omap_dss_device *dst); | ||
492 | |||
493 | int (*enable)(struct omap_dss_device *dssdev); | ||
494 | void (*disable)(struct omap_dss_device *dssdev); | ||
495 | |||
496 | int (*check_timings)(struct omap_dss_device *dssdev, | ||
497 | struct omap_video_timings *timings); | ||
498 | void (*set_timings)(struct omap_dss_device *dssdev, | ||
499 | struct omap_video_timings *timings); | ||
500 | void (*get_timings)(struct omap_dss_device *dssdev, | ||
501 | struct omap_video_timings *timings); | ||
502 | |||
503 | void (*set_data_lines)(struct omap_dss_device *dssdev, int data_lines); | ||
504 | }; | ||
505 | |||
506 | struct omapdss_sdi_ops { | ||
507 | int (*connect)(struct omap_dss_device *dssdev, | ||
508 | struct omap_dss_device *dst); | ||
509 | void (*disconnect)(struct omap_dss_device *dssdev, | ||
510 | struct omap_dss_device *dst); | ||
511 | |||
512 | int (*enable)(struct omap_dss_device *dssdev); | ||
513 | void (*disable)(struct omap_dss_device *dssdev); | ||
514 | |||
515 | int (*check_timings)(struct omap_dss_device *dssdev, | ||
516 | struct omap_video_timings *timings); | ||
517 | void (*set_timings)(struct omap_dss_device *dssdev, | ||
518 | struct omap_video_timings *timings); | ||
519 | void (*get_timings)(struct omap_dss_device *dssdev, | ||
520 | struct omap_video_timings *timings); | ||
521 | |||
522 | void (*set_datapairs)(struct omap_dss_device *dssdev, int datapairs); | ||
523 | }; | ||
524 | |||
525 | struct omapdss_dvi_ops { | ||
526 | int (*connect)(struct omap_dss_device *dssdev, | ||
527 | struct omap_dss_device *dst); | ||
528 | void (*disconnect)(struct omap_dss_device *dssdev, | ||
529 | struct omap_dss_device *dst); | ||
530 | |||
531 | int (*enable)(struct omap_dss_device *dssdev); | ||
532 | void (*disable)(struct omap_dss_device *dssdev); | ||
533 | |||
534 | int (*check_timings)(struct omap_dss_device *dssdev, | ||
535 | struct omap_video_timings *timings); | ||
536 | void (*set_timings)(struct omap_dss_device *dssdev, | ||
537 | struct omap_video_timings *timings); | ||
538 | void (*get_timings)(struct omap_dss_device *dssdev, | ||
539 | struct omap_video_timings *timings); | ||
540 | }; | ||
541 | |||
542 | struct omapdss_atv_ops { | ||
543 | int (*connect)(struct omap_dss_device *dssdev, | ||
544 | struct omap_dss_device *dst); | ||
545 | void (*disconnect)(struct omap_dss_device *dssdev, | ||
546 | struct omap_dss_device *dst); | ||
547 | |||
548 | int (*enable)(struct omap_dss_device *dssdev); | ||
549 | void (*disable)(struct omap_dss_device *dssdev); | ||
550 | |||
551 | int (*check_timings)(struct omap_dss_device *dssdev, | ||
552 | struct omap_video_timings *timings); | ||
553 | void (*set_timings)(struct omap_dss_device *dssdev, | ||
554 | struct omap_video_timings *timings); | ||
555 | void (*get_timings)(struct omap_dss_device *dssdev, | ||
556 | struct omap_video_timings *timings); | ||
557 | |||
558 | void (*set_type)(struct omap_dss_device *dssdev, | ||
559 | enum omap_dss_venc_type type); | ||
560 | void (*invert_vid_out_polarity)(struct omap_dss_device *dssdev, | ||
561 | bool invert_polarity); | ||
562 | |||
563 | int (*set_wss)(struct omap_dss_device *dssdev, u32 wss); | ||
564 | u32 (*get_wss)(struct omap_dss_device *dssdev); | ||
565 | }; | ||
566 | |||
567 | struct omapdss_hdmi_ops { | ||
568 | int (*connect)(struct omap_dss_device *dssdev, | ||
569 | struct omap_dss_device *dst); | ||
570 | void (*disconnect)(struct omap_dss_device *dssdev, | ||
571 | struct omap_dss_device *dst); | ||
572 | |||
573 | int (*enable)(struct omap_dss_device *dssdev); | ||
574 | void (*disable)(struct omap_dss_device *dssdev); | ||
575 | |||
576 | int (*check_timings)(struct omap_dss_device *dssdev, | ||
577 | struct omap_video_timings *timings); | ||
578 | void (*set_timings)(struct omap_dss_device *dssdev, | ||
579 | struct omap_video_timings *timings); | ||
580 | void (*get_timings)(struct omap_dss_device *dssdev, | ||
581 | struct omap_video_timings *timings); | ||
582 | |||
583 | int (*read_edid)(struct omap_dss_device *dssdev, u8 *buf, int len); | ||
584 | bool (*detect)(struct omap_dss_device *dssdev); | ||
585 | |||
586 | int (*set_hdmi_mode)(struct omap_dss_device *dssdev, bool hdmi_mode); | ||
587 | int (*set_infoframe)(struct omap_dss_device *dssdev, | ||
588 | const struct hdmi_avi_infoframe *avi); | ||
589 | }; | ||
590 | |||
591 | struct omapdss_dsi_ops { | ||
592 | int (*connect)(struct omap_dss_device *dssdev, | ||
593 | struct omap_dss_device *dst); | ||
594 | void (*disconnect)(struct omap_dss_device *dssdev, | ||
595 | struct omap_dss_device *dst); | ||
596 | |||
597 | int (*enable)(struct omap_dss_device *dssdev); | ||
598 | void (*disable)(struct omap_dss_device *dssdev, bool disconnect_lanes, | ||
599 | bool enter_ulps); | ||
600 | |||
601 | /* bus configuration */ | ||
602 | int (*set_config)(struct omap_dss_device *dssdev, | ||
603 | const struct omap_dss_dsi_config *cfg); | ||
604 | int (*configure_pins)(struct omap_dss_device *dssdev, | ||
605 | const struct omap_dsi_pin_config *pin_cfg); | ||
606 | |||
607 | void (*enable_hs)(struct omap_dss_device *dssdev, int channel, | ||
608 | bool enable); | ||
609 | int (*enable_te)(struct omap_dss_device *dssdev, bool enable); | ||
610 | |||
611 | int (*update)(struct omap_dss_device *dssdev, int channel, | ||
612 | void (*callback)(int, void *), void *data); | ||
613 | |||
614 | void (*bus_lock)(struct omap_dss_device *dssdev); | ||
615 | void (*bus_unlock)(struct omap_dss_device *dssdev); | ||
616 | |||
617 | int (*enable_video_output)(struct omap_dss_device *dssdev, int channel); | ||
618 | void (*disable_video_output)(struct omap_dss_device *dssdev, | ||
619 | int channel); | ||
620 | |||
621 | int (*request_vc)(struct omap_dss_device *dssdev, int *channel); | ||
622 | int (*set_vc_id)(struct omap_dss_device *dssdev, int channel, | ||
623 | int vc_id); | ||
624 | void (*release_vc)(struct omap_dss_device *dssdev, int channel); | ||
625 | |||
626 | /* data transfer */ | ||
627 | int (*dcs_write)(struct omap_dss_device *dssdev, int channel, | ||
628 | u8 *data, int len); | ||
629 | int (*dcs_write_nosync)(struct omap_dss_device *dssdev, int channel, | ||
630 | u8 *data, int len); | ||
631 | int (*dcs_read)(struct omap_dss_device *dssdev, int channel, u8 dcs_cmd, | ||
632 | u8 *data, int len); | ||
633 | |||
634 | int (*gen_write)(struct omap_dss_device *dssdev, int channel, | ||
635 | u8 *data, int len); | ||
636 | int (*gen_write_nosync)(struct omap_dss_device *dssdev, int channel, | ||
637 | u8 *data, int len); | ||
638 | int (*gen_read)(struct omap_dss_device *dssdev, int channel, | ||
639 | u8 *reqdata, int reqlen, | ||
640 | u8 *data, int len); | ||
641 | |||
642 | int (*bta_sync)(struct omap_dss_device *dssdev, int channel); | ||
643 | |||
644 | int (*set_max_rx_packet_size)(struct omap_dss_device *dssdev, | ||
645 | int channel, u16 plen); | ||
646 | }; | ||
647 | |||
648 | struct omap_dss_device { | ||
649 | struct kobject kobj; | ||
650 | struct device *dev; | ||
651 | |||
652 | struct module *owner; | ||
653 | |||
654 | struct list_head panel_list; | ||
655 | |||
656 | /* alias in the form of "display%d" */ | ||
657 | char alias[16]; | ||
658 | |||
659 | enum omap_display_type type; | ||
660 | enum omap_display_type output_type; | ||
661 | |||
662 | union { | ||
663 | struct { | ||
664 | u8 data_lines; | ||
665 | } dpi; | ||
666 | |||
667 | struct { | ||
668 | u8 channel; | ||
669 | u8 data_lines; | ||
670 | } rfbi; | ||
671 | |||
672 | struct { | ||
673 | u8 datapairs; | ||
674 | } sdi; | ||
675 | |||
676 | struct { | ||
677 | int module; | ||
678 | } dsi; | ||
679 | |||
680 | struct { | ||
681 | enum omap_dss_venc_type type; | ||
682 | bool invert_polarity; | ||
683 | } venc; | ||
684 | } phy; | ||
685 | |||
686 | struct { | ||
687 | struct omap_video_timings timings; | ||
688 | |||
689 | enum omap_dss_dsi_pixel_format dsi_pix_fmt; | ||
690 | enum omap_dss_dsi_mode dsi_mode; | ||
691 | } panel; | ||
692 | |||
693 | struct { | ||
694 | u8 pixel_size; | ||
695 | struct rfbi_timings rfbi_timings; | ||
696 | } ctrl; | ||
697 | |||
698 | const char *name; | ||
699 | |||
700 | /* used to match device to driver */ | ||
701 | const char *driver_name; | ||
702 | |||
703 | void *data; | ||
704 | |||
705 | struct omap_dss_driver *driver; | ||
706 | |||
707 | union { | ||
708 | const struct omapdss_dpi_ops *dpi; | ||
709 | const struct omapdss_sdi_ops *sdi; | ||
710 | const struct omapdss_dvi_ops *dvi; | ||
711 | const struct omapdss_hdmi_ops *hdmi; | ||
712 | const struct omapdss_atv_ops *atv; | ||
713 | const struct omapdss_dsi_ops *dsi; | ||
714 | } ops; | ||
715 | |||
716 | /* helper variable for driver suspend/resume */ | ||
717 | bool activate_after_resume; | ||
718 | |||
719 | enum omap_display_caps caps; | ||
720 | |||
721 | struct omap_dss_device *src; | ||
722 | |||
723 | enum omap_dss_display_state state; | ||
724 | |||
725 | /* OMAP DSS output specific fields */ | ||
726 | |||
727 | struct list_head list; | ||
728 | |||
729 | /* DISPC channel for this output */ | ||
730 | enum omap_channel dispc_channel; | ||
731 | bool dispc_channel_connected; | ||
732 | |||
733 | /* output instance */ | ||
734 | enum omap_dss_output_id id; | ||
735 | |||
736 | /* the port number in the DT node */ | ||
737 | int port_num; | ||
738 | |||
739 | /* dynamic fields */ | ||
740 | struct omap_overlay_manager *manager; | ||
741 | |||
742 | struct omap_dss_device *dst; | ||
743 | }; | ||
744 | |||
745 | struct omap_dss_driver { | ||
746 | int (*probe)(struct omap_dss_device *); | ||
747 | void (*remove)(struct omap_dss_device *); | ||
748 | |||
749 | int (*connect)(struct omap_dss_device *dssdev); | ||
750 | void (*disconnect)(struct omap_dss_device *dssdev); | ||
751 | |||
752 | int (*enable)(struct omap_dss_device *display); | ||
753 | void (*disable)(struct omap_dss_device *display); | ||
754 | int (*run_test)(struct omap_dss_device *display, int test); | ||
755 | |||
756 | int (*update)(struct omap_dss_device *dssdev, | ||
757 | u16 x, u16 y, u16 w, u16 h); | ||
758 | int (*sync)(struct omap_dss_device *dssdev); | ||
759 | |||
760 | int (*enable_te)(struct omap_dss_device *dssdev, bool enable); | ||
761 | int (*get_te)(struct omap_dss_device *dssdev); | ||
762 | |||
763 | u8 (*get_rotate)(struct omap_dss_device *dssdev); | ||
764 | int (*set_rotate)(struct omap_dss_device *dssdev, u8 rotate); | ||
765 | |||
766 | bool (*get_mirror)(struct omap_dss_device *dssdev); | ||
767 | int (*set_mirror)(struct omap_dss_device *dssdev, bool enable); | ||
768 | |||
769 | int (*memory_read)(struct omap_dss_device *dssdev, | ||
770 | void *buf, size_t size, | ||
771 | u16 x, u16 y, u16 w, u16 h); | ||
772 | |||
773 | void (*get_resolution)(struct omap_dss_device *dssdev, | ||
774 | u16 *xres, u16 *yres); | ||
775 | void (*get_dimensions)(struct omap_dss_device *dssdev, | ||
776 | u32 *width, u32 *height); | ||
777 | int (*get_recommended_bpp)(struct omap_dss_device *dssdev); | ||
778 | |||
779 | int (*check_timings)(struct omap_dss_device *dssdev, | ||
780 | struct omap_video_timings *timings); | ||
781 | void (*set_timings)(struct omap_dss_device *dssdev, | ||
782 | struct omap_video_timings *timings); | ||
783 | void (*get_timings)(struct omap_dss_device *dssdev, | ||
784 | struct omap_video_timings *timings); | ||
785 | |||
786 | int (*set_wss)(struct omap_dss_device *dssdev, u32 wss); | ||
787 | u32 (*get_wss)(struct omap_dss_device *dssdev); | ||
788 | |||
789 | int (*read_edid)(struct omap_dss_device *dssdev, u8 *buf, int len); | ||
790 | bool (*detect)(struct omap_dss_device *dssdev); | ||
791 | |||
792 | int (*set_hdmi_mode)(struct omap_dss_device *dssdev, bool hdmi_mode); | ||
793 | int (*set_hdmi_infoframe)(struct omap_dss_device *dssdev, | ||
794 | const struct hdmi_avi_infoframe *avi); | ||
795 | }; | ||
796 | |||
797 | enum omapdss_version omapdss_get_version(void); | ||
798 | bool omapdss_is_initialized(void); | ||
799 | |||
800 | int omap_dss_register_driver(struct omap_dss_driver *); | ||
801 | void omap_dss_unregister_driver(struct omap_dss_driver *); | ||
802 | |||
803 | int omapdss_register_display(struct omap_dss_device *dssdev); | ||
804 | void omapdss_unregister_display(struct omap_dss_device *dssdev); | ||
805 | |||
806 | struct omap_dss_device *omap_dss_get_device(struct omap_dss_device *dssdev); | ||
807 | void omap_dss_put_device(struct omap_dss_device *dssdev); | ||
808 | #define for_each_dss_dev(d) while ((d = omap_dss_get_next_device(d)) != NULL) | ||
809 | struct omap_dss_device *omap_dss_get_next_device(struct omap_dss_device *from); | ||
810 | struct omap_dss_device *omap_dss_find_device(void *data, | ||
811 | int (*match)(struct omap_dss_device *dssdev, void *data)); | ||
812 | const char *omapdss_get_default_display_name(void); | ||
813 | |||
814 | void videomode_to_omap_video_timings(const struct videomode *vm, | ||
815 | struct omap_video_timings *ovt); | ||
816 | void omap_video_timings_to_videomode(const struct omap_video_timings *ovt, | ||
817 | struct videomode *vm); | ||
818 | |||
819 | int dss_feat_get_num_mgrs(void); | ||
820 | int dss_feat_get_num_ovls(void); | ||
821 | enum omap_color_mode dss_feat_get_supported_color_modes(enum omap_plane plane); | ||
822 | |||
823 | |||
824 | |||
825 | int omap_dss_get_num_overlay_managers(void); | ||
826 | struct omap_overlay_manager *omap_dss_get_overlay_manager(int num); | ||
827 | |||
828 | int omap_dss_get_num_overlays(void); | ||
829 | struct omap_overlay *omap_dss_get_overlay(int num); | ||
830 | |||
831 | int omapdss_register_output(struct omap_dss_device *output); | ||
832 | void omapdss_unregister_output(struct omap_dss_device *output); | ||
833 | struct omap_dss_device *omap_dss_get_output(enum omap_dss_output_id id); | ||
834 | struct omap_dss_device *omap_dss_find_output(const char *name); | ||
835 | struct omap_dss_device *omap_dss_find_output_by_port_node(struct device_node *port); | ||
836 | int omapdss_output_set_device(struct omap_dss_device *out, | ||
837 | struct omap_dss_device *dssdev); | ||
838 | int omapdss_output_unset_device(struct omap_dss_device *out); | ||
839 | |||
840 | struct omap_dss_device *omapdss_find_output_from_display(struct omap_dss_device *dssdev); | ||
841 | struct omap_overlay_manager *omapdss_find_mgr_from_display(struct omap_dss_device *dssdev); | ||
842 | |||
843 | void omapdss_default_get_resolution(struct omap_dss_device *dssdev, | ||
844 | u16 *xres, u16 *yres); | ||
845 | int omapdss_default_get_recommended_bpp(struct omap_dss_device *dssdev); | ||
846 | void omapdss_default_get_timings(struct omap_dss_device *dssdev, | ||
847 | struct omap_video_timings *timings); | ||
848 | |||
849 | typedef void (*omap_dispc_isr_t) (void *arg, u32 mask); | ||
850 | int omap_dispc_register_isr(omap_dispc_isr_t isr, void *arg, u32 mask); | ||
851 | int omap_dispc_unregister_isr(omap_dispc_isr_t isr, void *arg, u32 mask); | ||
852 | |||
853 | int omapdss_compat_init(void); | ||
854 | void omapdss_compat_uninit(void); | ||
855 | |||
856 | static inline bool omapdss_device_is_connected(struct omap_dss_device *dssdev) | ||
857 | { | ||
858 | return dssdev->src; | ||
859 | } | ||
860 | |||
861 | static inline bool omapdss_device_is_enabled(struct omap_dss_device *dssdev) | ||
862 | { | ||
863 | return dssdev->state == OMAP_DSS_DISPLAY_ACTIVE; | ||
864 | } | ||
865 | |||
866 | struct device_node * | ||
867 | omapdss_of_get_next_port(const struct device_node *parent, | ||
868 | struct device_node *prev); | ||
869 | |||
870 | struct device_node * | ||
871 | omapdss_of_get_next_endpoint(const struct device_node *parent, | ||
872 | struct device_node *prev); | ||
873 | |||
874 | struct device_node * | ||
875 | omapdss_of_get_first_endpoint(const struct device_node *parent); | ||
876 | |||
877 | struct omap_dss_device * | ||
878 | omapdss_of_find_source_for_first_ep(struct device_node *node); | ||
879 | |||
880 | #endif /* __OMAPFB_DSS_H */ | ||