OMAP: DSS2: Move display.h to include/video/
authorTomi Valkeinen <tomi.valkeinen@ti.com>
Wed, 11 May 2011 11:05:07 +0000 (14:05 +0300)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Wed, 11 May 2011 11:05:07 +0000 (14:05 +0300)
arch/arm/plat-omap/include/plat/display.h is an include for the OMAP DSS
driver. A more logical place for it is in include/video.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
48 files changed:
arch/arm/mach-omap2/board-3430sdp.c
arch/arm/mach-omap2/board-4430sdp.c
arch/arm/mach-omap2/board-am3517evm.c
arch/arm/mach-omap2/board-cm-t35.c
arch/arm/mach-omap2/board-devkit8000.c
arch/arm/mach-omap2/board-igep0020.c
arch/arm/mach-omap2/board-omap3beagle.c
arch/arm/mach-omap2/board-omap3evm.c
arch/arm/mach-omap2/board-omap3pandora.c
arch/arm/mach-omap2/board-omap3stalker.c
arch/arm/mach-omap2/board-omap4panda.c
arch/arm/mach-omap2/board-overo.c
arch/arm/mach-omap2/board-rx51-video.c
arch/arm/mach-omap2/board-zoom-display.c
arch/arm/mach-omap2/display.c
arch/arm/mach-omap2/include/mach/board-zoom.h
arch/arm/plat-omap/include/plat/display.h [deleted file]
arch/arm/plat-omap/include/plat/nokia-dsi-panel.h
arch/arm/plat-omap/include/plat/panel-generic-dpi.h
drivers/media/video/omap/omap_vout.c
drivers/media/video/omap/omap_voutdef.h
drivers/video/omap2/displays/panel-acx565akm.c
drivers/video/omap2/displays/panel-generic-dpi.c
drivers/video/omap2/displays/panel-lgphilips-lb035q02.c
drivers/video/omap2/displays/panel-nec-nl8048hl11-01b.c
drivers/video/omap2/displays/panel-sharp-ls037v7dw01.c
drivers/video/omap2/displays/panel-taal.c
drivers/video/omap2/displays/panel-tpo-td043mtea1.c
drivers/video/omap2/dss/core.c
drivers/video/omap2/dss/dispc.c
drivers/video/omap2/dss/display.c
drivers/video/omap2/dss/dpi.c
drivers/video/omap2/dss/dsi.c
drivers/video/omap2/dss/dss.c
drivers/video/omap2/dss/dss_features.c
drivers/video/omap2/dss/hdmi.c
drivers/video/omap2/dss/hdmi.h
drivers/video/omap2/dss/hdmi_omap4_panel.c
drivers/video/omap2/dss/manager.c
drivers/video/omap2/dss/overlay.c
drivers/video/omap2/dss/rfbi.c
drivers/video/omap2/dss/sdi.c
drivers/video/omap2/dss/venc.c
drivers/video/omap2/omapfb/omapfb-ioctl.c
drivers/video/omap2/omapfb/omapfb-main.c
drivers/video/omap2/omapfb/omapfb-sysfs.c
drivers/video/omap2/omapfb/omapfb.h
include/video/omapdss.h [new file with mode: 0644]

index 9afd087..80bc0d3 100644 (file)
@@ -37,7 +37,7 @@
 #include <plat/common.h>
 #include <plat/dma.h>
 #include <plat/gpmc.h>
-#include <plat/display.h>
+#include <video/omapdss.h>
 #include <plat/panel-generic-dpi.h>
 
 #include <plat/gpmc-smc91x.h>
index 56702c5..309bdad 100644 (file)
@@ -36,7 +36,7 @@
 #include <plat/usb.h>
 #include <plat/mmc.h>
 #include <plat/omap4-keypad.h>
-#include <plat/display.h>
+#include <video/omapdss.h>
 
 #include "mux.h"
 #include "hsmmc.h"
index ce7d5e6..7e634c8 100644 (file)
@@ -34,7 +34,7 @@
 #include <plat/board.h>
 #include <plat/common.h>
 #include <plat/usb.h>
-#include <plat/display.h>
+#include <video/omapdss.h>
 #include <plat/panel-generic-dpi.h>
 
 #include "mux.h"
index 02a12b4..a98de28 100644 (file)
@@ -45,7 +45,7 @@
 #include <plat/nand.h>
 #include <plat/gpmc.h>
 #include <plat/usb.h>
-#include <plat/display.h>
+#include <video/omapdss.h>
 #include <plat/panel-generic-dpi.h>
 #include <plat/mcspi.h>
 
index 65f9fde..2bdfd58 100644 (file)
@@ -45,7 +45,7 @@
 #include <plat/gpmc.h>
 #include <plat/nand.h>
 #include <plat/usb.h>
-#include <plat/display.h>
+#include <video/omapdss.h>
 #include <plat/panel-generic-dpi.h>
 
 #include <plat/mcspi.h>
index 34cf982..183db91 100644 (file)
@@ -31,7 +31,7 @@
 #include <plat/common.h>
 #include <plat/gpmc.h>
 #include <plat/usb.h>
-#include <plat/display.h>
+#include <video/omapdss.h>
 #include <plat/panel-generic-dpi.h>
 #include <plat/onenand.h>
 
index 33007fd..74d6b7b 100644 (file)
@@ -41,7 +41,7 @@
 
 #include <plat/board.h>
 #include <plat/common.h>
-#include <plat/display.h>
+#include <video/omapdss.h>
 #include <plat/panel-generic-dpi.h>
 #include <plat/gpmc.h>
 #include <plat/nand.h>
index 5a1a916..f75015b 100644 (file)
@@ -44,7 +44,7 @@
 #include <plat/usb.h>
 #include <plat/common.h>
 #include <plat/mcspi.h>
