aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorRicardo Salveti de Araujo <ricardo.salveti@canonical.com>2011-05-05 02:11:04 -0300
committerRicardo Salveti de Araujo <ricardo.salveti@canonical.com>2011-05-16 22:52:29 -0300
commitfb884cd44ca187f34e3982216c207e1044f2c883 (patch)
treedd1d8c53174147c584c5f04a33aeeb5f0d90d31a /drivers
parent3e4bac2ebb2c84a4c819a024dd9a3ad175ecde32 (diff)
downloadlinux-linaro-android-fb884cd44ca187f34e3982216c207e1044f2c883.tar.gz
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>
Diffstat (limited to 'drivers')
-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 87d48ece233..05144ef758f 100644
--- a/drivers/video/omap2/dss/hdmi.c
+++ b/drivers/video/omap2/dss/hdmi.c
@@ -1106,6 +1106,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);
}