diff options
| author | Egbert Eich <eich@suse.de> | 2012-10-24 12:32:52 -0400 |
|---|---|---|
| committer | Alex Deucher <alexander.deucher@amd.com> | 2012-11-01 10:34:31 -0400 |
| commit | fc87f13b8dc73706ae06caf229a336965e9b44a6 (patch) | |
| tree | 0950c367364ed1356a5d32923cbd0530a1e44f8e /drivers/gpu | |
| parent | 9c50b1d937cc9656100ba10d9f57484c6d173936 (diff) | |
DRM/Radeon: On DVI-I use Load Detection when EDID is bogus.
The Radeon driver uses the analog/digital flag to determine if the
DAC or the TMDS encoder should be enabled on a DVI-I connector.
If the EDID is bogus this flag is no longer reliable. This fix
adds a fallback to DAC load detection to determine if anything
is connected to the DAC. If not and a (bogus) EDID is found it
assumes a digital display is connected.
This works around problems with some crappy IPMI devices using
Radeon ES1000.
Signed-off-by: Egbert Eich <eich@suse.de>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu')
| -rw-r--r-- | drivers/gpu/drm/radeon/radeon_connectors.c | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/drivers/gpu/drm/radeon/radeon_connectors.c index 67cfc1795ecd..b884c362a8c2 100644 --- a/drivers/gpu/drm/radeon/radeon_connectors.c +++ b/drivers/gpu/drm/radeon/radeon_connectors.c | |||
| @@ -941,7 +941,7 @@ radeon_dvi_detect(struct drm_connector *connector, bool force) | |||
| 941 | struct drm_mode_object *obj; | 941 | struct drm_mode_object *obj; |
| 942 | int i; | 942 | int i; |
| 943 | enum drm_connector_status ret = connector_status_disconnected; | 943 | enum drm_connector_status ret = connector_status_disconnected; |
| 944 | bool dret = false; | 944 | bool dret = false, broken_edid = false; |
| 945 | 945 | ||
| 946 | if (!force && radeon_check_hpd_status_unchanged(connector)) | 946 | if (!force && radeon_check_hpd_status_unchanged(connector)) |
| 947 | return connector->status; | 947 | return connector->status; |
| @@ -965,6 +965,9 @@ radeon_dvi_detect(struct drm_connector *connector, bool force) | |||
| 965 | ret = connector_status_disconnected; | 965 | ret = connector_status_disconnected; |
| 966 | DRM_ERROR("%s: detected RS690 floating bus bug, stopping ddc detect\n", drm_get_connector_name(connector)); | 966 | DRM_ERROR("%s: detected RS690 floating bus bug, stopping ddc detect\n", drm_get_connector_name(connector)); |
| 967 | radeon_connector->ddc_bus = NULL; | 967 | radeon_connector->ddc_bus = NULL; |
| 968 | } else { | ||
| 969 | ret = connector_status_connected; | ||
| 970 | broken_edid = true; /* defer use_digital to later */ | ||
| 968 | } | 971 | } |
| 969 | } else { | 972 | } else { |
| 970 | radeon_connector->use_digital = !!(radeon_connector->edid->input & DRM_EDID_INPUT_DIGITAL); | 973 | radeon_connector->use_digital = !!(radeon_connector->edid->input & DRM_EDID_INPUT_DIGITAL); |
| @@ -1047,13 +1050,24 @@ radeon_dvi_detect(struct drm_connector *connector, bool force) | |||
| 1047 | 1050 | ||
| 1048 | encoder_funcs = encoder->helper_private; | 1051 | encoder_funcs = encoder->helper_private; |
| 1049 | if (encoder_funcs->detect) { | 1052 | if (encoder_funcs->detect) { |
| 1050 | if (ret != connector_status_connected) { | 1053 | if (!broken_edid) { |
| 1051 | ret = encoder_funcs->detect(encoder, connector); | 1054 | if (ret != connector_status_connected) { |
| 1052 | if (ret == connector_status_connected) { | 1055 | /* deal with analog monitors without DDC */ |
| 1053 | radeon_connector->use_digital = false; | 1056 | ret = encoder_funcs->detect(encoder, connector); |
| 1057 | if (ret == connector_status_connected) { | ||
| 1058 | radeon_connector->use_digital = false; | ||
| 1059 | } | ||
| 1060 | if (ret != connector_status_disconnected) | ||
| 1061 | radeon_connector->detected_by_load = true; | ||
| 1054 | } | 1062 | } |
| 1055 | if (ret != connector_status_disconnected) | 1063 | } else { |
| 1056 | radeon_connector->detected_by_load = true; | 1064 | enum drm_connector_status lret; |
| 1065 | /* assume digital unless load detected otherwise */ | ||
| 1066 | radeon_connector->use_digital = true; | ||
| 1067 | lret = encoder_funcs->detect(encoder, connector); | ||
| 1068 | DRM_DEBUG_KMS("load_detect %x returned: %x\n",encoder->encoder_type,lret); | ||
| 1069 | if (lret == connector_status_connected) | ||
| 1070 | radeon_connector->use_digital = false; | ||
| 1057 | } | 1071 | } |
| 1058 | break; | 1072 | break; |
| 1059 | } | 1073 | } |
