aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2011-09-02 10:23:09 -0400
committerDave Airlie <airlied@redhat.com>2011-09-06 06:46:36 -0400
commitb06947b50053f2d21ad8ddf218cdb64fc8026896 (patch)
treebdf1ca814dd80ea35273ef62390a0f2f7d260b4b /drivers/gpu
parentddf28352b80c86754a6424e3a61e8bdf9213b3c7 (diff)
drm/radeon/kms: fix DP detect and EDID fetch for DP bridges
Sink type is always DP for DP bridges and EDID fetch on DP bridges is always i2c over aux rather than plain i2c. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/radeon/radeon_connectors.c37
-rw-r--r--drivers/gpu/drm/radeon/radeon_display.c19
2 files changed, 36 insertions, 20 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/drivers/gpu/drm/radeon/radeon_connectors.c
index 4f0c1ecac72e..c4b8741dbf58 100644
--- a/drivers/gpu/drm/radeon/radeon_connectors.c
+++ b/drivers/gpu/drm/radeon/radeon_connectors.c
@@ -1297,12 +1297,33 @@ radeon_dp_detect(struct drm_connector *connector, bool force)
1297 if (!radeon_dig_connector->edp_on) 1297 if (!radeon_dig_connector->edp_on)
1298 atombios_set_edp_panel_power(connector, 1298 atombios_set_edp_panel_power(connector,
1299 ATOM_TRANSMITTER_ACTION_POWER_OFF); 1299 ATOM_TRANSMITTER_ACTION_POWER_OFF);
1300 } else { 1300 } else if (radeon_connector_encoder_is_dp_bridge(connector)) {
1301 /* need to setup ddc on the bridge */ 1301 /* DP bridges are always DP */
1302 if (radeon_connector_encoder_is_dp_bridge(connector)) { 1302 radeon_dig_connector->dp_sink_type = CONNECTOR_OBJECT_ID_DISPLAYPORT;
1303 /* get the DPCD from the bridge */
1304 radeon_dp_getdpcd(radeon_connector);
1305
1306 if (radeon_hpd_sense(rdev, radeon_connector->hpd.hpd))
1307 ret = connector_status_connected;
1308 else {
1309 /* need to setup ddc on the bridge */
1303 if (encoder) 1310 if (encoder)
1304 radeon_atom_ext_encoder_setup_ddc(encoder); 1311 radeon_atom_ext_encoder_setup_ddc(encoder);
1312 if (radeon_ddc_probe(radeon_connector,
1313 radeon_connector->requires_extended_probe))
1314 ret = connector_status_connected;
1315 }
1316
1317 if ((ret == connector_status_disconnected) &&
1318 radeon_connector->dac_load_detect) {
1319 struct drm_encoder *encoder = radeon_best_single_encoder(connector);
1320 struct drm_encoder_helper_funcs *encoder_funcs;
1321 if (encoder) {
1322 encoder_funcs = encoder->helper_private;
1323 ret = encoder_funcs->detect(encoder, connector);
1324 }
1305 } 1325 }
1326 } else {
1306 radeon_dig_connector->dp_sink_type = radeon_dp_getsinktype(radeon_connector); 1327 radeon_dig_connector->dp_sink_type = radeon_dp_getsinktype(radeon_connector);
1307 if (radeon_hpd_sense(rdev, radeon_connector->hpd.hpd)) { 1328 if (radeon_hpd_sense(rdev, radeon_connector->hpd.hpd)) {
1308 ret = connector_status_connected; 1329 ret = connector_status_connected;
@@ -1318,16 +1339,6 @@ radeon_dp_detect(struct drm_connector *connector, bool force)
1318 ret = connector_status_connected; 1339 ret = connector_status_connected;
1319 } 1340 }
1320 } 1341 }
1321
1322 if ((ret == connector_status_disconnected) &&
1323 radeon_connector->dac_load_detect) {
1324 struct drm_encoder *encoder = radeon_best_single_encoder(connector);
1325 struct drm_encoder_helper_funcs *encoder_funcs;
1326 if (encoder) {
1327 encoder_funcs = encoder->helper_private;
1328 ret = encoder_funcs->detect(encoder, connector);
1329 }
1330 }
1331 } 1342 }
1332 1343
1333 radeon_connector_update_scratch_regs(connector, ret); 1344 radeon_connector_update_scratch_regs(connector, ret);
diff --git a/drivers/gpu/drm/radeon/radeon_display.c b/drivers/gpu/drm/radeon/radeon_display.c
index 1a858944e4f3..6cc17fb96a57 100644
--- a/drivers/gpu/drm/radeon/radeon_display.c
+++ b/drivers/gpu/drm/radeon/radeon_display.c
@@ -707,16 +707,21 @@ int radeon_ddc_get_modes(struct radeon_connector *radeon_connector)
707 radeon_router_select_ddc_port(radeon_connector); 707 radeon_router_select_ddc_port(radeon_connector);
708 708
709 if ((radeon_connector->base.connector_type == DRM_MODE_CONNECTOR_DisplayPort) || 709 if ((radeon_connector->base.connector_type == DRM_MODE_CONNECTOR_DisplayPort) ||
710 (radeon_connector->base.connector_type == DRM_MODE_CONNECTOR_eDP)) { 710 (radeon_connector->base.connector_type == DRM_MODE_CONNECTOR_eDP) ||
711 radeon_connector_encoder_is_dp_bridge(&radeon_connector->base)) {
711 struct radeon_connector_atom_dig *dig = radeon_connector->con_priv; 712 struct radeon_connector_atom_dig *dig = radeon_connector->con_priv;
713
712 if ((dig->dp_sink_type == CONNECTOR_OBJECT_ID_DISPLAYPORT || 714 if ((dig->dp_sink_type == CONNECTOR_OBJECT_ID_DISPLAYPORT ||
713 dig->dp_sink_type == CONNECTOR_OBJECT_ID_eDP) && dig->dp_i2c_bus) 715 dig->dp_sink_type == CONNECTOR_OBJECT_ID_eDP) && dig->dp_i2c_bus)
714 radeon_connector->edid = drm_get_edid(&radeon_connector->base, &dig->dp_i2c_bus->adapter); 716 radeon_connector->edid = drm_get_edid(&radeon_connector->base,
715 } 717 &dig->dp_i2c_bus->adapter);
716 if (!radeon_connector->ddc_bus) 718 else if (radeon_connector->ddc_bus && !radeon_connector->edid)
717 return -1; 719 radeon_connector->edid = drm_get_edid(&radeon_connector->base,
718 if (!radeon_connector->edid) { 720 &radeon_connector->ddc_bus->adapter);
719 radeon_connector->edid = drm_get_edid(&radeon_connector->base, &radeon_connector->ddc_bus->adapter); 721 } else {
722 if (radeon_connector->ddc_bus && !radeon_connector->edid)
723 radeon_connector->edid = drm_get_edid(&radeon_connector->base,
724 &radeon_connector->ddc_bus->adapter);
720 } 725 }
721 726
722 if (!radeon_connector->edid) { 727 if (!radeon_connector->edid) {