summaryrefslogtreecommitdiff
path: root/drivers/video/omap2/dss/hdmi.c
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2011-08-29 18:10:20 +0300
committerTomi Valkeinen <tomi.valkeinen@ti.com>2011-09-30 16:16:47 +0300
commit759593ffa7e05ebea9b21135cad179982331f5d8 (patch)
tree3162f08919d9f6e6ca94b8124c2ff9e5f25d5d98 /drivers/video/omap2/dss/hdmi.c
parent468c1b934c0367d15f90314ae316cd33551f70a5 (diff)
downloadlwn-759593ffa7e05ebea9b21135cad179982331f5d8.tar.gz
lwn-759593ffa7e05ebea9b21135cad179982331f5d8.zip
OMAP: DSS2: HDMI: implement detect()
Implement detect() by checking the hot plug detect status. The implementation is not very good, as it always turns on the HDMI output to get the detection working. HDMI driver needs improvements so that we could enable only core parts of it. Cc: Mythri P K <mythripk@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video/omap2/dss/hdmi.c')
-rw-r--r--drivers/video/omap2/dss/hdmi.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/video/omap2/dss/hdmi.c b/drivers/video/omap2/dss/hdmi.c
index fb85ce5a8ab4..781867002662 100644
--- a/drivers/video/omap2/dss/hdmi.c
+++ b/drivers/video/omap2/dss/hdmi.c
@@ -449,6 +449,23 @@ int omapdss_hdmi_read_edid(u8 *buf, int len)
return r;
}
+bool omapdss_hdmi_detect(void)
+{
+ int r;
+
+ mutex_lock(&hdmi.lock);
+
+ r = hdmi_runtime_get();
+ BUG_ON(r);
+
+ r = hdmi.ip_data.ops->detect(&hdmi.ip_data);
+
+ hdmi_runtime_put();
+ mutex_unlock(&hdmi.lock);
+
+ return r == 1;
+}
+
int omapdss_hdmi_display_enable(struct omap_dss_device *dssdev)
{
int r = 0;