omapfb: Create new header file for omapfb DSS implementation
authorPeter Ujfalusi <peter.ujfalusi@ti.com>
Tue, 31 May 2016 08:43:12 +0000 (11:43 +0300)
committerPeter Ujfalusi <peter.ujfalusi@ti.com>
Fri, 3 Jun 2016 13:06:38 +0000 (16:06 +0300)
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:
drivers/video/fbdev/omap2/omapfb/displays/connector-analog-tv.c
drivers/video/fbdev/omap2/omapfb/displays/connector-dvi.c
drivers/video/fbdev/omap2/omapfb/displays/connector-hdmi.c
drivers/video/fbdev/omap2/omapfb/displays/encoder-opa362.c
drivers/video/fbdev/omap2/omapfb/displays/encoder-tfp410.c
drivers/video/fbdev/omap2/omapfb/displays/encoder-tpd12s015.c
drivers/video/fbdev/omap2/omapfb/displays/panel-dpi.c
drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.c
drivers/video/fbdev/omap2/omapfb/displays/panel-lgphilips-lb035q02.c
drivers/video/fbdev/omap2/omapfb/displays/panel-nec-nl8048hl11.c
drivers/video/fbdev/omap2/omapfb/displays/panel-sharp-ls037v7dw01.c
drivers/video/fbdev/omap2/omapfb/displays/panel-sony-acx565akm.c
drivers/video/fbdev/omap2/omapfb/displays/panel-tpo-td028ttec1.c
drivers/video/fbdev/omap2/omapfb/displays/panel-tpo-td043mtea1.c
drivers/video/fbdev/omap2/omapfb/dss/apply.c
drivers/video/fbdev/omap2/omapfb/dss/core.c
drivers/video/fbdev/omap2/omapfb/dss/dispc-compat.c
drivers/video/fbdev/omap2/omapfb/dss/dispc.c
drivers/video/fbdev/omap2/omapfb/dss/dispc_coefs.c
drivers/video/fbdev/omap2/omapfb/dss/display-sysfs.c
drivers/video/fbdev/omap2/omapfb/dss/display.c
drivers/video/fbdev/omap2/omapfb/dss/dpi.c
drivers/video/fbdev/omap2/omapfb/dss/dsi.c
drivers/video/fbdev/omap2/omapfb/dss/dss-of.c
drivers/video/fbdev/omap2/omapfb/dss/dss.c
drivers/video/fbdev/omap2/omapfb/dss/dss_features.c
drivers/video/fbdev/omap2/omapfb/dss/hdmi.h
drivers/video/fbdev/omap2/omapfb/dss/hdmi4.c
drivers/video/fbdev/omap2/omapfb/dss/hdmi5.c
drivers/video/fbdev/omap2/omapfb/dss/hdmi_common.c
drivers/video/fbdev/omap2/omapfb/dss/hdmi_phy.c
drivers/video/fbdev/omap2/omapfb/dss/hdmi_pll.c
drivers/video/fbdev/omap2/omapfb/dss/hdmi_wp.c
drivers/video/fbdev/omap2/omapfb/dss/manager-sysfs.c
drivers/video/fbdev/omap2/omapfb/dss/manager.c
drivers/video/fbdev/omap2/omapfb/dss/output.c
drivers/video/fbdev/omap2/omapfb/dss/overlay-sysfs.c
drivers/video/fbdev/omap2/omapfb/dss/overlay.c
drivers/video/fbdev/omap2/omapfb/dss/pll.c
drivers/video/fbdev/omap2/omapfb/dss/rfbi.c
drivers/video/fbdev/omap2/omapfb/dss/sdi.c
drivers/video/fbdev/omap2/omapfb/dss/venc.c
drivers/video/fbdev/omap2/omapfb/dss/video-pll.c
drivers/video/fbdev/omap2/omapfb/omapfb-ioctl.c
drivers/video/fbdev/omap2/omapfb/omapfb-main.c
drivers/video/fbdev/omap2/omapfb/omapfb-sysfs.c
drivers/video/fbdev/omap2/omapfb/omapfb.h
include/video/omapfb_dss.h [new file with mode: 0644]

index d963b4a9cfc024c9f55db4b4786a058874ae4939..9d78411a3bf75123783df932cacc4dfb142b85bd 100644 (file)
@@ -14,7 +14,7 @@
 #include <linux/platform_device.h>
 #include <linux/of.h>
 
