[PATCH 1/1] drm/bridge: vga-dac: Fix detect of monitor connection

From: Oleksandr Suvorov
Date: Thu Jul 25 2019 - 14:05:28 EST


DDC and VGA channels are independent, and therefore
we cannot decide whether the monitor is connected or not,
depending on the information from the DDC.

So the monitor should always be considered connected.
Thus there is no reason to use connector detect callback for this
driver.

Fixes DRM error of dumb monitor detection like:
...
DRM: head 'VGA-1' found, connector 32 is disconnected.
...

Cc: stable@xxxxxxxxxxxxxxx
Fixes: 56fe8b6f4991 ("drm/bridge: Add RGB to VGA bridge support")
Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@xxxxxxxxxxx>
---

drivers/gpu/drm/bridge/dumb-vga-dac.c | 18 ------------------
1 file changed, 18 deletions(-)

diff --git a/drivers/gpu/drm/bridge/dumb-vga-dac.c b/drivers/gpu/drm/bridge/dumb-vga-dac.c
index d32885b906ae..e37c19356d12 100644
--- a/drivers/gpu/drm/bridge/dumb-vga-dac.c
+++ b/drivers/gpu/drm/bridge/dumb-vga-dac.c
@@ -73,25 +73,7 @@ static const struct drm_connector_helper_funcs dumb_vga_con_helper_funcs = {
.get_modes = dumb_vga_get_modes,
};

-static enum drm_connector_status
-dumb_vga_connector_detect(struct drm_connector *connector, bool force)
-{
- struct dumb_vga *vga = drm_connector_to_dumb_vga(connector);
-
- /*
- * 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
- * all.
- */
- if (!IS_ERR(vga->ddc) && drm_probe_ddc(vga->ddc))
- return connector_status_connected;
-
- return connector_status_unknown;
-}
-
static const struct drm_connector_funcs dumb_vga_con_funcs = {
- .detect = dumb_vga_connector_detect,
.fill_modes = drm_helper_probe_single_connector_modes,
.destroy = drm_connector_cleanup,
.reset = drm_atomic_helper_connector_reset,
--
2.20.1