-#include <plat/display.h>
+#include <video/omapdss.h>
 #include <plat/panel-generic-dpi.h>
 
 #include "mux.h"
index 07dba88..1db1549 100644 (file)
@@ -46,7 +46,7 @@
 #include <mach/hardware.h>
 #include <plat/mcspi.h>
 #include <plat/usb.h>
-#include <plat/display.h>
+#include <video/omapdss.h>
 #include <plat/nand.h>
 
 #include "mux.h"
index a6e0b91..e5fdfe8 100644 (file)
@@ -39,7 +39,7 @@
 #include <plat/gpmc.h>
 #include <plat/nand.h>
 #include <plat/usb.h>
-#include <plat/display.h>
+#include <video/omapdss.h>
 #include <plat/panel-generic-dpi.h>
 
 #include <plat/mcspi.h>
index f3a7b10..9ec9a17 100644 (file)
@@ -34,7 +34,7 @@
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
-#include <plat/display.h>
+#include <video/omapdss.h>
 
 #include <plat/board.h>
 #include <plat/common.h>
index 59ca333..ff28880 100644 (file)
@@ -43,7 +43,7 @@
 
 #include <plat/board.h>
 #include <plat/common.h>
-#include <plat/display.h>
+#include <video/omapdss.h>
 #include <plat/panel-generic-dpi.h>
 #include <mach/gpio.h>
 #include <plat/gpmc.h>
index 89a66db..2df10b6 100644 (file)
@@ -15,7 +15,7 @@
 #include <linux/spi/spi.h>
 #include <linux/mm.h>
 #include <asm/mach-types.h>
-#include <plat/display.h>
+#include <video/omapdss.h>
 #include <plat/vram.h>
 #include <plat/mcspi.h>
 
index 37b84c2..60e8645 100644 (file)
@@ -15,7 +15,7 @@
 #include <linux/i2c/twl.h>
 #include <linux/spi/spi.h>
 #include <plat/mcspi.h>
-#include <plat/display.h>
+#include <video/omapdss.h>
 
 #define LCD_PANEL_RESET_GPIO_PROD      96
 #define LCD_PANEL_RESET_GPIO_PILOT     55
index 256d23f..faebcbc 100644 (file)
@@ -22,7 +22,7 @@
 #include <linux/clk.h>
 #include <linux/err.h>
 
-#include <plat/display.h>
+#include <video/omapdss.h>
 #include <plat/omap_hwmod.h>
 #include <plat/omap_device.h>
 
index d20bd9c..775fdc3 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Defines for zoom boards
  */
-#include <plat/display.h>
+#include <video/omapdss.h>
 
 #define ZOOM_NAND_CS    0
 
