* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: drm/radeon/kms: use hardcoded dig encoder to transmitter mapping for DCE4.1 drm/radeon/kms: fix dp_detect handling for DP bridge chips drm/radeon/kms: retry aux transactions if there are status flags
Unified · Split
| @@ -129,7 +129,9 @@ static int radeon_dp_aux_native_write(struct radeon_connector *radeon_connector, · 128 unmodified lines | ||
| 129 | 129 | for (retry = 0; retry < 4; retry++) { |
| 130 | 130 | ret = radeon_process_aux_ch(dig_connector->dp_i2c_bus, |
| 131 | 131 | msg, msg_bytes, NULL, 0, delay, &ack); |
| 132 | − if (ret < 0) | |
| 132 | + if (ret == -EBUSY) | |
| 133 | + continue; | |
| 134 | + else if (ret < 0) | |
| 133 | 135 | return ret; |
| 134 | 136 | if ((ack & AUX_NATIVE_REPLY_MASK) == AUX_NATIVE_REPLY_ACK) |
| 135 | 137 | return send_bytes; |
| @@ -160,7 +162,9 @@ static int radeon_dp_aux_native_read(struct radeon_connector *radeon_connector, · 24 unmodified lines | ||
| 160 | 162 | for (retry = 0; retry < 4; retry++) { |
| 161 | 163 | ret = radeon_process_aux_ch(dig_connector->dp_i2c_bus, |
| 162 | 164 | msg, msg_bytes, recv, recv_bytes, delay, &ack); |
| 163 | − if (ret < 0) | |
| 165 | + if (ret == -EBUSY) | |
| 166 | + continue; | |
| 167 | + else if (ret < 0) | |
| 164 | 168 | return ret; |
| 165 | 169 | if ((ack & AUX_NATIVE_REPLY_MASK) == AUX_NATIVE_REPLY_ACK) |
| 166 | 170 | return ret; |
| @@ -236,7 +240,9 @@ int radeon_dp_i2c_aux_ch(struct i2c_adapter *adapter, int mode, · 69 unmodified lines | ||
| 236 | 240 | for (retry = 0; retry < 4; retry++) { |
| 237 | 241 | ret = radeon_process_aux_ch(auxch, |
| 238 | 242 | msg, msg_bytes, reply, reply_bytes, 0, &ack); |
| 239 | − if (ret < 0) { | |
| 243 | + if (ret == -EBUSY) | |
| 244 | + continue; | |
| 245 | + else if (ret < 0) { | |
| 240 | 246 | DRM_DEBUG_KMS("aux_ch failed %d\n", ret); |
| 241 | 247 | return ret; |
| 242 | 248 | } |
| @@ -1303,23 +1303,14 @@ radeon_dp_detect(struct drm_connector *connector, bool force) · 1302 unmodified lines | ||
| 1303 | 1303 | /* get the DPCD from the bridge */ |
| 1304 | 1304 | radeon_dp_getdpcd(radeon_connector); |
| 1305 | 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 */ | |
| 1310 | − if (encoder) | |
| 1311 | − radeon_atom_ext_encoder_setup_ddc(encoder); | |
| 1306 | + if (encoder) { | |
| 1307 | + /* setup ddc on the bridge */ | |
| 1308 | + radeon_atom_ext_encoder_setup_ddc(encoder); | |
| 1312 | 1309 | if (radeon_ddc_probe(radeon_connector, |
| 1313 | − radeon_connector->requires_extended_probe)) | |
| 1310 | + radeon_connector->requires_extended_probe)) /* try DDC */ | |
| 1314 | 1311 | 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; | |
| 1312 | + else if (radeon_connector->dac_load_detect) { /* try load detection */ | |
| 1313 | + struct drm_encoder_helper_funcs *encoder_funcs = encoder->helper_private; | |
| 1323 | 1314 | ret = encoder_funcs->detect(encoder, connector); |
| 1324 | 1315 | } |
| 1325 | 1316 | } |
| @@ -1755,9 +1755,12 @@ static int radeon_atom_pick_dig_encoder(struct drm_encoder *encoder) · 1754 unmodified lines | ||
| 1755 | 1755 | /* DCE4/5 */ |
| 1756 | 1756 | if (ASIC_IS_DCE4(rdev)) { |
| 1757 | 1757 | dig = radeon_encoder->enc_priv; |
| 1758 | − if (ASIC_IS_DCE41(rdev)) | |
| 1759 | − return radeon_crtc->crtc_id; | |
| 1760 | − else { | |
| 1758 | + if (ASIC_IS_DCE41(rdev)) { | |
| 1759 | + if (dig->linkb) | |
| 1760 | + return 1; | |
| 1761 | + else | |
| 1762 | + return 0; | |
| 1763 | + } else { | |
| 1761 | 1764 | switch (radeon_encoder->encoder_id) { |
| 1762 | 1765 | case ENCODER_OBJECT_ID_INTERNAL_UNIPHY: |
| 1763 | 1766 | if (dig->linkb) |