]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
drm/vc4: Fall back to using an EDID probe in the absence of a GPIO.
authorEric Anholt <eric@anholt.net>
Wed, 14 Sep 2016 18:21:29 +0000 (19:21 +0100)
committerEric Anholt <eric@anholt.net>
Thu, 6 Oct 2016 18:58:26 +0000 (11:58 -0700)
On Pi0/1/2, we use an external GPIO line for hotplug detection, since
the HDMI_HOTPLUG register isn't connected to anything.  However, with
the Pi3 the HPD GPIO line has moved off to a GPIO expander that will
be tricky to get to (the firmware is constantly polling the expander
using i2c0, so we'll need to coordinate with it).

As a stop-gap, if we don't have a GPIO line, use an EDID probe to
detect connection.  Fixes HDMI display on the pi3.

Signed-off-by: Eric Anholt <eric@anholt.net>
drivers/gpu/drm/vc4/vc4_hdmi.c

index 29be7b7273df5b2c75d3162d72097efe62ec93df..1e61931846d3f10cdb7f914e54c260f8b9731cd7 100644 (file)
@@ -174,6 +174,9 @@ vc4_hdmi_connector_detect(struct drm_connector *connector, bool force)
                        return connector_status_disconnected;
        }
 
+       if (drm_probe_ddc(vc4->hdmi->ddc))
+               return connector_status_connected;
+
        if (HDMI_READ(VC4_HDMI_HOTPLUG) & VC4_HDMI_HOTPLUG_CONNECTED)
                return connector_status_connected;
        else