diff options
author | Alex Deucher <alexdeucher@gmail.com> | 2010-07-20 11:27:54 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-07-20 18:37:25 -0400 |
commit | 42f14c4b454946650cf0bf66e0b631d02e328f61 (patch) | |
tree | 0f51eeb9dd3df2ebb19c4aa985fc1762c3d30b6d /drivers | |
parent | 944001201ca0196bcdb088129e5866a9f379d08c (diff) |
drm/radeon/kms: fix shared ddc harder
This fixes a regression caused by b2ea4aa67bfd084834edd070e0a4a47857d6db59
due to the way shared ddc with multiple digital connectors was handled.
You generally have two cases where DDC lines are shared:
- HDMI + VGA
- HDMI + DVI-D
HDMI + VGA is easy to deal with because you can check the EDID for the
to see if the attached monitor is digital. A shared DDC line with two
digital connectors is more complex. You can't use the hdmi bits in the
EDID since they may not be there with DVI<->HDMI adapters. In this case
all we can do is check the HPD pins to see which is connected as we have
no way of knowing using the EDID.
Reported-by: trapdoor6@gmail.com
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_connectors.c | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/drivers/gpu/drm/radeon/radeon_connectors.c index f58f8bd8f77b..adccbc2c202c 100644 --- a/drivers/gpu/drm/radeon/radeon_connectors.c +++ b/drivers/gpu/drm/radeon/radeon_connectors.c | |||
@@ -771,14 +771,14 @@ static enum drm_connector_status radeon_dvi_detect(struct drm_connector *connect | |||
771 | } else | 771 | } else |
772 | ret = connector_status_connected; | 772 | ret = connector_status_connected; |
773 | 773 | ||
774 | /* multiple connectors on the same encoder with the same ddc line | 774 | /* This gets complicated. We have boards with VGA + HDMI with a |
775 | * This tends to be HDMI and DVI on the same encoder with the | 775 | * shared DDC line and we have boards with DVI-D + HDMI with a shared |
776 | * same ddc line. If the edid says HDMI, consider the HDMI port | 776 | * DDC line. The latter is more complex because with DVI<->HDMI adapters |
777 | * connected and the DVI port disconnected. If the edid doesn't | 777 | * you don't really know what's connected to which port as both are digital. |
778 | * say HDMI, vice versa. | ||
779 | */ | 778 | */ |
780 | if (radeon_connector->shared_ddc && (ret == connector_status_connected)) { | 779 | if (radeon_connector->shared_ddc && (ret == connector_status_connected)) { |
781 | struct drm_device *dev = connector->dev; | 780 | struct drm_device *dev = connector->dev; |
781 | struct radeon_device *rdev = dev->dev_private; | ||
782 | struct drm_connector *list_connector; | 782 | struct drm_connector *list_connector; |
783 | struct radeon_connector *list_radeon_connector; | 783 | struct radeon_connector *list_radeon_connector; |
784 | list_for_each_entry(list_connector, &dev->mode_config.connector_list, head) { | 784 | list_for_each_entry(list_connector, &dev->mode_config.connector_list, head) { |
@@ -788,15 +788,10 @@ static enum drm_connector_status radeon_dvi_detect(struct drm_connector *connect | |||
788 | if (list_radeon_connector->shared_ddc && | 788 | if (list_radeon_connector->shared_ddc && |
789 | (list_radeon_connector->ddc_bus->rec.i2c_id == | 789 | (list_radeon_connector->ddc_bus->rec.i2c_id == |
790 | radeon_connector->ddc_bus->rec.i2c_id)) { | 790 | radeon_connector->ddc_bus->rec.i2c_id)) { |
791 | if (drm_detect_hdmi_monitor(radeon_connector->edid)) { | 791 | /* cases where both connectors are digital */ |
792 | if (connector->connector_type == DRM_MODE_CONNECTOR_DVID) { | 792 | if (list_connector->connector_type != DRM_MODE_CONNECTOR_VGA) { |
793 | kfree(radeon_connector->edid); | 793 | /* hpd is our only option in this case */ |
794 | radeon_connector->edid = NULL; | 794 | if (!radeon_hpd_sense(rdev, radeon_connector->hpd.hpd)) { |
795 | ret = connector_status_disconnected; | ||
796 | } | ||
797 | } else { | ||
798 | if ((connector->connector_type == DRM_MODE_CONNECTOR_HDMIA) || | ||
799 | (connector->connector_type == DRM_MODE_CONNECTOR_HDMIB)) { | ||
800 | kfree(radeon_connector->edid); | 795 | kfree(radeon_connector->edid); |
801 | radeon_connector->edid = NULL; | 796 | radeon_connector->edid = NULL; |
802 | ret = connector_status_disconnected; | 797 | ret = connector_status_disconnected; |