Commit 2b69ffb9 authored by Alex Deucher's avatar Alex Deucher Committed by Dave Airlie

drm/radeon/kms: fix radeon_dp_get_modes for LVDS bridges (v2)

Need to call ExternalEncoderControl to set up DDC before
trying to get an EDID for all DP bridge chips (including
DP to LVDS).

Also remove redundant encoder assignment.

V2: fix typo in commit message.
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent e2bc96ae
...@@ -1117,6 +1117,7 @@ static int radeon_dp_get_modes(struct drm_connector *connector) ...@@ -1117,6 +1117,7 @@ static int radeon_dp_get_modes(struct drm_connector *connector)
(connector->connector_type == DRM_MODE_CONNECTOR_LVDS)) { (connector->connector_type == DRM_MODE_CONNECTOR_LVDS)) {
struct drm_display_mode *mode; struct drm_display_mode *mode;
if (connector->connector_type == DRM_MODE_CONNECTOR_eDP) {
if (!radeon_dig_connector->edp_on) if (!radeon_dig_connector->edp_on)
atombios_set_edp_panel_power(connector, atombios_set_edp_panel_power(connector,
ATOM_TRANSMITTER_ACTION_POWER_ON); ATOM_TRANSMITTER_ACTION_POWER_ON);
...@@ -1124,6 +1125,15 @@ static int radeon_dp_get_modes(struct drm_connector *connector) ...@@ -1124,6 +1125,15 @@ static int radeon_dp_get_modes(struct drm_connector *connector)
if (!radeon_dig_connector->edp_on) if (!radeon_dig_connector->edp_on)
atombios_set_edp_panel_power(connector, atombios_set_edp_panel_power(connector,
ATOM_TRANSMITTER_ACTION_POWER_OFF); ATOM_TRANSMITTER_ACTION_POWER_OFF);
} else {
/* need to setup ddc on the bridge */
if (radeon_connector_encoder_get_dp_bridge_encoder_id(connector) !=
ENCODER_OBJECT_ID_NONE) {
if (encoder)
radeon_atom_ext_encoder_setup_ddc(encoder);
}
ret = radeon_ddc_get_modes(radeon_connector);
}
if (ret > 0) { if (ret > 0) {
if (encoder) { if (encoder) {
...@@ -1134,7 +1144,6 @@ static int radeon_dp_get_modes(struct drm_connector *connector) ...@@ -1134,7 +1144,6 @@ static int radeon_dp_get_modes(struct drm_connector *connector)
return ret; return ret;
} }
encoder = radeon_best_single_encoder(connector);
if (!encoder) if (!encoder)
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment