summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOleksandr Suvorov <oleksandr.suvorov@toradex.com>2019-07-26 14:24:04 +0300
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2020-02-12 11:06:00 +0100
commit9f935c6301e7b2db89354f5f80ccf94f636aebb6 (patch)
tree0e57ff3496bae7282c1b9131d8903222b074892a
parenta83dd6a6bfdbc317fdf9f0fddd4f5022832abbdc (diff)
drm/bridge: vga-dac: Fix non-DDC VGA detection
If I2C bus for DDC is not defined, assume the connector is always connected. Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
-rw-r--r--drivers/gpu/drm/bridge/dumb-vga-dac.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/drm/bridge/dumb-vga-dac.c b/drivers/gpu/drm/bridge/dumb-vga-dac.c
index 2e6c61d9b8ea..499f8b1b20ab 100644
--- a/drivers/gpu/drm/bridge/dumb-vga-dac.c
+++ b/drivers/gpu/drm/bridge/dumb-vga-dac.c
@@ -82,6 +82,13 @@ dumb_vga_connector_detect(struct drm_connector *connector, bool force)
struct dumb_vga *vga = drm_connector_to_dumb_vga(connector);
/*
+ * If I2C bus for DDC is not defined, asume that the cable
+ * is always connected.
+ */
+ if (PTR_ERR(vga->ddc) == -ENODEV)
+ return connector_status_connected;
+
+ /*
* Even if we have an I2C bus, we can't assume that the cable
* is disconnected if drm_probe_ddc fails. Some cables don't
* wire the DDC pins, or the I2C bus might not be working at