aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/radeon_connectors.c
diff options
context:
space:
mode:
authorAlex Deucher <alexdeucher@gmail.com>2009-11-17 15:44:01 -0500
committerDave Airlie <airlied@redhat.com>2009-12-01 20:36:44 -0500
commit71407c46fecb82c542b6209f021d38a2901969a3 (patch)
tree0778f39726588869f0f3efc021970b175565478e /drivers/gpu/drm/radeon/radeon_connectors.c
parent3e5f8ff3a9f4e7a71c5371b2122b32faf31c563a (diff)
drm/radeon/kms: deal with connectors sourced to the same encoder
Some systems have multiple connectors connected to the same encoder; e.g., DVI and HDMI connected to the same encoder with the same ddc line. Since we expose connectors as xrandr outputs, randr treats them separately which results in it trying to source the same encoder to different crtcs. If we have an HDMI and DVI-D port on the same encoder, pick the one to be considered connected based on the edid (HDMI if edid indicates HDMI, DVI otherwise). Should fix fdo bug 25150 Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_connectors.c')
-rw-r--r--drivers/gpu/drm/radeon/radeon_connectors.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/drivers/gpu/drm/radeon/radeon_connectors.c
index 93f6a970b51..ec2f3ffc42c 100644
--- a/drivers/gpu/drm/radeon/radeon_connectors.c
+++ b/drivers/gpu/drm/radeon/radeon_connectors.c
@@ -735,6 +735,39 @@ static enum drm_connector_status radeon_dvi_detect(struct drm_connector *connect
735 ret = connector_status_disconnected; 735 ret = connector_status_disconnected;
736 } else 736 } else
737 ret = connector_status_connected; 737 ret = connector_status_connected;
738
739 /* multiple connectors on the same encoder with the same ddc line
740 * This tends to be HDMI and DVI on the same encoder with the
741 * same ddc line. If the edid says HDMI, consider the HDMI port
742 * connected and the DVI port disconnected. If the edid doesn't
743 * say HDMI, vice versa.
744 */
745 if (radeon_connector->shared_ddc && connector_status_connected) {
746 struct drm_device *dev = connector->dev;
747 struct drm_connector *list_connector;
748 struct radeon_connector *list_radeon_connector;
749 list_for_each_entry(list_connector, &dev->mode_config.connector_list, head) {
750 if (connector == list_connector)
751 continue;
752 list_radeon_connector = to_radeon_connector(list_connector);
753 if (radeon_connector->devices == list_radeon_connector->devices) {
754 if (drm_detect_hdmi_monitor(radeon_connector->edid)) {
755 if (connector->connector_type == DRM_MODE_CONNECTOR_DVID) {
756 kfree(radeon_connector->edid);
757 radeon_connector->edid = NULL;
758 ret = connector_status_disconnected;
759 }
760 } else {
761 if ((connector->connector_type == DRM_MODE_CONNECTOR_HDMIA) ||
762 (connector->connector_type == DRM_MODE_CONNECTOR_HDMIB)) {
763 kfree(radeon_connector->edid);
764 radeon_connector->edid = NULL;
765 ret = connector_status_disconnected;
766 }
767 }
768 }
769 }
770 }
738 } 771 }
739 } 772 }
740 773