drm/radeon/kms: fix shared ddc handling
authorAlex Deucher <alexdeucher@gmail.com>
Thu, 1 Jul 2010 14:34:56 +0000 (10:34 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 2 Aug 2010 17:26:34 +0000 (10:26 -0700)
commit b2ea4aa67bfd084834edd070e0a4a47857d6db59 upstream.

Connectors with a shared ddc line can be connected to different
encoders.

Reported by Pasi Kärkkäinen <pasik@iki.fi> on dri-devel

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/gpu/drm/radeon/radeon_connectors.c

index 2bdfbcd6d0e6e52dd862e175aff409948019e23c..28ffb9d2257392aba13b7b7bd9e3be82b803bd5d 100644 (file)
@@ -793,7 +793,9 @@ static enum drm_connector_status radeon_dvi_detect(struct drm_connector *connect
                                        if (connector == list_connector)
                                                continue;
                                        list_radeon_connector = to_radeon_connector(list_connector);
-                                       if (radeon_connector->devices == list_radeon_connector->devices) {
+                                       if (list_radeon_connector->shared_ddc &&
+                                           (list_radeon_connector->ddc_bus->rec.i2c_id ==
+                                            radeon_connector->ddc_bus->rec.i2c_id)) {
                                                if (drm_detect_hdmi_monitor(radeon_connector->edid)) {
                                                        if (connector->connector_type == DRM_MODE_CONNECTOR_DVID) {
                                                                kfree(radeon_connector->edid);