diff --git a/arch/arm/plat-omap/include/plat/display.h b/arch/arm/plat-omap/include/plat/display.h
deleted file mode 100644 (file)
index 5e04ddc..0000000
+++ /dev/null
@@ -1,591 +0,0 @@
-/*
- * linux/include/asm-arm/arch-omap/display.h
- *
- * Copyright (C) 2008 Nokia Corporation
- * Author: Tomi Valkeinen <tomi.valkeinen@nokia.com>
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 as published by
- * the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef __ASM_ARCH_OMAP_DISPLAY_H
-#define __ASM_ARCH_OMAP_DISPLAY_H
-
-#include <linux/list.h>
-#include <linux/kobject.h>
-#include <linux/device.h>
-#include <linux/platform_device.h>
-#include <asm/atomic.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_ACBIAS_COUNT_STAT2   (1 << 21)
-#define DISPC_IRQ_FRAMEDONE2           (1 << 22)
-
-struct omap_dss_device;
-struct omap_overlay_manager;
-
-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,
-};
-
-enum omap_plane {
-       OMAP_DSS_GFX    = 0,
-       OMAP_DSS_VIDEO1 = 1,
-       OMAP_DSS_VIDEO2 = 2
-};
-
-enum omap_channel {
-       OMAP_DSS_CHANNEL_LCD    = 0,
-       OMAP_DSS_CHANNEL_DIGIT  = 1,
-       OMAP_DSS_CHANNEL_LCD2   = 2,
-};
-
-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 */
-};
-
-enum omap_lcd_display_type {
-       OMAP_DSS_LCD_DISPLAY_STN,
-       OMAP_DSS_LCD_DISPLAY_TFT,
-};
-
-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_panel_config {
-       OMAP_DSS_LCD_IVS                = 1<<0,
-       OMAP_DSS_LCD_IHS                = 1<<1,
-       OMAP_DSS_LCD_IPC                = 1<<2,
-       OMAP_DSS_LCD_IEO                = 1<<3,
-       OMAP_DSS_LCD_RF                 = 1<<4,
-       OMAP_DSS_LCD_ONOFF              = 1<<5,
-
-       OMAP_DSS_LCD_TFT                = 1<<20,
-};
-
-enum omap_dss_venc_type {
-       OMAP_DSS_VENC_TYPE_COMPOSITE,
-       OMAP_DSS_VENC_TYPE_SVIDEO,
-};
-
-enum omap_display_caps {
-       OMAP_DSS_DISPLAY_CAP_MANUAL_UPDATE      = 1 << 0,
-       OMAP_DSS_DISPLAY_CAP_TEAR_ELIM          = 1 << 1,
-};
-
-enum omap_dss_update_mode {
-       OMAP_DSS_UPDATE_DISABLED = 0,
-       OMAP_DSS_UPDATE_AUTO,
-       OMAP_DSS_UPDATE_MANUAL,
-};
-
-enum omap_dss_display_state {
-       OMAP_DSS_DISPLAY_DISABLED = 0,
-       OMAP_DSS_DISPLAY_ACTIVE,
-       OMAP_DSS_DISPLAY_SUSPENDED,
-};
-
-/* XXX perhaps this should be removed */
-enum omap_dss_overlay_managers {
-       OMAP_DSS_OVL_MGR_LCD,
-       OMAP_DSS_OVL_MGR_TV,
-       OMAP_DSS_OVL_MGR_LCD2,
-};
-
-enum omap_dss_rotation_type {
-       OMAP_DSS_ROT_DMA = 0,
-       OMAP_DSS_ROT_VRFB = 1,
-};
-
-/* 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_DISPC = 1 << 1,
-};
-
-enum omap_overlay_manager_caps {
-       OMAP_DSS_OVL_MGR_CAP_DISPC = 1 << 0,
-};
-
-/* 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;
-};
-
-void omap_rfbi_write_command(const void *buf, u32 len);
-void omap_rfbi_read_data(void *buf, u32 len);
-void omap_rfbi_write_data(const void *buf, u32 len);
-void omap_rfbi_write_pixels(const void __iomem *buf, int scr_width,
-               u16 x, u16 y,
-               u16 w, u16 h);
-int omap_rfbi_enable_te(bool enable, unsigned line);
-int omap_rfbi_setup_te(enum omap_rfbi_te_mode mode,
-                            unsigned hs_pulse_time, unsigned vs_pulse_time,
-                            int hs_pol_inv, int vs_pol_inv, int extif_div);
-
-/* DSI */
-void dsi_bus_lock(void);
-void dsi_bus_unlock(void);
-int dsi_vc_dcs_write(int channel, u8 *data, int len);
-int dsi_vc_dcs_write_0(int channel, u8 dcs_cmd);
-int dsi_vc_dcs_write_1(int channel, u8 dcs_cmd, u8 param);
-int dsi_vc_dcs_write_nosync(int channel, u8 *data, int len);
-int dsi_vc_dcs_read(int channel, u8 dcs_cmd, u8 *buf, int buflen);
-int dsi_vc_dcs_read_1(int channel, u8 dcs_cmd, u8 *data);
-int dsi_vc_dcs_read_2(int channel, u8 dcs_cmd, u8 *data1, u8 *data2);
-int dsi_vc_set_max_rx_packet_size(int channel, u16 len);
-int dsi_vc_send_null(int channel);
-int dsi_vc_send_bta_sync(int channel);
-
-/* Board specific data */
-struct omap_dss_board_info {
-       int (*get_last_off_on_transaction_id)(struct device *dev);
-       int num_devices;
-       struct omap_dss_device **devices;
-       struct omap_dss_device *default_device;
-};
-
-#if defined(CONFIG_OMAP2_DSS_MODULE) || defined(CONFIG_OMAP2_DSS)
-/* Init with the board info */
-extern int omap_display_init(struct omap_dss_board_info *board_data);
-#else
-static inline int omap_display_init(struct omap_dss_board_info *board_data)
-{
-       return 0;
-}
-#endif
-
-struct omap_display_platform_data {
-       struct omap_dss_board_info *board_data;
-       /* TODO: Additional members to be added when PM is considered */
-
-       bool (*opt_clock_available)(const char *clk_role);
-};
-
-struct omap_video_timings {
-       /* Unit: pixels */
-       u16 x_res;
-       /* Unit: pixels */
-       u16 y_res;
-       /* Unit: KHz */
-       u32 pixel_clock;
-       /* 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 */
-};
-
-#ifdef CONFIG_OMAP2_DSS_VENC
-/* 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;
-#endif
-
-struct omap_overlay_info {
-       bool enabled;
-
-       u32 paddr;
-       void __iomem *vaddr;
-       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;
-};
-
-struct omap_overlay {
-       struct kobject kobj;
-       struct list_head list;
-
-       /* static fields */
-       const char *name;
-       int id;
-       enum omap_color_mode supported_modes;
-       enum omap_overlay_caps caps;
-
-       /* dynamic fields */
-       struct omap_overlay_manager *manager;
-       struct omap_overlay_info info;
-
-       /* if true, info has been changed, but not applied() yet */
-       bool info_dirty;
-
-       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_overlay_manager_info {
-       u32 default_color;
-
-       enum omap_dss_trans_key_type trans_key_type;
-       u32 trans_key;
-       bool trans_enabled;
-
-       bool alpha_enabled;
-};
-
-struct omap_overlay_manager {
-       struct kobject kobj;
-       struct list_head list;
-
-       /* static fields */
-       const char *name;
-       int id;
-       enum omap_overlay_manager_caps caps;
-       int num_overlays;
-       struct omap_overlay **overlays;
-       enum omap_display_type supported_displays;
-
-       /* dynamic fields */
-       struct omap_dss_device *device;
-       struct omap_overlay_manager_info info;
-
-       bool device_changed;
-       /* if true, info has been changed but not applied() yet */
-       bool info_dirty;
-
-       int (*set_device)(struct omap_overlay_manager *mgr,
-               struct omap_dss_device *dssdev);
-       int (*unset_device)(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);
-
-       int (*enable)(struct omap_overlay_manager *mgr);
-       int (*disable)(struct omap_overlay_manager *mgr);
-};
-
-struct omap_dss_device {
-       struct device dev;
-
-       enum omap_display_type type;
-
-       enum omap_channel channel;
-
-       union {
-               struct {
-                       u8 data_lines;
-               } dpi;
-
-               struct {
-                       u8 channel;
-                       u8 data_lines;
-               } rfbi;
-
-               struct {
-                       u8 datapairs;
-               } sdi;
-
-               struct {
-                       u8 clk_lane;
-                       u8 clk_pol;
-                       u8 data1_lane;
-                       u8 data1_pol;
-                       u8 data2_lane;
-                       u8 data2_pol;
-
-                       struct {
-                               u16 regn;
-                               u16 regm;
-                               u16 regm_dispc;
-                               u16 regm_dsi;
-
-                               u16 lp_clk_div;
-
-                               u16 lck_div;
-                               u16 pck_div;
-                       } div;
-
-                       bool ext_te;
-                       u8 ext_te_gpio;
-               } dsi;
-
-               struct {
-                       enum omap_dss_venc_type type;
-                       bool invert_polarity;
-               } venc;
-       } phy;
-
-       struct {
-               struct omap_video_timings timings;
-
-               int acbi;       /* ac-bias pin transitions per interrupt */
-               /* Unit: line clocks */
-               int acb;        /* ac-bias pin frequency */
-
-               enum omap_panel_config config;
-       } panel;
-
-       struct {
-               u8 pixel_size;
-               struct rfbi_timings rfbi_timings;
-       } ctrl;
-
-       int reset_gpio;
-
-       int max_backlight_level;
-
-       const char *name;
-
-       /* used to match device to driver */
-       const char *driver_name;
-
-       void *data;
-
-       struct omap_dss_driver *driver;
-
-       /* helper variable for driver suspend/resume */
-       bool activate_after_resume;
-
-       enum omap_display_caps caps;
-
-       struct omap_overlay_manager *manager;
-
-       enum omap_dss_display_state state;
-
-       /* platform specific  */
-       int (*platform_enable)(struct omap_dss_device *dssdev);
-       void (*platform_disable)(struct omap_dss_device *dssdev);
-       int (*set_backlight)(struct omap_dss_device *dssdev, int level);
-       int (*get_backlight)(struct omap_dss_device *dssdev);
-};
-
-struct omap_dss_driver {
-       struct device_driver driver;
-
-       int (*probe)(struct omap_dss_device *);
-       void (*remove)(struct omap_dss_device *);
-
-       int (*enable)(struct omap_dss_device *display);
-       void (*disable)(struct omap_dss_device *display);
-       int (*suspend)(struct omap_dss_device *display);
-       int (*resume)(struct omap_dss_device *display);
-       int (*run_test)(struct omap_dss_device *display, int test);
-
-       int (*set_update_mode)(struct omap_dss_device *dssdev,
-                       enum omap_dss_update_mode);
-       enum omap_dss_update_mode (*get_update_mode)(
-                       struct omap_dss_device *dssdev);
-
-       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);
-       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 omap_dss_register_driver(struct omap_dss_driver *);
-void omap_dss_unregister_driver(struct omap_dss_driver *);
-
-int omap_dss_register_device(struct omap_dss_device *);
-void omap_dss_unregister_device(struct omap_dss_device *);
-
-void 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));
-
-int omap_dss_start_device(struct omap_dss_device *dssdev);
-void omap_dss_stop_device(struct omap_dss_device *dssdev);
-
-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);
-
-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);
-
-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 omap_dispc_wait_for_irq_timeout(u32 irqmask, unsigned long timeout);
-int omap_dispc_wait_for_irq_interruptible_timeout(u32 irqmask,
-               unsigned long timeout);
-
-#define to_dss_driver(x) container_of((x), struct omap_dss_driver, driver)
-#define to_dss_device(x) container_of((x), struct omap_dss_device, dev)
-
-void omapdss_dsi_vc_enable_hs(int channel, bool enable);
-int omapdss_dsi_enable_te(struct omap_dss_device *dssdev, bool enable);
-
-int omap_dsi_prepare_update(struct omap_dss_device *dssdev,
-                                   u16 *x, u16 *y, u16 *w, u16 *h,
-                                   bool enlarge_update_area);
-int omap_dsi_update(struct omap_dss_device *dssdev,
-               int channel,
-               u16 x, u16 y, u16 w, u16 h,
-               void (*callback)(int, void *), void *data);
-int omap_dsi_request_vc(struct omap_dss_device *dssdev, int *channel);
-int omap_dsi_set_vc_id(struct omap_dss_device *dssdev, int channel, int vc_id);
-void omap_dsi_release_vc(struct omap_dss_device *dssdev, int channel);
-
-int omapdss_dsi_display_enable(struct omap_dss_device *dssdev);
-void omapdss_dsi_display_disable(struct omap_dss_device *dssdev);
-
-int omapdss_dpi_display_enable(struct omap_dss_device *dssdev);
-void omapdss_dpi_display_disable(struct omap_dss_device *dssdev);
-void dpi_set_timings(struct omap_dss_device *dssdev,
-                       struct omap_video_timings *timings);
-int dpi_check_timings(struct omap_dss_device *dssdev,
-                       struct omap_video_timings *timings);
-
-int omapdss_sdi_display_enable(struct omap_dss_device *dssdev);
-void omapdss_sdi_display_disable(struct omap_dss_device *dssdev);
-
-int omapdss_rfbi_display_enable(struct omap_dss_device *dssdev);
-void omapdss_rfbi_display_disable(struct omap_dss_device *dssdev);
-int omap_rfbi_prepare_update(struct omap_dss_device *dssdev,
-               u16 *x, u16 *y, u16 *w, u16 *h);
-int omap_rfbi_update(struct omap_dss_device *dssdev,
-               u16 x, u16 y, u16 w, u16 h,
-               void (*callback)(void *), void *data);
-
-#endif
index 01ab657..4d1e794 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef __ARCH_ARM_PLAT_OMAP_NOKIA_DSI_PANEL_H
 #define __ARCH_ARM_PLAT_OMAP_NOKIA_DSI_PANEL_H
 
