summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRicardo Salveti de Araujo <ricardo.salveti@canonical.com>2011-06-22 20:40:21 +0100
committerAndy Green <andy.green@linaro.org>2011-06-22 20:40:21 +0100
commit07fc4d282312bb9dfdb71b47ddafbeb3d8de365f (patch)
tree5883fd901304680172122d977edbe557b5f1ab4e
parent220f67caa9dd27ac85608e3c38621a9180982000 (diff)
Subject: [PATCH 13/19] OMAP4: DSS2: HDMI: adding a workaround for LG monitors
Some monitors report a disconnect just after a connect, so if force is enabled, give some time and check at least one more time. This is a needed workaround to make the driver work with LG monitors. Signed-off-by: Ricardo Salveti de Araujo <ricardo.salveti@canonical.com>
-rw-r--r--drivers/video/omap2/dss/hdmi.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/video/omap2/dss/hdmi.c b/drivers/video/omap2/dss/hdmi.c
index c44029a2511..04ce20e0617 100644
--- a/drivers/video/omap2/dss/hdmi.c
+++ b/drivers/video/omap2/dss/hdmi.c
@@ -1208,6 +1208,16 @@ bool omapdss_hdmi_is_detected(struct omap_dss_device *dssdev, bool force)
r = hdmi_read_reg(HDMI_CORE_SYS_SYS_STAT);
+ /* Some annoying LG monitors will report that's disconnected
+ * right after reporting it's connected, so try again if probe
+ * failed and force is enabled */
+ if (!(r & 0x2) && (force)) {
+ DSSDBG("Fail to detect the connector and force is enabled, "
+ "trying at least one more time\n");
+ msleep(2000);
+ r = hdmi_read_reg(HDMI_CORE_SYS_SYS_STAT);
+ }
+
return !!(r & 0x2);
}