aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-10-09 22:43:06 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-10-09 22:43:06 -0400
commit84c861161404658c866835bf9ca07eb487added8 (patch)
tree2f2dcf8f3bb9001284b696462613868aa091caf4
parent746fb63c54d2659e1da3c5e90a77ccb23a309cc5 (diff)
parentcb7cf41961fe10773c491c75ae73539ad4bbed66 (diff)
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
* '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
-rw-r--r--drivers/gpu/drm/radeon/atombios_dp.c12
-rw-r--r--drivers/gpu/drm/radeon/radeon_connectors.c21
-rw-r--r--drivers/gpu/drm/radeon/radeon_encoders.c9
3 files changed, 21 insertions, 21 deletions
diff --git a/drivers/gpu/drm/radeon/atombios_dp.c b/drivers/gpu/drm/radeon/atombios_dp.c
index 4da23889fea6..79e8ebc05307 100644
--- a/drivers/gpu/drm/radeon/atombios_dp.c
+++ b/drivers/gpu/drm/radeon/atombios_dp.c
@@ -129,7 +129,9 @@ static int radeon_dp_aux_native_write(struct radeon_connector *radeon_connector,
129 for (retry = 0; retry < 4; retry++) { 129 for (retry = 0; retry < 4; retry++) {
130 ret = radeon_process_aux_ch(dig_connector->dp_i2c_bus, 130 ret = radeon_process_aux_ch(dig_connector->dp_i2c_bus,
131 msg, msg_bytes, NULL, 0, delay, &ack); 131 msg, msg_bytes, NULL, 0, delay, &ack);
132 if (ret < 0) 132 if (ret == -EBUSY)
133 continue;
134 else if (ret < 0)
133 return ret; 135 return ret;
134 if ((ack & AUX_NATIVE_REPLY_MASK) == AUX_NATIVE_REPLY_ACK) 136 if ((ack & AUX_NATIVE_REPLY_MASK) == AUX_NATIVE_REPLY_ACK)
135 return send_bytes; 137 return send_bytes;
@@ -160,7 +162,9 @@ static int radeon_dp_aux_native_read(struct radeon_connector *radeon_connector,
160 for (retry = 0; retry < 4; retry++) { 162 for (retry = 0; retry < 4; retry++) {
161 ret = radeon_process_aux_ch(dig_connector->dp_i2c_bus, 163 ret = radeon_process_aux_ch(dig_connector->dp_i2c_bus,
162 msg, msg_bytes, recv, recv_bytes, delay, &ack); 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 return ret; 168 return ret;
165 if ((ack & AUX_NATIVE_REPLY_MASK) == AUX_NATIVE_REPLY_ACK) 169 if ((ack & AUX_NATIVE_REPLY_MASK) == AUX_NATIVE_REPLY_ACK)
166 return ret; 170 return ret;
@@ -236,7 +240,9 @@ int radeon_dp_i2c_aux_ch(struct i2c_adapter *adapter, int mode,
236 for (retry = 0; retry < 4; retry++) { 240 for (retry = 0; retry < 4; retry++) {
237 ret = radeon_process_aux_ch(auxch, 241 ret = radeon_process_aux_ch(auxch,
238 msg, msg_bytes, reply, reply_bytes, 0, &ack); 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 DRM_DEBUG_KMS("aux_ch failed %d\n", ret); 246 DRM_DEBUG_KMS("aux_ch failed %d\n", ret);
241 return ret; 247 return ret;
242 } 248 }
diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/drivers/gpu/drm/radeon/radeon_connectors.c
index bce63fd329d4..449c3d8c6836 100644
--- a/drivers/gpu/drm/radeon/radeon_connectors.c
+++ b/drivers/gpu/drm/radeon/radeon_connectors.c
@@ -1303,23 +1303,14 @@ radeon_dp_detect(struct drm_connector *connector, bool force)
1303 /* get the DPCD from the bridge */ 1303 /* get the DPCD from the bridge */
1304 radeon_dp_getdpcd(radeon_connector); 1304 radeon_dp_getdpcd(radeon_connector);
1305 1305
1306 if (radeon_hpd_sense(rdev, radeon_connector->hpd.hpd)) 1306 if (encoder) {
1307 ret = connector_status_connected; 1307 /* setup ddc on the bridge */
1308 else { 1308 radeon_atom_ext_encoder_setup_ddc(encoder);
1309 /* need to setup ddc on the bridge */
1310 if (encoder)
1311 radeon_atom_ext_encoder_setup_ddc(encoder);
1312 if (radeon_ddc_probe(radeon_connector, 1309 if (radeon_ddc_probe(radeon_connector,
1313 radeon_connector->requires_extended_probe)) 1310 radeon_connector->requires_extended_probe)) /* try DDC */
1314 ret = connector_status_connected; 1311 ret = connector_status_connected;
1315 } 1312 else if (radeon_connector->dac_load_detect) { /* try load detection */
1316 1313 struct drm_encoder_helper_funcs *encoder_funcs = encoder->helper_private;
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); 1314 ret = encoder_funcs->detect(encoder, connector);
1324 } 1315 }
1325 } 1316 }
diff --git a/drivers/gpu/drm/radeon/radeon_encoders.c b/drivers/gpu/drm/radeon/radeon_encoders.c
index 13690f3eb4a4..8a171b21b453 100644
--- a/drivers/gpu/drm/radeon/radeon_encoders.c
+++ b/drivers/gpu/drm/radeon/radeon_encoders.c
@@ -1755,9 +1755,12 @@ static int radeon_atom_pick_dig_encoder(struct drm_encoder *encoder)
1755 /* DCE4/5 */ 1755 /* DCE4/5 */
1756 if (ASIC_IS_DCE4(rdev)) { 1756 if (ASIC_IS_DCE4(rdev)) {
1757 dig = radeon_encoder->enc_priv; 1757 dig = radeon_encoder->enc_priv;
1758 if (ASIC_IS_DCE41(rdev)) 1758 if (ASIC_IS_DCE41(rdev)) {
1759 return radeon_crtc->crtc_id; 1759 if (dig->linkb)
1760 else { 1760 return 1;
1761 else
1762 return 0;
1763 } else {
1761 switch (radeon_encoder->encoder_id) { 1764 switch (radeon_encoder->encoder_id) {
1762 case ENCODER_OBJECT_ID_INTERNAL_UNIPHY: 1765 case ENCODER_OBJECT_ID_INTERNAL_UNIPHY:
1763 if (dig->linkb) 1766 if (dig->linkb)