-#include "display.h"
+struct omap_dss_device;
 
 /**
  * struct nokia_dsi_panel_data - Nokia DSI panel driver configuration
index 7906197..b037030 100644 (file)
@@ -20,7 +20,7 @@
 #ifndef __ARCH_ARM_PLAT_OMAP_PANEL_GENERIC_DPI_H
 #define __ARCH_ARM_PLAT_OMAP_PANEL_GENERIC_DPI_H
 
-#include "display.h"
+struct omap_dss_device;
 
 /**
  * struct panel_generic_dpi_data - panel driver configuration data
index d4fe7bc..4ada9be 100644 (file)
@@ -47,7 +47,7 @@
 #include <plat/dma.h>
 #include <plat/vram.h>
 #include <plat/vrfb.h>
-#include <plat/display.h>
+#include <video/omapdss.h>
 
 #include "omap_voutlib.h"
 #include "omap_voutdef.h"
index ea3a047..659497b 100644 (file)
@@ -11,7 +11,7 @@
 #ifndef OMAP_VOUTDEF_H
 #define OMAP_VOUTDEF_H
 
-#include <plat/display.h>
+#include <video/omapdss.h>
 
 #define YUYV_BPP        2
 #define RGB565_BPP      2
index 7e04c92..dbd59b8 100644 (file)
@@ -30,7 +30,7 @@
 #include <linux/backlight.h>
 #include <linux/fb.h>
 
-#include <plat/display.h>
+#include <video/omapdss.h>
 
 #define MIPID_CMD_READ_DISP_ID         0x04
 #define MIPID_CMD_READ_RED             0x06
index 4a9b9ff..cc9dc70 100644 (file)
@@ -33,6 +33,7 @@
 #include <linux/module.h>
 #include <linux/delay.h>
 #include <linux/slab.h>
+#include <video/omapdss.h>
 
 #include <plat/panel-generic-dpi.h>
 
index 271324d..e0eb35b 100644 (file)
@@ -21,7 +21,7 @@
 #include <linux/spi/spi.h>
 #include <linux/mutex.h>
 
-#include <plat/display.h>
+#include <video/omapdss.h>
 
 struct lb035q02_data {
        struct mutex lock;
index 925e0fa..2ba9d0c 100644 (file)
@@ -22,7 +22,7 @@
 #include <linux/backlight.h>
 #include <linux/fb.h>
 
-#include <plat/display.h>
+#include <video/omapdss.h>
 
 #define LCD_XRES               800
 #define LCD_YRES               480
index d2b35d2..bc142a0 100644 (file)
@@ -25,7 +25,7 @@
 #include <linux/err.h>
 #include <linux/slab.h>
 
-#include <plat/display.h>
+#include <video/omapdss.h>
 
 struct sharp_data {
        struct backlight_device *bl;
index adc9900..4673517 100644 (file)
@@ -33,7 +33,7 @@
 #include <linux/regulator/consumer.h>
 #include <linux/mutex.h>
 
-#include <plat/display.h>
+#include <video/omapdss.h>
 #include <plat/nokia-dsi-panel.h>
 
 /* DSI Virtual channel. Hardcoded for now. */