-#include <video/omapdss.h>
+#include <video/omapfb_dss.h>
 #include <video/omap-panel-data.h>
 
 struct panel_drv_data {
index f2abbec7602a82c3ddef5ca1551970d251b0b7aa..06e1db34541e2cc8ba6bf51987428965532509c9 100644 (file)
@@ -16,7 +16,7 @@
 
 #include <drm/drm_edid.h>
 
-#include <video/omapdss.h>
+#include <video/omapfb_dss.h>
 
 static const struct omap_video_timings dvic_default_timings = {
        .x_res          = 640,
index 231b8588a59f74a654d677f8780d4d6256920f42..58d5803ede67f11fbc12b96591227b87d719f391 100644 (file)
@@ -17,7 +17,7 @@
 
 #include <drm/drm_edid.h>
 
-#include <video/omapdss.h>
+#include <video/omapfb_dss.h>
 
 static const struct omap_video_timings hdmic_default_timings = {
        .x_res          = 640,
index 8c246c213e06ea1bfaff43f49c34e4a903a6193a..a9a67167cc3d40f5fbc037a2c38ebd5a1a2af904 100644 (file)
@@ -20,7 +20,7 @@
 #include <linux/slab.h>
 #include <linux/of_gpio.h>
 
-#include <video/omapdss.h>
+#include <video/omapfb_dss.h>
 
 struct panel_drv_data {
        struct omap_dss_device dssdev;
index 778e3b384c2f4d0db586fe44add320831d4943d6..8c0953d069b7ec4df741f7daf3ea3cc99d510826 100644 (file)
@@ -15,7 +15,7 @@
 #include <linux/slab.h>
 #include <linux/of_gpio.h>
 
-#include <video/omapdss.h>
+#include <video/omapfb_dss.h>
 
 struct panel_drv_data {
        struct omap_dss_device dssdev;
index 7939157af95779678adc14dc54e65d476a2ae9d5..80dc47347e211a4ab8c16e4f3670025cb092f150 100644 (file)
@@ -16,7 +16,7 @@
 #include <linux/platform_device.h>
 #include <linux/gpio/consumer.h>
 
-#include <video/omapdss.h>
+#include <video/omapfb_dss.h>
 
 struct panel_drv_data {
        struct omap_dss_device dssdev;
index e780fd4f8b46b3cc24637985eeb663960b522429..ace3d818afe564049f5d048bd4acbbbb43b52fcc 100644 (file)
@@ -16,7 +16,7 @@
 #include <linux/of.h>
 #include <linux/of_gpio.h>
 
-#include <video/omapdss.h>
+#include <video/omapfb_dss.h>
 #include <video/omap-panel-data.h>
 #include <video/of_display_timing.h>
 
index a4eac6962b762d3d33dfded7653c7e64002e00d7..b58012b82b6fe93fb81b2429fb2d060c43c9bf9e 100644 (file)
@@ -25,7 +25,7 @@
 #include <linux/of_device.h>
 #include <linux/of_gpio.h>
 
-#include <video/omapdss.h>
+#include <video/omapfb_dss.h>
 #include <video/mipi_display.h>
 
 /* DSI Virtual channel. Hardcoded for now. */
index 6d5207c7b22cc98fb1d26b17b0af7753cea29328..f14691ce8d020f850a8df3b86b9ccc9d538afb4b 100644 (file)
@@ -16,7 +16,7 @@
 #include <linux/mutex.h>
 #include <linux/gpio.h>
 
-#include <video/omapdss.h>
+#include <video/omapfb_dss.h>
 
 static struct omap_video_timings lb035q02_timings = {
        .x_res = 320,
index 3852cea3c9477a74c6ee6b58b2a18a5c7520aa0e..a2cbadd3eca301fbadf3a9e3e90b466e3c4bc741 100644 (file)
@@ -18,7 +18,7 @@
 #include <linux/gpio.h>
 #include <linux/of_gpio.h>
 
-#include <video/omapdss.h>
+#include <video/omapfb_dss.h>
 
 struct panel_drv_data {
        struct omap_dss_device  dssdev;
index a1e590155a269702224c15ca219c2a7fb2e671b6..a8be18a87fa0038e40d4f14a9fba625e2e320374 100644 (file)
@@ -17,7 +17,7 @@
 #include <linux/platform_device.h>
 #include <linux/slab.h>
 #include <linux/regulator/consumer.h>
-#include <video/omapdss.h>
+#include <video/omapfb_dss.h>
 
 struct panel_drv_data {
        struct omap_dss_device dssdev;
index 31efcca801bdce78f68b6e963a4c80694f85b7d1..468560a6daaea16c891193f98369f4be9aabf63a 100644 (file)
@@ -33,7 +33,7 @@
 #include <linux/of.h>
 #include <linux/of_gpio.h>
 
-#include <video/omapdss.h>
+#include <video/omapfb_dss.h>
 #include <video/omap-panel-data.h>
 
 #define MIPID_CMD_READ_DISP_ID         0x04
index f4dc023868aedd4740f36229c5ea15d85223c57c..b529a8c2b652cfa327ad0435024870e4b60c7ddc 100644 (file)
@@ -28,7 +28,7 @@
 #include <linux/delay.h>
 #include <linux/spi/spi.h>
 #include <linux/gpio.h>
-#include <video/omapdss.h>
+#include <video/omapfb_dss.h>
 
 struct panel_drv_data {
        struct omap_dss_device dssdev;
index f49e60da5bd36a1ba05e3f43ccecc977f092376d..51e628b85f4a097693cf9c922962eaf7659c32c6 100644 (file)
@@ -19,7 +19,7 @@
 #include <linux/slab.h>
 #include <linux/of_gpio.h>
 
-#include <video/omapdss.h>
+#include <video/omapfb_dss.h>
 
 #define TPO_R02_MODE(x)                ((x) & 7)
 #define TPO_R02_MODE_800x480   7
index 663ccc3bf4e5cebb63ef05250a1e5d9d8edeaa07..2481f4871f6640c8fc58571cede92149ba4cd733 100644 (file)
@@ -23,7 +23,7 @@
 #include <linux/spinlock.h>
 #include <linux/jiffies.h>
 
-#include <video/omapdss.h>
+#include <video/omapfb_dss.h>
 
 #include "dss.h"
 #include "dss_features.h"
index b9de21d3ff09841fd17a78d7ee079f24ef91e87f..29de4827589dc5cee33128e8b01c93eaacda805d 100644 (file)
@@ -35,7 +35,7 @@
 #include <linux/suspend.h>
 #include <linux/slab.h>
 
-#include <video/omapdss.h>
+#include <video/omapfb_dss.h>
 
 #include "dss.h"
 #include "dss_features.h"
index 6607db37a5e4be877729926e5f0628e532fd733d..3691bde4ce0a01a0d7ae76aaec3e3779db4d54c7 100644 (file)
@@ -26,7 +26,7 @@
 #include <linux/interrupt.h>
 #include <linux/seq_file.h>
 
-#include <video/omapdss.h>
+#include <video/omapfb_dss.h>
 
 #include "dss.h"
 #include "dss_features.h"
index 5491e304f4fe9ead7dc2d136b8f65a4b96daa76e..7a75dfda98457c37965412233539bfeab534b265 100644 (file)
@@ -41,7 +41,7 @@
 #include <linux/of.h>
 #include <linux/component.h>
 
-#include <video/omapdss.h>
+#include <video/omapfb_dss.h>
 
 #include "dss.h"
 #include "dss_features.h"
index 038c15b04215c8d11adfbde220be1f25b54d75e3..59c9a5c47ca95fb11d83fa3fb88f1cb18c22e9c3 100644 (file)
@@ -18,7 +18,7 @@
  */
 
 #include <linux/kernel.h>
-#include <video/omapdss.h>
+#include <video/omapfb_dss.h>
 
 #include "dispc.h"
 
index 75b5286029ee44906243b2c23e1aade1a77d74ef..b3fdbfd0b82db6a2d5c7581e0e506511aa5eb5f6 100644 (file)
@@ -25,7 +25,7 @@
 #include <linux/platform_device.h>
 #include <linux/sysfs.h>
 
-#include <video/omapdss.h>
+#include <video/omapfb_dss.h>
 #include "dss.h"
 
 static ssize_t display_name_show(struct omap_dss_device *dssdev, char *buf)
index ef5b9027985d63e50aecd7b91177e2b2030a61bb..dd5468695c434373f5ec9fe479177368cb5620ee 100644 (file)
@@ -28,7 +28,7 @@
 #include <linux/platform_device.h>
 #include <linux/of.h>
 
-#include <video/omapdss.h>
+#include <video/omapfb_dss.h>
 #include "dss.h"
 #include "dss_features.h"
 
index 7953e6a523463080fc22569bd89dc3f7918c6dc4..da09806b940c74f1fc32ad2abf3870fcc095cbef 100644 (file)
@@ -34,7 +34,7 @@
 #include <linux/clk.h>
 #include <linux/component.h>
 
-#include <video/omapdss.h>
+#include <video/omapfb_dss.h>
 
 #include "dss.h"
 #include "dss_features.h"
index d63e59807707966bc5ce43346f4c76d42fd140df..9e4800a4e3d11cff2ec29f78a260d4777c19784e 100644 (file)
@@ -42,7 +42,7 @@
 #include <linux/of_platform.h>
 #include <linux/component.h>
 
-#include <video/omapdss.h>
+#include <video/omapfb_dss.h>
 #include <video/mipi_display.h>
 
 #include "dss.h"
index bf407b6ba15ca0002166a0704124eeda0fb2052e..d356a252ab4a7f14d8042df74159b0732e0bdd6c 100644 (file)
@@ -18,7 +18,7 @@
 #include <linux/of.h>
 #include <linux/seq_file.h>
 
-#include <video/omapdss.h>
+#include <video/omapfb_dss.h>
 
 #include "dss.h"
 
index 0078c4d1fc315a1ffd351d096b021db43cb74852..47d7f69ad9ad858a75595922f032341d319f442d 100644 (file)
@@ -41,7 +41,7 @@
 #include <linux/suspend.h>
 #include <linux/component.h>
 
-#include <video/omapdss.h>
+#include <video/omapfb_dss.h>
 
 #include "dss.h"
 #include "dss_features.h"
index c886a2927f73f77d5e6054eec26f5d9d61427ee3..8fc843b56b268d1d30e87ddb1b990d7d04e10e6b 100644 (file)
@@ -23,7 +23,7 @@
 #include <linux/err.h>
 #include <linux/slab.h>
 
-#include <video/omapdss.h>
+#include <video/omapfb_dss.h>
 
 #include "dss.h"
 #include "dss_features.h"
index c32a21a260549eee85be2b61e1c7296f803a7651..f6de87e078b06df69e66683534ede423927be311 100644 (file)
@@ -23,7 +23,7 @@
 #include <linux/io.h>
 #include <linux/platform_device.h>
 #include <linux/hdmi.h>
-#include <video/omapdss.h>
+#include <video/omapfb_dss.h>
 #include <sound/omap-hdmi-audio.h>
 
 #include "dss.h"
index 2e71aec838b1b5276d31a47cf1b5da77767b41a3..926a6f20dbb233ea541dc2dbbd1e90c0484e3a1a 100644 (file)
@@ -33,7 +33,7 @@
 #include <linux/gpio.h>
 #include <linux/regulator/consumer.h>
 #include <linux/component.h>
-#include <video/omapdss.h>
+#include <video/omapfb_dss.h>
 #include <sound/omap-hdmi-audio.h>
 
 #include "hdmi4_core.h"
index aade6d99662ab800fa03b5ab25e2a844bce822b1..0ee829a165c3a974f6fb6560543303a97cd761da 100644 (file)
@@ -38,7 +38,7 @@
 #include <linux/gpio.h>
 #include <linux/regulator/consumer.h>
 #include <linux/component.h>
-#include <video/omapdss.h>
+#include <video/omapfb_dss.h>
 #include <sound/omap-hdmi-audio.h>
 
 #include "hdmi5_core.h"
index 1b8fcc6c4ba1ba9381709d4970cb25a950640fdb..189a5ad125a37bc279c664cd61e37e5dcff780ac 100644 (file)
@@ -4,7 +4,7 @@
 #include <linux/kernel.h>
 #include <linux/err.h>
 #include <linux/of.h>
-#include <video/omapdss.h>
+#include <video/omapfb_dss.h>
 
 #include "hdmi.h"
 
index 1f5d19c119cea01dbf17801f9f149cf0e38afc06..9a13c35fd6d8069cf7c7fb86f5b287e595ffb311 100644 (file)
@@ -13,7 +13,7 @@
 #include <linux/io.h>
 #include <linux/platform_device.h>
 #include <linux/slab.h>
-#include <video/omapdss.h>
+#include <video/omapfb_dss.h>
 
 #include "dss.h"
 #include "hdmi.h"
index 06e23a7c432ccea22b02cfb32e47d2516ee757e2..eac3665aba6cbe25a257eb752d4f1d5c8a9ca141 100644 (file)
@@ -17,7 +17,7 @@
 #include <linux/platform_device.h>
 #include <linux/clk.h>
 
-#include <video/omapdss.h>
+#include <video/omapfb_dss.h>
 
 #include "dss.h"
 #include "hdmi.h"
index 7c544bc56fb5d4400b4d7c32a96809ce6a2dd2a1..705373e4cf3864edc19911509e0342966f1f00fd 100644 (file)
@@ -14,7 +14,7 @@
 #include <linux/err.h>
 #include <linux/io.h>
 #include <linux/platform_device.h>
-#include <video/omapdss.h>
+#include <video/omapfb_dss.h>
 
 #include "dss.h"
 #include "hdmi.h"
index a7414fb12830260df190985a438161ef3c0e5b20..9e2a67fdf4d20129a581b40da118a72628d30372 100644 (file)
@@ -26,7 +26,7 @@
 #include <linux/platform_device.h>
 #include <linux/jiffies.h>
 
-#include <video/omapdss.h>
+#include <video/omapfb_dss.h>
 
 #include "dss.h"
 #include "dss_features.h"
index 08a67f4f6a20e2599d3039f63ccf4681ad8bf5c6..986e3cfaa1d9675c71ee8110f596a6a4bca9c209 100644 (file)
@@ -28,7 +28,7 @@
 #include <linux/platform_device.h>
 #include <linux/jiffies.h>
 
-#include <video/omapdss.h>
+#include <video/omapfb_dss.h>
 
 #include "dss.h"
 #include "dss_features.h"
index 16072159bd24344731f03a413459a4c290793d7e..bed9a978269df9d0b3bf80d5691fc4b204e4a292 100644 (file)
@@ -21,7 +21,7 @@
 #include <linux/slab.h>
 #include <linux/of.h>
 
-#include <video/omapdss.h>
+#include <video/omapfb_dss.h>
 
 #include "dss.h"
 
index 4cc5ddebfb340204fb05710d35dea5e189cb1d39..f1f6c0aea752f54a0f925c1338452e1ab69b9732 100644 (file)
@@ -26,7 +26,7 @@
 #include <linux/kobject.h>
 #include <linux/platform_device.h>
 
-#include <video/omapdss.h>
+#include <video/omapfb_dss.h>
 
 #include "dss.h"
 #include "dss_features.h"
index 2f7cee985cdddea5e75178da51ce875525f255ce..d6c5d75d2ef8262d6b13f8286ad912dd33dfce4e 100644 (file)
@@ -30,7 +30,7 @@
 #include <linux/delay.h>
 #include <linux/slab.h>
 
-#include <video/omapdss.h>
+#include <video/omapfb_dss.h>
 
 #include "dss.h"
 #include "dss_features.h"
index f974ddcd3b6e97563f455c3b4196e6641d7ed041..0564c5606cd06853a2a09a88a42c2e801565d9fd 100644 (file)
@@ -22,7 +22,7 @@
 #include <linux/regulator/consumer.h>
 #include <linux/sched.h>
 
-#include <video/omapdss.h>
+#include <video/omapfb_dss.h>
 
 #include "dss.h"
 
index aea6a1d0fb201e29ab7d18551a6dc595e3991dbd..562b0c4ae0c6c57e3374801a31854fc28bd1dc1a 100644 (file)
@@ -38,7 +38,7 @@
 #include <linux/pm_runtime.h>
 #include <linux/component.h>
 
-#include <video/omapdss.h>
+#include <video/omapfb_dss.h>
 #include "dss.h"
 
 struct rfbi_reg { u16 idx; };
index d747cc6b59e14d87c167adeb9a526a9500ed460c..c4be732a4714c73d7e73225d8c965d8e0287d28d 100644 (file)
@@ -29,7 +29,7 @@
 #include <linux/of.h>
 #include <linux/component.h>
 
-#include <video/omapdss.h>
+#include <video/omapfb_dss.h>
 #include "dss.h"
 
 static struct {
index 26e0ee30adf85b1c7a0f81fe3045272d8fa5b47c..392464da12e419ce518d790cd800d46089fd454e 100644 (file)
@@ -37,7 +37,7 @@
 #include <linux/of.h>
 #include <linux/component.h>
 
-#include <video/omapdss.h>
+#include <video/omapfb_dss.h>
 
 #include "dss.h"
 #include "dss_features.h"
index b1ec59e42940c22ef2b63042dd4a523917bea64f..a890540f2037a5a8914de0e60c5fee4fa60ba2a5 100644 (file)
@@ -17,7 +17,7 @@
 #include <linux/platform_device.h>
 #include <linux/sched.h>
 
-#include <video/omapdss.h>
+#include <video/omapfb_dss.h>
 
 #include "dss.h"
 #include "dss_features.h"
index 9ddfdd63b84ced6a1f8e32c01ac7c38cdb83258f..ef69273074ba706752b52076b83e2cd070210fb2 100644 (file)
@@ -30,7 +30,7 @@
 #include <linux/export.h>
 #include <linux/sizes.h>
 
-#include <video/omapdss.h>
+#include <video/omapfb_dss.h>
 #include <video/omapvrfb.h>
 
 #include "omapfb.h"
index d3af01c94a58d07f45b6e55c95c91af44755b987..2fb90cb6803ffdceae66bf0ccea148848c5503f5 100644 (file)
@@ -30,7 +30,7 @@
 #include <linux/platform_device.h>
 #include <linux/omapfb.h>
 
-#include <video/omapdss.h>
+#include <video/omapfb_dss.h>
 #include <video/omapvrfb.h>
 
 #include "omapfb.h"
index 18fa9e1d003319e62388aa12bac398f12e5927ec..8087a009c54f89365022754a9e67d6820f06c75f 100644 (file)
@@ -29,7 +29,7 @@
 #include <linux/mm.h>
 #include <linux/omapfb.h>
 
-#include <video/omapdss.h>
+#include <video/omapfb_dss.h>
 #include <video/omapvrfb.h>
 
 #include "omapfb.h"
index 623cd872a36788f3dc8cccd25fa53b475995cb3a..bcb9ff4a607d27189e865998e07a7b669ab4ddb7 100644 (file)
@@ -31,7 +31,7 @@
 #include <linux/dma-attrs.h>
 #include <linux/dma-mapping.h>
 
-#include <video/omapdss.h>
+#include <video/omapfb_dss.h>
 
 #ifdef DEBUG
 extern bool omapfb_debug;
diff --git a/include/video/omapfb_dss.h b/include/video/omapfb_dss.h
new file mode 100644 (file)
index 0000000..65738c4
--- /dev/null
@@ -0,0 +1,880 @@
+/*
+ * Copyright (C) 2016 Texas Instruments, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ */
+
+#ifndef __OMAPFB_DSS_H
+#define __OMAPFB_DSS_H
+
+#include <linux/list.h>
+#include <linux/kobject.h>
+#include <linux/device.h>
+#include <linux/interrupt.h>
+#include <linux/platform_data/omapdss.h>
+
+#include <video/videomode.h>
+
+#define DISPC_IRQ_FRAMEDONE            (1 << 0)
+#define DISPC_IRQ_VSYNC                        (1 << 1)
+#define DISPC_IRQ_EVSYNC_EVEN          (1 << 2)
+#define DISPC_IRQ_EVSYNC_ODD           (1 << 3)
+#define DISPC_IRQ_ACBIAS_COUNT_STAT    (1 << 4)
+#define DISPC_IRQ_PROG_LINE_NUM                (1 << 5)
+#define DISPC_IRQ_GFX_FIFO_UNDERFLOW   (1 << 6)
+#define DISPC_IRQ_GFX_END_WIN          (1 << 7)
+#define DISPC_IRQ_PAL_GAMMA_MASK       (1 << 8)
+#define DISPC_IRQ_OCP_ERR              (1 << 9)
+#define DISPC_IRQ_VID1_FIFO_UNDERFLOW  (1 << 10)
+#define DISPC_IRQ_VID1_END_WIN         (1 << 11)
+#define DISPC_IRQ_VID2_FIFO_UNDERFLOW  (1 << 12)
+#define DISPC_IRQ_VID2_END_WIN         (1 << 13)
+#define DISPC_IRQ_SYNC_LOST            (1 << 14)
+#define DISPC_IRQ_SYNC_LOST_DIGIT      (1 << 15)
+#define DISPC_IRQ_WAKEUP               (1 << 16)
+#define DISPC_IRQ_SYNC_LOST2           (1 << 17)
+#define DISPC_IRQ_VSYNC2               (1 << 18)
+#define DISPC_IRQ_VID3_END_WIN         (1 << 19)
+#define DISPC_IRQ_VID3_FIFO_UNDERFLOW  (1 << 20)
+#define DISPC_IRQ_ACBIAS_COUNT_STAT2   (1 << 21)
+#define DISPC_IRQ_FRAMEDONE2           (1 << 22)
+#define DISPC_IRQ_FRAMEDONEWB          (1 << 23)
+#define DISPC_IRQ_FRAMEDONETV          (1 << 24)
+#define DISPC_IRQ_WBBUFFEROVERFLOW     (1 << 25)
+#define DISPC_IRQ_WBUNCOMPLETEERROR    (1 << 26)
+#define DISPC_IRQ_SYNC_LOST3           (1 << 27)
+#define DISPC_IRQ_VSYNC3               (1 << 28)
+#define DISPC_IRQ_ACBIAS_COUNT_STAT3   (1 << 29)
+#define DISPC_IRQ_FRAMEDONE3           (1 << 30)
+
+struct omap_dss_device;
+struct omap_overlay_manager;
+struct dss_lcd_mgr_config;
+struct snd_aes_iec958;
+struct snd_cea_861_aud_if;
+struct hdmi_avi_infoframe;
+
+enum omap_display_type {
+       OMAP_DISPLAY_TYPE_NONE          = 0,
+       OMAP_DISPLAY_TYPE_DPI           = 1 << 0,
+       OMAP_DISPLAY_TYPE_DBI           = 1 << 1,
+       OMAP_DISPLAY_TYPE_SDI           = 1 << 2,
+       OMAP_DISPLAY_TYPE_DSI           = 1 << 3,
+       OMAP_DISPLAY_TYPE_VENC          = 1 << 4,
+       OMAP_DISPLAY_TYPE_HDMI          = 1 << 5,
+       OMAP_DISPLAY_TYPE_DVI           = 1 << 6,
+};
+
+enum omap_plane {
+       OMAP_DSS_GFX    = 0,
+       OMAP_DSS_VIDEO1 = 1,
+       OMAP_DSS_VIDEO2 = 2,
+       OMAP_DSS_VIDEO3 = 3,
+       OMAP_DSS_WB     = 4,
+};
+
+enum omap_channel {
+       OMAP_DSS_CHANNEL_LCD    = 0,
+       OMAP_DSS_CHANNEL_DIGIT  = 1,
+       OMAP_DSS_CHANNEL_LCD2   = 2,
+       OMAP_DSS_CHANNEL_LCD3   = 3,
+       OMAP_DSS_CHANNEL_WB     = 4,
+};
+
+enum omap_color_mode {
+       OMAP_DSS_COLOR_CLUT1    = 1 << 0,  /* BITMAP 1 */
+       OMAP_DSS_COLOR_CLUT2    = 1 << 1,  /* BITMAP 2 */
+       OMAP_DSS_COLOR_CLUT4    = 1 << 2,  /* BITMAP 4 */
+       OMAP_DSS_COLOR_CLUT8    = 1 << 3,  /* BITMAP 8 */
+       OMAP_DSS_COLOR_RGB12U   = 1 << 4,  /* RGB12, 16-bit container */
+       OMAP_DSS_COLOR_ARGB16   = 1 << 5,  /* ARGB16 */
+       OMAP_DSS_COLOR_RGB16    = 1 << 6,  /* RGB16 */
+       OMAP_DSS_COLOR_RGB24U   = 1 << 7,  /* RGB24, 32-bit container */
+       OMAP_DSS_COLOR_RGB24P   = 1 << 8,  /* RGB24, 24-bit container */
+       OMAP_DSS_COLOR_YUV2     = 1 << 9,  /* YUV2 4:2:2 co-sited */
+       OMAP_DSS_COLOR_UYVY     = 1 << 10, /* UYVY 4:2:2 co-sited */
+       OMAP_DSS_COLOR_ARGB32   = 1 << 11, /* ARGB32 */
+       OMAP_DSS_COLOR_RGBA32   = 1 << 12, /* RGBA32 */
+       OMAP_DSS_COLOR_RGBX32   = 1 << 13, /* RGBx32 */
+       OMAP_DSS_COLOR_NV12             = 1 << 14, /* NV12 format: YUV 4:2:0 */
+       OMAP_DSS_COLOR_RGBA16           = 1 << 15, /* RGBA16 - 4444 */
+       OMAP_DSS_COLOR_RGBX16           = 1 << 16, /* RGBx16 - 4444 */
+       OMAP_DSS_COLOR_ARGB16_1555      = 1 << 17, /* ARGB16 - 1555 */
+       OMAP_DSS_COLOR_XRGB16_1555      = 1 << 18, /* xRGB16 - 1555 */
+};
+
+enum omap_dss_load_mode {
+       OMAP_DSS_LOAD_CLUT_AND_FRAME    = 0,
+       OMAP_DSS_LOAD_CLUT_ONLY         = 1,
+       OMAP_DSS_LOAD_FRAME_ONLY        = 2,
+       OMAP_DSS_LOAD_CLUT_ONCE_FRAME   = 3,
+};
+
+enum omap_dss_trans_key_type {
+       OMAP_DSS_COLOR_KEY_GFX_DST = 0,
+       OMAP_DSS_COLOR_KEY_VID_SRC = 1,
+};
+
+enum omap_rfbi_te_mode {
+       OMAP_DSS_RFBI_TE_MODE_1 = 1,
+       OMAP_DSS_RFBI_TE_MODE_2 = 2,
+};
+
+enum omap_dss_signal_level {
+       OMAPDSS_SIG_ACTIVE_LOW,
+       OMAPDSS_SIG_ACTIVE_HIGH,
+};
+
+enum omap_dss_signal_edge {
+       OMAPDSS_DRIVE_SIG_FALLING_EDGE,
+       OMAPDSS_DRIVE_SIG_RISING_EDGE,
+};
+
+enum omap_dss_venc_type {
+       OMAP_DSS_VENC_TYPE_COMPOSITE,
+       OMAP_DSS_VENC_TYPE_SVIDEO,
+};
+
+enum omap_dss_dsi_pixel_format {
+       OMAP_DSS_DSI_FMT_RGB888,
+       OMAP_DSS_DSI_FMT_RGB666,
+       OMAP_DSS_DSI_FMT_RGB666_PACKED,
+       OMAP_DSS_DSI_FMT_RGB565,
+};
+
+enum omap_dss_dsi_mode {
+       OMAP_DSS_DSI_CMD_MODE = 0,
+       OMAP_DSS_DSI_VIDEO_MODE,
+};
+
+enum omap_display_caps {
+       OMAP_DSS_DISPLAY_CAP_MANUAL_UPDATE      = 1 << 0,
+       OMAP_DSS_DISPLAY_CAP_TEAR_ELIM          = 1 << 1,
+};
+
+enum omap_dss_display_state {
+       OMAP_DSS_DISPLAY_DISABLED = 0,
+       OMAP_DSS_DISPLAY_ACTIVE,
+};
+
+enum omap_dss_rotation_type {
+       OMAP_DSS_ROT_DMA        = 1 << 0,
+       OMAP_DSS_ROT_VRFB       = 1 << 1,
+       OMAP_DSS_ROT_TILER      = 1 << 2,
+};
+
+/* clockwise rotation angle */
+enum omap_dss_rotation_angle {
+       OMAP_DSS_ROT_0   = 0,
+       OMAP_DSS_ROT_90  = 1,
+       OMAP_DSS_ROT_180 = 2,
+       OMAP_DSS_ROT_270 = 3,
+};
+
+enum omap_overlay_caps {
+       OMAP_DSS_OVL_CAP_SCALE = 1 << 0,
+       OMAP_DSS_OVL_CAP_GLOBAL_ALPHA = 1 << 1,
+       OMAP_DSS_OVL_CAP_PRE_MULT_ALPHA = 1 << 2,
+       OMAP_DSS_OVL_CAP_ZORDER = 1 << 3,
+       OMAP_DSS_OVL_CAP_POS = 1 << 4,
+       OMAP_DSS_OVL_CAP_REPLICATION = 1 << 5,
+};
+
+enum omap_overlay_manager_caps {
+       OMAP_DSS_DUMMY_VALUE, /* add a dummy value to prevent compiler error */
+};
+
+enum omap_dss_clk_source {
+       OMAP_DSS_CLK_SRC_FCK = 0,               /* OMAP2/3: DSS1_ALWON_FCLK
+                                                * OMAP4: DSS_FCLK */
+       OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DISPC,   /* OMAP3: DSI1_PLL_FCLK
+                                                * OMAP4: PLL1_CLK1 */
+       OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DSI,     /* OMAP3: DSI2_PLL_FCLK
+                                                * OMAP4: PLL1_CLK2 */
+       OMAP_DSS_CLK_SRC_DSI2_PLL_HSDIV_DISPC,  /* OMAP4: PLL2_CLK1 */
+       OMAP_DSS_CLK_SRC_DSI2_PLL_HSDIV_DSI,    /* OMAP4: PLL2_CLK2 */
+};
+
+enum omap_hdmi_flags {
+       OMAP_HDMI_SDA_SCL_EXTERNAL_PULLUP = 1 << 0,
+};
+
+enum omap_dss_output_id {
+       OMAP_DSS_OUTPUT_DPI     = 1 << 0,
+       OMAP_DSS_OUTPUT_DBI     = 1 << 1,
+       OMAP_DSS_OUTPUT_SDI     = 1 << 2,
+       OMAP_DSS_OUTPUT_DSI1    = 1 << 3,
+       OMAP_DSS_OUTPUT_DSI2    = 1 << 4,
+       OMAP_DSS_OUTPUT_VENC    = 1 << 5,
+       OMAP_DSS_OUTPUT_HDMI    = 1 << 6,
+};
+
+/* RFBI */
+
+struct rfbi_timings {
+       int cs_on_time;
+       int cs_off_time;
+       int we_on_time;
+       int we_off_time;
+       int re_on_time;
+       int re_off_time;
+       int we_cycle_time;
+       int re_cycle_time;
+       int cs_pulse_width;
+       int access_time;
+
+       int clk_div;
+
+       u32 tim[5];             /* set by rfbi_convert_timings() */
+
+       int converted;
+};
+
+/* DSI */
+
+enum omap_dss_dsi_trans_mode {
+       /* Sync Pulses: both sync start and end packets sent */
+       OMAP_DSS_DSI_PULSE_MODE,
+       /* Sync Events: only sync start packets sent */
+       OMAP_DSS_DSI_EVENT_MODE,
+       /* Burst: only sync start packets sent, pixels are time compressed */
+       OMAP_DSS_DSI_BURST_MODE,
+};
+
+struct omap_dss_dsi_videomode_timings {
+       unsigned long hsclk;
+
+       unsigned ndl;
+       unsigned bitspp;
+
+       /* pixels */
+       u16 hact;
+       /* lines */
+       u16 vact;
+
+       /* DSI video mode blanking data */
+       /* Unit: byte clock cycles */
+       u16 hss;
+       u16 hsa;
+       u16 hse;
+       u16 hfp;
+       u16 hbp;
+       /* Unit: line clocks */
+       u16 vsa;
+       u16 vfp;
+       u16 vbp;
+
+       /* DSI blanking modes */
+       int blanking_mode;
+       int hsa_blanking_mode;
+       int hbp_blanking_mode;
+       int hfp_blanking_mode;
+
+       enum omap_dss_dsi_trans_mode trans_mode;
+
+       bool ddr_clk_always_on;
+       int window_sync;
+};
+
+struct omap_dss_dsi_config {
+       enum omap_dss_dsi_mode mode;
+       enum omap_dss_dsi_pixel_format pixel_format;
+       const struct omap_video_timings *timings;
+
+       unsigned long hs_clk_min, hs_clk_max;
+       unsigned long lp_clk_min, lp_clk_max;
+
+       bool ddr_clk_always_on;
+       enum omap_dss_dsi_trans_mode trans_mode;
+};
+
+struct omap_video_timings {
+       /* Unit: pixels */
+       u16 x_res;
+       /* Unit: pixels */
+       u16 y_res;
+       /* Unit: Hz */
+       u32 pixelclock;
+       /* Unit: pixel clocks */
+       u16 hsw;        /* Horizontal synchronization pulse width */
+       /* Unit: pixel clocks */
+       u16 hfp;        /* Horizontal front porch */
+       /* Unit: pixel clocks */
+       u16 hbp;        /* Horizontal back porch */
+       /* Unit: line clocks */
+       u16 vsw;        /* Vertical synchronization pulse width */
+       /* Unit: line clocks */
+       u16 vfp;        /* Vertical front porch */
+       /* Unit: line clocks */
+       u16 vbp;        /* Vertical back porch */
+
+       /* Vsync logic level */
+       enum omap_dss_signal_level vsync_level;
+       /* Hsync logic level */
+       enum omap_dss_signal_level hsync_level;
+       /* Interlaced or Progressive timings */
+       bool interlace;
+       /* Pixel clock edge to drive LCD data */
+       enum omap_dss_signal_edge data_pclk_edge;
+       /* Data enable logic level */
+       enum omap_dss_signal_level de_level;
+       /* Pixel clock edges to drive HSYNC and VSYNC signals */
+       enum omap_dss_signal_edge sync_pclk_edge;
+
+       bool double_pixel;
+};
+
+/* Hardcoded timings for tv modes. Venc only uses these to
+ * identify the mode, and does not actually use the configs
+ * itself. However, the configs should be something that
+ * a normal monitor can also show */
+extern const struct omap_video_timings omap_dss_pal_timings;
+extern const struct omap_video_timings omap_dss_ntsc_timings;
+
+struct omap_dss_cpr_coefs {
+       s16 rr, rg, rb;
+       s16 gr, gg, gb;
+       s16 br, bg, bb;
+};
+
+struct omap_overlay_info {
+       dma_addr_t paddr;
+       dma_addr_t p_uv_addr;  /* for NV12 format */
+       u16 screen_width;
+       u16 width;
+       u16 height;
+       enum omap_color_mode color_mode;
+       u8 rotation;
+       enum omap_dss_rotation_type rotation_type;
+       bool mirror;
+
+       u16 pos_x;
+       u16 pos_y;
+       u16 out_width;  /* if 0, out_width == width */
+       u16 out_height; /* if 0, out_height == height */
+       u8 global_alpha;
+       u8 pre_mult_alpha;
+       u8 zorder;
+};
+
+struct omap_overlay {
+       struct kobject kobj;
+       struct list_head list;
+
+       /* static fields */
+       const char *name;
+       enum omap_plane id;
+       enum omap_color_mode supported_modes;
+       enum omap_overlay_caps caps;
+
+       /* dynamic fields */
+       struct omap_overlay_manager *manager;
+
+       /*
+        * The following functions do not block:
+        *
+        * is_enabled
+        * set_overlay_info
+        * get_overlay_info
+        *
+        * The rest of the functions may block and cannot be called from
+        * interrupt context
+        */
+
+       int (*enable)(struct omap_overlay *ovl);
+       int (*disable)(struct omap_overlay *ovl);
+       bool (*is_enabled)(struct omap_overlay *ovl);
+
+       int (*set_manager)(struct omap_overlay *ovl,
+               struct omap_overlay_manager *mgr);
+       int (*unset_manager)(struct omap_overlay *ovl);
+
+       int (*set_overlay_info)(struct omap_overlay *ovl,
+                       struct omap_overlay_info *info);
+       void (*get_overlay_info)(struct omap_overlay *ovl,
+                       struct omap_overlay_info *info);
+
+       int (*wait_for_go)(struct omap_overlay *ovl);
+
+       struct omap_dss_device *(*get_device)(struct omap_overlay *ovl);
+};
+
+struct omap_overlay_manager_info {
+       u32 default_color;
+
+       enum omap_dss_trans_key_type trans_key_type;
+       u32 trans_key;
+       bool trans_enabled;
+
+       bool partial_alpha_enabled;
+
+       bool cpr_enable;
+       struct omap_dss_cpr_coefs cpr_coefs;
+};
+
+struct omap_overlay_manager {
+       struct kobject kobj;
+
+       /* static fields */
+       const char *name;
+       enum omap_channel id;
+       enum omap_overlay_manager_caps caps;
+       struct list_head overlays;
+       enum omap_display_type supported_displays;
+       enum omap_dss_output_id supported_outputs;
+
+       /* dynamic fields */
+       struct omap_dss_device *output;
+
+       /*
+        * The following functions do not block:
+        *
+        * set_manager_info
+        * get_manager_info
+        * apply
+        *
+        * The rest of the functions may block and cannot be called from
+        * interrupt context
+        */
+
+       int (*set_output)(struct omap_overlay_manager *mgr,
+               struct omap_dss_device *output);
+       int (*unset_output)(struct omap_overlay_manager *mgr);
+
+       int (*set_manager_info)(struct omap_overlay_manager *mgr,
+                       struct omap_overlay_manager_info *info);
+       void (*get_manager_info)(struct omap_overlay_manager *mgr,
+                       struct omap_overlay_manager_info *info);
+
+       int (*apply)(struct omap_overlay_manager *mgr);
+       int (*wait_for_go)(struct omap_overlay_manager *mgr);
+       int (*wait_for_vsync)(struct omap_overlay_manager *mgr);
+
+       struct omap_dss_device *(*get_device)(struct omap_overlay_manager *mgr);
+};
+
+/* 22 pins means 1 clk lane and 10 data lanes */
+#define OMAP_DSS_MAX_DSI_PINS 22
+
+struct omap_dsi_pin_config {
+       int num_pins;
+       /*
+        * pin numbers in the following order:
+        * clk+, clk-
+        * data1+, data1-
+        * data2+, data2-
+        * ...
+        */
+       int pins[OMAP_DSS_MAX_DSI_PINS];
+};
+
+struct omap_dss_writeback_info {
+       u32 paddr;
+       u32 p_uv_addr;
+       u16 buf_width;
+       u16 width;
+       u16 height;
+       enum omap_color_mode color_mode;
+       u8 rotation;
+       enum omap_dss_rotation_type rotation_type;
+       bool mirror;
+       u8 pre_mult_alpha;
+};
+
+struct omapdss_dpi_ops {
+       int (*connect)(struct omap_dss_device *dssdev,
+                       struct omap_dss_device *dst);
+       void (*disconnect)(struct omap_dss_device *dssdev,
+                       struct omap_dss_device *dst);
+
+       int (*enable)(struct omap_dss_device *dssdev);
+       void (*disable)(struct omap_dss_device *dssdev);
+
+       int (*check_timings)(struct omap_dss_device *dssdev,
+                       struct omap_video_timings *timings);
+       void (*set_timings)(struct omap_dss_device *dssdev,
+                       struct omap_video_timings *timings);
+       void (*get_timings)(struct omap_dss_device *dssdev,
+                       struct omap_video_timings *timings);
+
+       void (*set_data_lines)(struct omap_dss_device *dssdev, int data_lines);
+};
+
+struct omapdss_sdi_ops {
+       int (*connect)(struct omap_dss_device *dssdev,
+                       struct omap_dss_device *dst);
+       void (*disconnect)(struct omap_dss_device *dssdev,
+                       struct omap_dss_device *dst);
+
+       int (*enable)(struct omap_dss_device *dssdev);
+       void (*disable)(struct omap_dss_device *dssdev);
+
+       int (*check_timings)(struct omap_dss_device *dssdev,
+                       struct omap_video_timings *timings);
+       void (*set_timings)(struct omap_dss_device *dssdev,
+                       struct omap_video_timings *timings);
+       void (*get_timings)(struct omap_dss_device *dssdev,
+                       struct omap_video_timings *timings);
+
+       void (*set_datapairs)(struct omap_dss_device *dssdev, int datapairs);
+};
+
+struct omapdss_dvi_ops {
+       int (*connect)(struct omap_dss_device *dssdev,
+                       struct omap_dss_device *dst);
+       void (*disconnect)(struct omap_dss_device *dssdev,
+                       struct omap_dss_device *dst);
+
+       int (*enable)(struct omap_dss_device *dssdev);
+       void (*disable)(struct omap_dss_device *dssdev);
+
+       int (*check_timings)(struct omap_dss_device *dssdev,
+                       struct omap_video_timings *timings);
+       void (*set_timings)(struct omap_dss_device *dssdev,
+                       struct omap_video_timings *timings);
+       void (*get_timings)(struct omap_dss_device *dssdev,
+                       struct omap_video_timings *timings);
+};
+
+struct omapdss_atv_ops {
+       int (*connect)(struct omap_dss_device *dssdev,
+                       struct omap_dss_device *dst);
+       void (*disconnect)(struct omap_dss_device *dssdev,
+                       struct omap_dss_device *dst);
+
+       int (*enable)(struct omap_dss_device *dssdev);
+       void (*disable)(struct omap_dss_device *dssdev);
+
+       int (*check_timings)(struct omap_dss_device *dssdev,
+                       struct omap_video_timings *timings);
+       void (*set_timings)(struct omap_dss_device *dssdev,
+                       struct omap_video_timings *timings);
+       void (*get_timings)(struct omap_dss_device *dssdev,
+                       struct omap_video_timings *timings);
+
+       void (*set_type)(struct omap_dss_device *dssdev,
+               enum omap_dss_venc_type type);
+       void (*invert_vid_out_polarity)(struct omap_dss_device *dssdev,
+               bool invert_polarity);
+
+       int (*set_wss)(struct omap_dss_device *dssdev, u32 wss);
+       u32 (*get_wss)(struct omap_dss_device *dssdev);
+};
+
+struct omapdss_hdmi_ops {
+       int (*connect)(struct omap_dss_device *dssdev,
+                       struct omap_dss_device *dst);
+       void (*disconnect)(struct omap_dss_device *dssdev,
+                       struct omap_dss_device *dst);
+
+       int (*enable)(struct omap_dss_device *dssdev);
+       void (*disable)(struct omap_dss_device *dssdev);
+
+       int (*check_timings)(struct omap_dss_device *dssdev,
+                       struct omap_video_timings *timings);
+       void (*set_timings)(struct omap_dss_device *dssdev,
+                       struct omap_video_timings *timings);
+       void (*get_timings)(struct omap_dss_device *dssdev,
+                       struct omap_video_timings *timings);
+
+       int (*read_edid)(struct omap_dss_device *dssdev, u8 *buf, int len);
+       bool (*detect)(struct omap_dss_device *dssdev);
+
+       int (*set_hdmi_mode)(struct omap_dss_device *dssdev, bool hdmi_mode);
+       int (*set_infoframe)(struct omap_dss_device *dssdev,
+               const struct hdmi_avi_infoframe *avi);
+};
+
+struct omapdss_dsi_ops {
+       int (*connect)(struct omap_dss_device *dssdev,
+                       struct omap_dss_device *dst);
+       void (*disconnect)(struct omap_dss_device *dssdev,
+                       struct omap_dss_device *dst);
+
+       int (*enable)(struct omap_dss_device *dssdev);
+       void (*disable)(struct omap_dss_device *dssdev, bool disconnect_lanes,
+                       bool enter_ulps);
+
+       /* bus configuration */
+       int (*set_config)(struct omap_dss_device *dssdev,
+                       const struct omap_dss_dsi_config *cfg);
+       int (*configure_pins)(struct omap_dss_device *dssdev,
+                       const struct omap_dsi_pin_config *pin_cfg);
+
+       void (*enable_hs)(struct omap_dss_device *dssdev, int channel,
+                       bool enable);
+       int (*enable_te)(struct omap_dss_device *dssdev, bool enable);
+
+       int (*update)(struct omap_dss_device *dssdev, int channel,
+                       void (*callback)(int, void *), void *data);
+
+       void (*bus_lock)(struct omap_dss_device *dssdev);
+       void (*bus_unlock)(struct omap_dss_device *dssdev);
+
+       int (*enable_video_output)(struct omap_dss_device *dssdev, int channel);
+       void (*disable_video_output)(struct omap_dss_device *dssdev,
+                       int channel);
+
+       int (*request_vc)(struct omap_dss_device *dssdev, int *channel);
+       int (*set_vc_id)(struct omap_dss_device *dssdev, int channel,
+                       int vc_id);
+       void (*release_vc)(struct omap_dss_device *dssdev, int channel);
+
+       /* data transfer */
+       int (*dcs_write)(struct omap_dss_device *dssdev, int channel,
+                       u8 *data, int len);
+       int (*dcs_write_nosync)(struct omap_dss_device *dssdev, int channel,
+                       u8 *data, int len);
+       int (*dcs_read)(struct omap_dss_device *dssdev, int channel, u8 dcs_cmd,
+                       u8 *data, int len);
+
+       int (*gen_write)(struct omap_dss_device *dssdev, int channel,
+                       u8 *data, int len);
+       int (*gen_write_nosync)(struct omap_dss_device *dssdev, int channel,
+                       u8 *data, int len);
+       int (*gen_read)(struct omap_dss_device *dssdev, int channel,
+                       u8 *reqdata, int reqlen,
+                       u8 *data, int len);
+
+       int (*bta_sync)(struct omap_dss_device *dssdev, int channel);
+
+       int (*set_max_rx_packet_size)(struct omap_dss_device *dssdev,
+                       int channel, u16 plen);
+};
+
+struct omap_dss_device {
+       struct kobject kobj;
+       struct device *dev;
+
+       struct module *owner;
+
+       struct list_head panel_list;
+
+       /* alias in the form of "display%d" */
+       char alias[16];
+
+       enum omap_display_type type;
+       enum omap_display_type output_type;
+
+       union {
+               struct {
+                       u8 data_lines;
+               } dpi;
+
+               struct {
+                       u8 channel;
+                       u8 data_lines;
+               } rfbi;
+
+               struct {
+                       u8 datapairs;
+               } sdi;
+
+               struct {
+                       int module;
+               } dsi;
+
+               struct {
+                       enum omap_dss_venc_type type;
+                       bool invert_polarity;
+               } venc;
+       } phy;
+
+       struct {
+               struct omap_video_timings timings;
+
+               enum omap_dss_dsi_pixel_format dsi_pix_fmt;
+               enum omap_dss_dsi_mode dsi_mode;
+       } panel;
+
+       struct {
+               u8 pixel_size;
+               struct rfbi_timings rfbi_timings;
+       } ctrl;
+
+       const char *name;
+
+       /* used to match device to driver */
+       const char *driver_name;
+
+       void *data;
+
+       struct omap_dss_driver *driver;
+
+       union {
+               const struct omapdss_dpi_ops *dpi;
+               const struct omapdss_sdi_ops *sdi;
+               const struct omapdss_dvi_ops *dvi;
+               const struct omapdss_hdmi_ops *hdmi;
+               const struct omapdss_atv_ops *atv;
+               const struct omapdss_dsi_ops *dsi;
+       } ops;
+
+       /* helper variable for driver suspend/resume */
+       bool activate_after_resume;
+
+       enum omap_display_caps caps;
+
+       struct omap_dss_device *src;
+
+       enum omap_dss_display_state state;
+
+       /* OMAP DSS output specific fields */
+
+       struct list_head list;
+
+       /* DISPC channel for this output */
+       enum omap_channel dispc_channel;
+       bool dispc_channel_connected;
+
+       /* output instance */
+       enum omap_dss_output_id id;
+
+       /* the port number in the DT node */
+       int port_num;
+
+       /* dynamic fields */
+       struct omap_overlay_manager *manager;
+
+       struct omap_dss_device *dst;
+};
+
+struct omap_dss_driver {
+       int (*probe)(struct omap_dss_device *);
+       void (*remove)(struct omap_dss_device *);
+
+       int (*connect)(struct omap_dss_device *dssdev);
+       void (*disconnect)(struct omap_dss_device *dssdev);
+
+       int (*enable)(struct omap_dss_device *display);
+       void (*disable)(struct omap_dss_device *display);
+       int (*run_test)(struct omap_dss_device *display, int test);
+
+       int (*update)(struct omap_dss_device *dssdev,
+                              u16 x, u16 y, u16 w, u16 h);
+       int (*sync)(struct omap_dss_device *dssdev);
+
+       int (*enable_te)(struct omap_dss_device *dssdev, bool enable);
+       int (*get_te)(struct omap_dss_device *dssdev);
+
+       u8 (*get_rotate)(struct omap_dss_device *dssdev);
+       int (*set_rotate)(struct omap_dss_device *dssdev, u8 rotate);
+
+       bool (*get_mirror)(struct omap_dss_device *dssdev);
+       int (*set_mirror)(struct omap_dss_device *dssdev, bool enable);
+
+       int (*memory_read)(struct omap_dss_device *dssdev,
+                       void *buf, size_t size,
+                       u16 x, u16 y, u16 w, u16 h);
+
+       void (*get_resolution)(struct omap_dss_device *dssdev,
+                       u16 *xres, u16 *yres);
+       void (*get_dimensions)(struct omap_dss_device *dssdev,
+                       u32 *width, u32 *height);
+       int (*get_recommended_bpp)(struct omap_dss_device *dssdev);
+
+       int (*check_timings)(struct omap_dss_device *dssdev,
+                       struct omap_video_timings *timings);
+       void (*set_timings)(struct omap_dss_device *dssdev,
+                       struct omap_video_timings *timings);
+       void (*get_timings)(struct omap_dss_device *dssdev,
+                       struct omap_video_timings *timings);
+
+       int (*set_wss)(struct omap_dss_device *dssdev, u32 wss);
+       u32 (*get_wss)(struct omap_dss_device *dssdev);
+
+       int (*read_edid)(struct omap_dss_device *dssdev, u8 *buf, int len);
+       bool (*detect)(struct omap_dss_device *dssdev);
+
+       int (*set_hdmi_mode)(struct omap_dss_device *dssdev, bool hdmi_mode);
+       int (*set_hdmi_infoframe)(struct omap_dss_device *dssdev,
+               const struct hdmi_avi_infoframe *avi);
+};
+
+enum omapdss_version omapdss_get_version(void);
+bool omapdss_is_initialized(void);
+
+int omap_dss_register_driver(struct omap_dss_driver *);
+void omap_dss_unregister_driver(struct omap_dss_driver *);
+
+int omapdss_register_display(struct omap_dss_device *dssdev);
+void omapdss_unregister_display(struct omap_dss_device *dssdev);
+
+struct omap_dss_device *omap_dss_get_device(struct omap_dss_device *dssdev);
+void omap_dss_put_device(struct omap_dss_device *dssdev);
+#define for_each_dss_dev(d) while ((d = omap_dss_get_next_device(d)) != NULL)
+struct omap_dss_device *omap_dss_get_next_device(struct omap_dss_device *from);
+struct omap_dss_device *omap_dss_find_device(void *data,
+               int (*match)(struct omap_dss_device *dssdev, void *data));
+const char *omapdss_get_default_display_name(void);
+
+void videomode_to_omap_video_timings(const struct videomode *vm,
+               struct omap_video_timings *ovt);
+void omap_video_timings_to_videomode(const struct omap_video_timings *ovt,
+               struct videomode *vm);
+
+int dss_feat_get_num_mgrs(void);
+int dss_feat_get_num_ovls(void);
+enum omap_color_mode dss_feat_get_supported_color_modes(enum omap_plane plane);
+
+
+
+int omap_dss_get_num_overlay_managers(void);
+struct omap_overlay_manager *omap_dss_get_overlay_manager(int num);
+
+int omap_dss_get_num_overlays(void);
+struct omap_overlay *omap_dss_get_overlay(int num);
+
+int omapdss_register_output(struct omap_dss_device *output);
+void omapdss_unregister_output(struct omap_dss_device *output);
+struct omap_dss_device *omap_dss_get_output(enum omap_dss_output_id id);
+struct omap_dss_device *omap_dss_find_output(const char *name);
+struct omap_dss_device *omap_dss_find_output_by_port_node(struct device_node *port);
+int omapdss_output_set_device(struct omap_dss_device *out,
+               struct omap_dss_device *dssdev);
+int omapdss_output_unset_device(struct omap_dss_device *out);
+
+struct omap_dss_device *omapdss_find_output_from_display(struct omap_dss_device *dssdev);
+struct omap_overlay_manager *omapdss_find_mgr_from_display(struct omap_dss_device *dssdev);
+
+void omapdss_default_get_resolution(struct omap_dss_device *dssdev,
+               u16 *xres, u16 *yres);
+int omapdss_default_get_recommended_bpp(struct omap_dss_device *dssdev);
+void omapdss_default_get_timings(struct omap_dss_device *dssdev,
+               struct omap_video_timings *timings);
+
+typedef void (*omap_dispc_isr_t) (void *arg, u32 mask);
+int omap_dispc_register_isr(omap_dispc_isr_t isr, void *arg, u32 mask);
+int omap_dispc_unregister_isr(omap_dispc_isr_t isr, void *arg, u32 mask);
+
+int omapdss_compat_init(void);
+void omapdss_compat_uninit(void);
+
+static inline bool omapdss_device_is_connected(struct omap_dss_device *dssdev)
+{
+       return dssdev->src;
+}
+
+static inline bool omapdss_device_is_enabled(struct omap_dss_device *dssdev)
+{
+       return dssdev->state == OMAP_DSS_DISPLAY_ACTIVE;
+}
+
+struct device_node *
+omapdss_of_get_next_port(const struct device_node *parent,
+                        struct device_node *prev);
+
+struct device_node *
+omapdss_of_get_next_endpoint(const struct device_node *parent,
+                            struct device_node *prev);
+
+struct device_node *
+omapdss_of_get_first_endpoint(const struct device_node *parent);
+
+struct omap_dss_device *
+omapdss_of_find_source_for_first_ep(struct device_node *node);
+
+#endif /* __OMAPFB_DSS_H */