[Bug 41121] Apple Thunderbolt display is not initialized when plugged into iMac 12,2 (Radeon 6870)
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Thu Sep 29 03:46:09 PDT 2011
https://bugs.freedesktop.org/show_bug.cgi?id=41121
--- Comment #7 from Brad Campbell <brad at fnarfbargle.com> 2011-09-29 03:46:09 PDT ---
Further bisection reveals this commit broke it :
Commit 834b2904bbfde3d85b5e984688777d56e9c7bf80
Author: Alex Deucher <alexdeucher at gmail.com>
Date: Fri May 20 04:34:24 2011 -0400
drm/radeon/kms: improve aux error handling
Signed-off-by: Alex Deucher <alexdeucher at gmail.com>
Signed-off-by: Dave Airlie <airlied at redhat.com>
Hacking the aux retries back in fixes it
diff --git a/drivers/gpu/drm/radeon/atombios_dp.c
b/drivers/gpu/drm/radeon/atombios_dp.c
index 7ad43c6..1a44aa9 100644
--- a/drivers/gpu/drm/radeon/atombios_dp.c
+++ b/drivers/gpu/drm/radeon/atombios_dp.c
@@ -60,11 +60,11 @@ static int radeon_process_aux_ch(struct radeon_i2c_chan
*chan,
int index = GetIndexIntoMasterTable(COMMAND,
ProcessAuxChannelTransaction);
unsigned char *base;
int recv_bytes;
-
+ int retry_count = 0;
memset(&args, 0, sizeof(args));
base = (unsigned char *)rdev->mode_info.atom_context->scratch;
-
+retry:
memcpy(base, send, send_bytes);
args.v1.lpAuxRequest = 0;
@@ -77,8 +77,17 @@ static int radeon_process_aux_ch(struct radeon_i2c_chan
*chan,
atom_execute_table(rdev->mode_info.atom_context, index, (uint32_t
*)&args);
- *ack = args.v1.ucReplyStatus;
+ if (args.v1.ucReplyStatus && !args.v1.ucDataOutLen) {
+ if (args.v1.ucReplyStatus == 0x20 && retry_count++ < 10){
+ printk("doing retry : %i\n",retry_count);
+ goto retry;}
+ DRM_DEBUG_KMS("failed to get auxch %02x%02x %02x %02x 0x%02x %02x after
%d retries\n",
+ send[1], send[0], send[2], send[3],
+ chan->rec.i2c_id, args.v1.ucReplyStatus, retry_count);
+ return false;
+ }
+ *ack = args.v1.ucReplyStatus;
/* timeout */
if (args.v1.ucReplyStatus == 1) {
DRM_DEBUG_KMS("dp_aux_ch timeout\n");
@@ -128,6 +137,7 @@ static int radeon_dp_aux_native_write(struct
radeon_connector *radeon_connector,
while (1) {
ret = radeon_process_aux_ch(dig_connector->dp_i2c_bus,
msg, msg_bytes, NULL, 0, delay,
&ack);
+ printk("aux_native_write : ret : %i\n",ret);
if (ret < 0)
return ret;
if ((ack & AUX_NATIVE_REPLY_MASK) == AUX_NATIVE_REPLY_ACK)
@@ -158,6 +168,8 @@ static int radeon_dp_aux_native_read(struct
radeon_connector *radeon_connector,
while (1) {
ret = radeon_process_aux_ch(dig_connector->dp_i2c_bus,
msg, msg_bytes, recv, recv_bytes,
delay, &ack);
+
+ printk("aux_native_read : ret : %i\n",ret);
if (ret == 0)
return -EPROTO;
if (ret < 0)
Quite a few retries sprinkled through the log, so it appears it is required on
some links.
[ 16.365260] ADDRCONF(NETDEV_UP): eth2: link is not ready
[ 17.393646] aux_native_read : ret : 8
[ 17.592073] aux_native_read : ret : 0
[ 17.604003] aux_native_read : ret : 0
[ 17.612451] doing retry : 1
[ 17.612689] aux_native_read : ret : 8
[ 17.743642] aux_native_read : ret : 0
[ 17.751633] aux_native_read : ret : 0
[ 18.572898] tg3 0000:02:00.0: eth1: Link is up at 1000 Mbps, full duplex
[ 18.572902] tg3 0000:02:00.0: eth1: Flow control is on for TX and on for RX
[ 18.572905] tg3 0000:02:00.0: eth1: EEE is disabled
[ 18.573642] ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
[ 19.078061] NET: Registered protocol family 17
[ 19.116439] aux_native_read : ret : 8
[ 19.299182] aux_native_read : ret : 0
[ 19.307137] aux_native_read : ret : 0
[ 19.315577] doing retry : 1
[ 19.315815] aux_native_read : ret : 8
[ 19.430797] aux_native_read : ret : 0
[ 19.438793] aux_native_read : ret : 0
[ 19.463489] aux_native_read : ret : 8
[ 19.646190] aux_native_read : ret : 0
[ 19.654164] aux_native_read : ret : 0
[ 19.662574] doing retry : 1
[ 19.662823] aux_native_read : ret : 8
[ 19.781789] aux_native_read : ret : 0
[ 19.789763] aux_native_read : ret : 0
--
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the dri-devel
mailing list