All of lore.kernel.org
 help / color / mirror / Atom feed
From: bugzilla-daemon@freedesktop.org
To: dri-devel@lists.freedesktop.org
Subject: [Bug 41121] Apple Thunderbolt display is not initialized when plugged into iMac 12,2 (Radeon 6870)
Date: Thu, 29 Sep 2011 03:46:09 -0700 (PDT)	[thread overview]
Message-ID: <20110929104609.E9B63130092@annarchy.freedesktop.org> (raw)
In-Reply-To: <bug-41121-502@http.bugs.freedesktop.org/>

https://bugs.freedesktop.org/show_bug.cgi?id=41121

--- Comment #7 from Brad Campbell <brad@fnarfbargle.com> 2011-09-29 03:46:09 PDT ---
Further bisection reveals this commit broke it :

Commit 834b2904bbfde3d85b5e984688777d56e9c7bf80
Author: Alex Deucher <alexdeucher@gmail.com>
Date:   Fri May 20 04:34:24 2011 -0400

    drm/radeon/kms: improve aux error handling

    Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
    Signed-off-by: Dave Airlie <airlied@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.

  parent reply	other threads:[~2011-09-29 10:46 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-22 14:40 [Bug 41121] New: Apple Thunderbolt display is not initialized when plugged into iMac 12,2 (Radeon 6870) bugzilla-daemon
2011-09-22 14:40 ` [Bug 41121] " bugzilla-daemon
2011-09-22 14:41 ` bugzilla-daemon
2011-09-22 14:41 ` bugzilla-daemon
2011-09-22 14:43 ` bugzilla-daemon
2011-09-22 14:43 ` bugzilla-daemon
2011-09-22 15:28 ` bugzilla-daemon
2011-09-22 15:28 ` bugzilla-daemon
2011-09-22 15:28 ` bugzilla-daemon
2011-09-22 15:28 ` bugzilla-daemon
2011-09-22 15:29 ` bugzilla-daemon
2011-09-28  7:39 ` bugzilla-daemon
2011-09-29 10:46 ` bugzilla-daemon [this message]
2011-09-29 15:01 ` bugzilla-daemon
2011-10-05  4:57 ` bugzilla-daemon
2011-10-06 12:53 ` bugzilla-daemon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110929104609.E9B63130092@annarchy.freedesktop.org \
    --to=bugzilla-daemon@freedesktop.org \
    --cc=dri-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.