diff options
author | Oleksandr Suvorov <oleksandr.suvorov@toradex.com> | 2019-07-26 14:24:04 +0300 |
---|---|---|
committer | Oleksandr Suvorov <oleksandr.suvorov@toradex.com> | 2019-07-29 09:39:04 +0300 |
commit | bd1af4aa1cf9d7a5226371b447c356a04a815bc2 (patch) | |
tree | b1cd992d7d0719b38dcfd395627d40284e71eb1a | |
parent | 287dd1b8bc9d182e6e6bfc01c992ea475a8a8893 (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.c | 7 |
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 |