index dbe9d43..62bff58 100644 (file)
@@ -17,7 +17,7 @@
 #include <linux/err.h>
 #include <linux/slab.h>
 
-#include <plat/display.h>
+#include <video/omapdss.h>
 
 #define TPO_R02_MODE(x)                ((x) & 7)
 #define TPO_R02_MODE_800x480   7
index 1aa2ed1..3a8047a 100644 (file)
@@ -33,7 +33,7 @@
 #include <linux/device.h>
 #include <linux/regulator/consumer.h>
 
-#include <plat/display.h>
+#include <video/omapdss.h>
 
 #include "dss.h"
 #include "dss_features.h"
index 7804779..21de352 100644 (file)
@@ -37,7 +37,7 @@
 #include <plat/sram.h>
 #include <plat/clock.h>
 
-#include <plat/display.h>
+#include <video/omapdss.h>
 
 #include "dss.h"
 #include "dss_features.h"
index a85a6f3..696369c 100644 (file)
@@ -27,7 +27,7 @@
 #include <linux/jiffies.h>
 #include <linux/platform_device.h>
 
-#include <plat/display.h>
+#include <video/omapdss.h>
 #include "dss.h"
 
 static ssize_t display_enabled_show(struct device *dev,
index 2d3ca4c..8ed86f8 100644 (file)
@@ -30,7 +30,7 @@
 #include <linux/platform_device.h>
 #include <linux/regulator/consumer.h>
 
-#include <plat/display.h>
+#include <video/omapdss.h>
 #include <plat/cpu.h>
 
 #include "dss.h"
index 0a7f1a4..5c95770 100644 (file)
@@ -34,7 +34,7 @@
 #include <linux/wait.h>
 #include <linux/workqueue.h>
 
-#include <plat/display.h>
+#include <video/omapdss.h>
 #include <plat/clock.h>
 
 #include "dss.h"
index 3f1fee6..606a182 100644 (file)
@@ -29,7 +29,7 @@
 #include <linux/seq_file.h>
 #include <linux/clk.h>
 
-#include <plat/display.h>
+#include <video/omapdss.h>
 #include <plat/clock.h>
 #include "dss.h"
 #include "dss_features.h"
index aa16222..9ed2033 100644 (file)
@@ -22,7 +22,7 @@
 #include <linux/err.h>
 #include <linux/slab.h>
 
-#include <plat/display.h>
+#include <video/omapdss.h>
 #include <plat/cpu.h>
 
 #include "dss.h"
index a981def..86e32bd 100644 (file)
@@ -29,7 +29,7 @@
 #include <linux/mutex.h>
 #include <linux/delay.h>
 #include <linux/string.h>
-#include <plat/display.h>
+#include <video/omapdss.h>
 
 #include "dss.h"
 #include "hdmi.h"
index 9887ab9..4d385f6 100644 (file)
@@ -22,7 +22,7 @@
 #define _OMAP4_DSS_HDMI_H_
 
 #include <linux/string.h>
-#include <plat/display.h>
+#include <video/omapdss.h>
 
 #define HDMI_WP                0x0
 #define HDMI_CORE_SYS          0x400
index ffb5de9..7d4f2bd 100644 (file)
@@ -24,7 +24,7 @@
 #include <linux/io.h>
 #include <linux/mutex.h>
 #include <linux/module.h>
-#include <plat/display.h>
+#include <video/omapdss.h>
 
 #include "dss.h"
 
index bcd37ec..ee38ca2 100644 (file)
@@ -29,7 +29,7 @@
 #include <linux/spinlock.h>
 #include <linux/jiffies.h>
 
-#include <plat/display.h>
+#include <video/omapdss.h>
 #include <plat/cpu.h>
 
 #include "dss.h"
index f1aca6d..35ef7d1 100644 (file)
@@ -31,7 +31,7 @@
 #include <linux/delay.h>
 #include <linux/slab.h>
 
-#include <plat/display.h>
+#include <video/omapdss.h>
 #include <plat/cpu.h>
 
 #include "dss.h"
index 5ea17f4..0985f2f 100644 (file)
@@ -33,7 +33,7 @@
 #include <linux/hrtimer.h>
 #include <linux/seq_file.h>
 
-#include <plat/display.h>
+#include <video/omapdss.h>
 #include "dss.h"
 
 struct rfbi_reg { u16 idx; };
index 54a53e6..0bd4b03 100644 (file)
@@ -25,7 +25,7 @@
 #include <linux/err.h>
 #include <linux/regulator/consumer.h>
 
-#include <plat/display.h>
+#include <video/omapdss.h>
 #include <plat/cpu.h>
 #include "dss.h"
 
index 8e35a5b..3269301 100644 (file)
@@ -34,7 +34,7 @@
 #include <linux/platform_device.h>
 #include <linux/regulator/consumer.h>
 
-#include <plat/display.h>
+#include <video/omapdss.h>
 #include <plat/cpu.h>
 
 #include "dss.h"
index 6f43545..3e4ee4d 100644 (file)
@@ -28,7 +28,7 @@
 #include <linux/omapfb.h>
 #include <linux/vmalloc.h>
 
-#include <plat/display.h>
+#include <video/omapdss.h>
 #include <plat/vrfb.h>
 #include <plat/vram.h>
 
index 505ec66..606f6ee 100644 (file)
@@ -30,7 +30,7 @@
 #include <linux/platform_device.h>
 #include <linux/omapfb.h>
 
-#include <plat/display.h>
+#include <video/omapdss.h>
 #include <plat/vram.h>
 #include <plat/vrfb.h>
 
index 6f9c72c..3be7646 100644 (file)
@@ -29,7 +29,7 @@
 #include <linux/mm.h>
 #include <linux/omapfb.h>
 
-#include <plat/display.h>
+#include <video/omapdss.h>
 #include <plat/vrfb.h>
 
 #include "omapfb.h"
index 1305fc9..4d1cff9 100644 (file)
@@ -29,7 +29,7 @@
 
 #include <linux/rwsem.h>
 
-#include <plat/display.h>
+#include <video/omapdss.h>
 
 #ifdef DEBUG
 extern unsigned int omapfb_debug;
diff --git a/include/video/omapdss.h b/include/video/omapdss.h
new file mode 100644 (file)
index 0000000..3973868
--- /dev/null
@@ -0,0 +1,589 @@
+/*
+ * Copyright (C) 2008 Nokia Corporation
+ * Author: Tomi Valkeinen <tomi.valkeinen@nokia.com>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 as published by
+ * the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef __OMAP_OMAPDSS_H
+#define __OMAP_OMAPDSS_H
+
+#include <linux/list.h>
+#include <linux/kobject.h>
+#include <linux/device.h>
+#include <linux/platform_device.h>
+#include <asm/atomic.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_ACBIAS_COUNT_STAT2   (1 << 21)
+#define DISPC_IRQ_FRAMEDONE2           (1 << 22)
+
+struct omap_dss_device;
+struct omap_overlay_manager;
+
+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,
+};
+
+enum omap_plane {
+       OMAP_DSS_GFX    = 0,
+       OMAP_DSS_VIDEO1 = 1,
+       OMAP_DSS_VIDEO2 = 2
+};
+
+enum omap_channel {
+       OMAP_DSS_CHANNEL_LCD    = 0,
+       OMAP_DSS_CHANNEL_DIGIT  = 1,
+       OMAP_DSS_CHANNEL_LCD2   = 2,
+};
+
+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 */
+};
+
+enum omap_lcd_display_type {
+       OMAP_DSS_LCD_DISPLAY_STN,
+       OMAP_DSS_LCD_DISPLAY_TFT,
+};
+
+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_panel_config {
+       OMAP_DSS_LCD_IVS                = 1<<0,
+       OMAP_DSS_LCD_IHS                = 1<<1,
+       OMAP_DSS_LCD_IPC                = 1<<2,
+       OMAP_DSS_LCD_IEO                = 1<<3,
+       OMAP_DSS_LCD_RF                 = 1<<4,
+       OMAP_DSS_LCD_ONOFF              = 1<<5,
+
+       OMAP_DSS_LCD_TFT                = 1<<20,
+};
+
+enum omap_dss_venc_type {
+       OMAP_DSS_VENC_TYPE_COMPOSITE,
+       OMAP_DSS_VENC_TYPE_SVIDEO,
+};
+
+enum omap_display_caps {
+       OMAP_DSS_DISPLAY_CAP_MANUAL_UPDATE      = 1 << 0,
+       OMAP_DSS_DISPLAY_CAP_TEAR_ELIM          = 1 << 1,
+};
+
+enum omap_dss_update_mode {
+       OMAP_DSS_UPDATE_DISABLED = 0,
+       OMAP_DSS_UPDATE_AUTO,
+       OMAP_DSS_UPDATE_MANUAL,
+};
+
+enum omap_dss_display_state {
+       OMAP_DSS_DISPLAY_DISABLED = 0,
+       OMAP_DSS_DISPLAY_ACTIVE,
+       OMAP_DSS_DISPLAY_SUSPENDED,
+};
+
+/* XXX perhaps this should be removed */
+enum omap_dss_overlay_managers {
+       OMAP_DSS_OVL_MGR_LCD,
+       OMAP_DSS_OVL_MGR_TV,
+       OMAP_DSS_OVL_MGR_LCD2,
+};
+
+enum omap_dss_rotation_type {
+       OMAP_DSS_ROT_DMA = 0,
+       OMAP_DSS_ROT_VRFB = 1,
+};
+
+/* 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_DISPC = 1 << 1,
+};
+
+enum omap_overlay_manager_caps {
+       OMAP_DSS_OVL_MGR_CAP_DISPC = 1 << 0,
+};
+
+/* 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;
+};
+
+void omap_rfbi_write_command(const void *buf, u32 len);
+void omap_rfbi_read_data(void *buf, u32 len);
+void omap_rfbi_write_data(const void *buf, u32 len);
+void omap_rfbi_write_pixels(const void __iomem *buf, int scr_width,
+               u16 x, u16 y,
+               u16 w, u16 h);
+int omap_rfbi_enable_te(bool enable, unsigned line);
+int omap_rfbi_setup_te(enum omap_rfbi_te_mode mode,
+                            unsigned hs_pulse_time, unsigned vs_pulse_time,
+                            int hs_pol_inv, int vs_pol_inv, int extif_div);
+
+/* DSI */
+void dsi_bus_lock(void);
+void dsi_bus_unlock(void);
+int dsi_vc_dcs_write(int channel, u8 *data, int len);
+int dsi_vc_dcs_write_0(int channel, u8 dcs_cmd);
+int dsi_vc_dcs_write_1(int channel, u8 dcs_cmd, u8 param);
+int dsi_vc_dcs_write_nosync(int channel, u8 *data, int len);
+int dsi_vc_dcs_read(int channel, u8 dcs_cmd, u8 *buf, int buflen);
+int dsi_vc_dcs_read_1(int channel, u8 dcs_cmd, u8 *data);
+int dsi_vc_dcs_read_2(int channel, u8 dcs_cmd, u8 *data1, u8 *data2);
+int dsi_vc_set_max_rx_packet_size(int channel, u16 len);
+int dsi_vc_send_null(int channel);
+int dsi_vc_send_bta_sync(int channel);
+
+/* Board specific data */
+struct omap_dss_board_info {
+       int (*get_last_off_on_transaction_id)(struct device *dev);
+       int num_devices;
+       struct omap_dss_device **devices;
+       struct omap_dss_device *default_device;
+};
+
+#if defined(CONFIG_OMAP2_DSS_MODULE) || defined(CONFIG_OMAP2_DSS)
+/* Init with the board info */
+extern int omap_display_init(struct omap_dss_board_info *board_data);
+#else
+static inline int omap_display_init(struct omap_dss_board_info *board_data)
+{
+       return 0;
+}
+#endif
+
+struct omap_display_platform_data {
+       struct omap_dss_board_info *board_data;
+       /* TODO: Additional members to be added when PM is considered */
+
+       bool (*opt_clock_available)(const char *clk_role);
+};
+
+struct omap_video_timings {
+       /* Unit: pixels */
+       u16 x_res;
+       /* Unit: pixels */
+       u16 y_res;
+       /* Unit: KHz */
+       u32 pixel_clock;
+       /* 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 */
+};
+
+#ifdef CONFIG_OMAP2_DSS_VENC
+/* 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;
+#endif
+
+struct omap_overlay_info {
+       bool enabled;
+
+       u32 paddr;
+       void __iomem *vaddr;
+       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;
+};
+
+struct omap_overlay {
+       struct kobject kobj;
+       struct list_head list;
+
+       /* static fields */
+       const char *name;
+       int id;
+       enum omap_color_mode supported_modes;
+       enum omap_overlay_caps caps;
+
+       /* dynamic fields */
+       struct omap_overlay_manager *manager;
+       struct omap_overlay_info info;
+
+       /* if true, info has been changed, but not applied() yet */
+       bool info_dirty;
+
+       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_overlay_manager_info {
+       u32 default_color;
+
+       enum omap_dss_trans_key_type trans_key_type;
+       u32 trans_key;
+       bool trans_enabled;
+
+       bool alpha_enabled;
+};
+
+struct omap_overlay_manager {
+       struct kobject kobj;
+       struct list_head list;
+
+       /* static fields */
+       const char *name;
+       int id;
+       enum omap_overlay_manager_caps caps;
+       int num_overlays;
+       struct omap_overlay **overlays;
+       enum omap_display_type supported_displays;
+
+       /* dynamic fields */
+       struct omap_dss_device *device;
+       struct omap_overlay_manager_info info;
+
+       bool device_changed;
+       /* if true, info has been changed but not applied() yet */
+       bool info_dirty;
+
+       int (*set_device)(struct omap_overlay_manager *mgr,
+               struct omap_dss_device *dssdev);
+       int (*unset_device)(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);
+
+       int (*enable)(struct omap_overlay_manager *mgr);
+       int (*disable)(struct omap_overlay_manager *mgr);
+};
+
+struct omap_dss_device {
+       struct device dev;
+
+       enum omap_display_type type;
+
+       enum omap_channel channel;
+
+       union {
+               struct {
+                       u8 data_lines;
+               } dpi;
+
+               struct {
+                       u8 channel;
+                       u8 data_lines;
+               } rfbi;
+
+               struct {
+                       u8 datapairs;
+               } sdi;
+
+               struct {
+                       u8 clk_lane;
+                       u8 clk_pol;
+                       u8 data1_lane;
+                       u8 data1_pol;
+                       u8 data2_lane;
+                       u8 data2_pol;
+
+                       struct {
+                               u16 regn;
+                               u16 regm;
+                               u16 regm_dispc;
+                               u16 regm_dsi;
+
+                               u16 lp_clk_div;
+
+                               u16 lck_div;
+                               u16 pck_div;
+                       } div;
+
+                       bool ext_te;
+                       u8 ext_te_gpio;
+               } dsi;
+
+               struct {
+                       enum omap_dss_venc_type type;
+                       bool invert_polarity;
+               } venc;
+       } phy;
+
+       struct {
+               struct omap_video_timings timings;
+
+               int acbi;       /* ac-bias pin transitions per interrupt */
+               /* Unit: line clocks */
+               int acb;        /* ac-bias pin frequency */
+
+               enum omap_panel_config config;
+       } panel;
+
+       struct {
+               u8 pixel_size;
+               struct rfbi_timings rfbi_timings;
+       } ctrl;
+
+       int reset_gpio;
+
+       int max_backlight_level;
+
+       const char *name;
+
+       /* used to match device to driver */
+       const char *driver_name;
+
+       void *data;
+
+       struct omap_dss_driver *driver;
+
+       /* helper variable for driver suspend/resume */
+       bool activate_after_resume;
+
+       enum omap_display_caps caps;
+
+       struct omap_overlay_manager *manager;
+
+       enum omap_dss_display_state state;
+
+       /* platform specific  */
+       int (*platform_enable)(struct omap_dss_device *dssdev);
+       void (*platform_disable)(struct omap_dss_device *dssdev);
+       int (*set_backlight)(struct omap_dss_device *dssdev, int level);
+       int (*get_backlight)(struct omap_dss_device *dssdev);
+};
+
+struct omap_dss_driver {
+       struct device_driver driver;
+
+       int (*probe)(struct omap_dss_device *);
+       void (*remove)(struct omap_dss_device *);
+
+       int (*enable)(struct omap_dss_device *display);
+       void (*disable)(struct omap_dss_device *display);
+       int (*suspend)(struct omap_dss_device *display);
+       int (*resume)(struct omap_dss_device *display);
+       int (*run_test)(struct omap_dss_device *display, int test);
+
+       int (*set_update_mode)(struct omap_dss_device *dssdev,
+                       enum omap_dss_update_mode);
+       enum omap_dss_update_mode (*get_update_mode)(
+                       struct omap_dss_device *dssdev);
+
+       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);
+       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 omap_dss_register_driver(struct omap_dss_driver *);
+void omap_dss_unregister_driver(struct omap_dss_driver *);
+
+int omap_dss_register_device(struct omap_dss_device *);
+void omap_dss_unregister_device(struct omap_dss_device *);
+
+void 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));
+
+int omap_dss_start_device(struct omap_dss_device *dssdev);
+void omap_dss_stop_device(struct omap_dss_device *dssdev);
+
+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);
+
+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);
+
+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 omap_dispc_wait_for_irq_timeout(u32 irqmask, unsigned long timeout);
+int omap_dispc_wait_for_irq_interruptible_timeout(u32 irqmask,
+               unsigned long timeout);
+
+#define to_dss_driver(x) container_of((x), struct omap_dss_driver, driver)
+#define to_dss_device(x) container_of((x), struct omap_dss_device, dev)
+
+void omapdss_dsi_vc_enable_hs(int channel, bool enable);
+int omapdss_dsi_enable_te(struct omap_dss_device *dssdev, bool enable);
+
+int omap_dsi_prepare_update(struct omap_dss_device *dssdev,
+                                   u16 *x, u16 *y, u16 *w, u16 *h,
+                                   bool enlarge_update_area);
+int omap_dsi_update(struct omap_dss_device *dssdev,
+               int channel,
+               u16 x, u16 y, u16 w, u16 h,
+               void (*callback)(int, void *), void *data);
+int omap_dsi_request_vc(struct omap_dss_device *dssdev, int *channel);
+int omap_dsi_set_vc_id(struct omap_dss_device *dssdev, int channel, int vc_id);
+void omap_dsi_release_vc(struct omap_dss_device *dssdev, int channel);
+
+int omapdss_dsi_display_enable(struct omap_dss_device *dssdev);
+void omapdss_dsi_display_disable(struct omap_dss_device *dssdev);
+
+int omapdss_dpi_display_enable(struct omap_dss_device *dssdev);
+void omapdss_dpi_display_disable(struct omap_dss_device *dssdev);
+void dpi_set_timings(struct omap_dss_device *dssdev,
+                       struct omap_video_timings *timings);
+int dpi_check_timings(struct omap_dss_device *dssdev,
+                       struct omap_video_timings *timings);
+
+int omapdss_sdi_display_enable(struct omap_dss_device *dssdev);
+void omapdss_sdi_display_disable(struct omap_dss_device *dssdev);
+
+int omapdss_rfbi_display_enable(struct omap_dss_device *dssdev);
+void omapdss_rfbi_display_disable(struct omap_dss_device *dssdev);
+int omap_rfbi_prepare_update(struct omap_dss_device *dssdev,
+               u16 *x, u16 *y, u16 *w, u16 *h);
+int omap_rfbi_update(struct omap_dss_device *dssdev,
+               u16 x, u16 y, u16 w, u16 h,
+               void (*callback)(void *), void *data);
+
+#endif