summaryrefslogtreecommitdiff
path: root/arch/arm/plat-omap/include/plat/display.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/plat-omap/include/plat/display.h')
-rw-r--r--arch/arm/plat-omap/include/plat/display.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/arch/arm/plat-omap/include/plat/display.h b/arch/arm/plat-omap/include/plat/display.h
index 5e04ddc18fa..9f30ab8d1e1 100644
--- a/arch/arm/plat-omap/include/plat/display.h
+++ b/arch/arm/plat-omap/include/plat/display.h
@@ -23,6 +23,7 @@
#include <linux/list.h>
#include <linux/kobject.h>
#include <linux/device.h>
+#include <linux/notifier.h>
#include <linux/platform_device.h>
#include <asm/atomic.h>
@@ -131,6 +132,10 @@ enum omap_dss_venc_type {
enum omap_display_caps {
OMAP_DSS_DISPLAY_CAP_MANUAL_UPDATE = 1 << 0,
OMAP_DSS_DISPLAY_CAP_TEAR_ELIM = 1 << 1,
+ /* set if display supports hotplug detect, and will call
+ * omap_dss_notify(CONNECT/DISCONNECT) at appropriate times
+ */
+ OMAP_DSS_DISPLAY_CAP_HPD = 1 << 2,
};
enum omap_dss_update_mode {
@@ -459,6 +464,7 @@ struct omap_dss_device {
struct omap_overlay_manager *manager;
enum omap_dss_display_state state;
+ struct blocking_notifier_head notifier;
/* platform specific */
int (*platform_enable)(struct omap_dss_device *dssdev);
@@ -514,6 +520,17 @@ struct omap_dss_driver {
int (*set_wss)(struct omap_dss_device *dssdev, u32 wss);
u32 (*get_wss)(struct omap_dss_device *dssdev);
+
+ /* return raw EDID.. len indicates the max number of bytes of the
+ * EDID to read */
+ int (*get_edid)(struct omap_dss_device *dssdev, u8 *edid, int len);
+
+ /* is this display physically present / plugged-in? For hot-plug
+ * type displays (DVI, HDMI), this means is the cable plugged in.
+ * For displays like LCD panels, this means is the display present
+ * on the board.
+ */
+ bool (*is_detected)(struct omap_dss_device *dssdev);
};
int omap_dss_register_driver(struct omap_dss_driver *);
@@ -532,12 +549,34 @@ struct omap_dss_device *omap_dss_find_device(void *data,
int omap_dss_start_device(struct omap_dss_device *dssdev);
void omap_dss_stop_device(struct omap_dss_device *dssdev);
+/* the event id of the event that occurred is passed in as the second arg
+ * to the notifier function, and the dssdev is passed as the third.
+ */
+enum omap_dss_event {
+ OMAP_DSS_SIZE_CHANGE,
+ /* the CONNECT/DISCONNECT events will be sent if OMAP_DSS_DISPLAY_CAP_HPD
+ * flag is set in the dssdev->caps. Otherwise the user will have to poll
+ * for detection when a monitor is plugged/unplugged.
+ */
+ OMAP_DSS_HOTPLUG_CONNECT,
+ OMAP_DSS_HOTPLUG_DISCONNECT,
+};
+
+void omap_dss_notify(struct omap_dss_device *dssdev, enum omap_dss_event evt);
+void omap_dss_add_notify(struct omap_dss_device *dssdev, struct notifier_block *nb);
+void omap_dss_remove_notify(struct omap_dss_device *dssdev, struct notifier_block *nb);
+
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_timings(struct omap_dss_device *dssdev,
+ struct omap_video_timings *timings);
+int omapdss_default_check_timings(struct omap_dss_device *dssdev,
+ struct omap_video_timings *timings);
+bool omapdss_default_is_detected(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);