Skip to contentSkip to conversation

drm/radeon/kms: retry aux transactions if there are status flags

PATCH In review [email protected] 2 participants 2 messages Oct 4, 2011 – Oct 5, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/radeon/kms: retry aux transactions if there are status flags

From: Alex Deucher <[email protected]>

If there are error flags in the aux status, retry the transaction. This makes aux much more reliable, especially on llano systems.

---
 drivers/gpu/drm/radeon/atombios_dp.c |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)
drivers/gpu/drm/radeon/atombios_dp.c +9 -3
index 4da2388..79e8ebc 100644
@@ -129,7 +129,9 @@ static int radeon_dp_aux_native_write(struct radeon_connector *radeon_connector,
 	for (retry = 0; retry < 4; retry++) {
 		ret = radeon_process_aux_ch(dig_connector->dp_i2c_bus,
 					    msg, msg_bytes, NULL, 0, delay, &ack);
-		if (ret < 0)
+		if (ret == -EBUSY)
+			continue;
+		else if (ret < 0)
 			return ret;
 		if ((ack & AUX_NATIVE_REPLY_MASK) == AUX_NATIVE_REPLY_ACK)
 			return send_bytes;
@@ -160,7 +162,9 @@ static int radeon_dp_aux_native_read(struct radeon_connector *radeon_connector,
 	for (retry = 0; retry < 4; retry++) {
 		ret = radeon_process_aux_ch(dig_connector->dp_i2c_bus,
 					    msg, msg_bytes, recv, recv_bytes, delay, &ack);
-		if (ret < 0)
+		if (ret == -EBUSY)
+			continue;
+		else if (ret < 0)
 			return ret;
 		if ((ack & AUX_NATIVE_REPLY_MASK) == AUX_NATIVE_REPLY_ACK)
 			return ret;
@@ -236,7 +240,9 @@ int radeon_dp_i2c_aux_ch(struct i2c_adapter *adapter, int mode,
 	for (retry = 0; retry < 4; retry++) {
 		ret = radeon_process_aux_ch(auxch,
 					    msg, msg_bytes, reply, reply_bytes, 0, &ack);
-		if (ret < 0) {
+		if (ret == -EBUSY)
+			continue;
+		else if (ret < 0) {
 			DRM_DEBUG_KMS("aux_ch failed %d\n", ret);
 			return ret;
 		}
Signature · 1 line
1.7.1.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · On Die, 2011-10-04 at 17:23 -0400, [email protected] wrote:

From: Alex Deucher <[email protected]>

If there are error flags in the aux status, retry the transaction. This makes aux much more reliable, especially on llano systems.

Signature · 6 lines
Earthling Michel Dänzer           |                   http://www.amd.com
Libre software enthusiast         |          Debian, X and DRI developer
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel