linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: Aaron Rainbolt <arainbolt@kfocus.org>
Cc: YehezkelShB@gmail.com, michael.jamet@intel.com,
	andreas.noever@gmail.com, linux-usb@vger.kernel.org,
	mmikowski@kfocus.org, linux-kernel@vger.kernel.org,
	Gil Fine <gil.fine@linux.intel.com>
Subject: Re: USB-C DisplayPort display failing to stay active with Intel Barlow Ridge USB4 controller, power-management related issue?
Date: Wed, 23 Oct 2024 10:39:31 +0300	[thread overview]
Message-ID: <20241023073931.GH275077@black.fi.intel.com> (raw)
In-Reply-To: <20241023062737.GG275077@black.fi.intel.com>

On Wed, Oct 23, 2024 at 09:27:37AM +0300, Mika Westerberg wrote:
> So at this point we are not in "redrive" mode anymore and the domain is
> allowed to runtime suspend.
> 
> > [  353.611933] thunderbolt 0000:06:00.0: looking for DP IN <-> DP OUT pairs:
> > [  353.612076] thunderbolt 0000:06:00.0: 0:14: DP IN available
> > [  353.612258] thunderbolt 0000:06:00.0: 0:13: DP IN available
> > [  353.612264] thunderbolt 0000:06:00.0: no suitable DP OUT adapter available, not tunneling
> > [  372.362496] thunderbolt 0000:06:00.0: 0: suspending switch
> > [  372.362506] thunderbolt 0000:06:00.0: 0: enabling wakeup: 0x3f
> > [  372.363480] thunderbolt 0000:06:00.0: stopping RX ring 0
> > [  372.363497] thunderbolt 0000:06:00.0: disabling interrupt at register 0x38200 bit 12 (0x1001 -> 0x1)
> > [  372.363523] thunderbolt 0000:06:00.0: stopping TX ring 0
> > [  372.363539] thunderbolt 0000:06:00.0: disabling interrupt at register 0x38200 bit 0 (0x1 -> 0x0)
> > [  372.363558] thunderbolt 0000:06:00.0: control channel stopped
> 
> Which is what happens here.
> 
> I think the driver does the correct thing but why you don't see anything
> in the screen is beyond me. Can reproduce just this case with the patch
> and then run "xrandr" and see if the monitors are visible there?

The other option is that there is no wake when you plugged in the
monitors and it only wakes up when you did this:

> 8. Open a terminal and run 'lspci -k' 
>     - Both displays are activated and remain active.
>     - There is no timeout.
>     - This is desired behavior.

There is one such wake in the dmesg, this:

[   60.126328] thunderbolt 0000:06:00.0: control channel starting...
[   60.126332] thunderbolt 0000:06:00.0: starting TX ring 0
[   60.126337] thunderbolt 0000:06:00.0: enabling interrupt at register 0x38200 bit 0 (0x0 -> 0x1)
[   60.126339] thunderbolt 0000:06:00.0: starting RX ring 0
[   60.126344] thunderbolt 0000:06:00.0: enabling interrupt at register 0x38200 bit 12 (0x1 -> 0x1001)
[   60.126347] thunderbolt 0000:06:00.0: 0: resuming switch
[   60.126348] thunderbolt 0000:06:00.0: restoring Switch at 0x0 (depth: 0, up port: 15)
[   60.128535] thunderbolt 0000:06:00.0: 0: disabling wakeup
[   60.129481] thunderbolt 0000:06:00.0: acking hot plug event on 0:13
[   60.129601] thunderbolt 0000:06:00.0: acking hot plug event on 0:14
[   60.129730] thunderbolt 0000:06:00.0: acking hot plug event on 0:16

but here we get plug event for all the DP IN adapters (13, 14, 16) which
tells me that there is nothing connected to the Type-C ports. Otherwise
it would not send the plug event. This may be due the older firmware.

[   60.137467] thunderbolt 0000:06:00.0: 0: TMU: supports uni-directional mode
[   60.137478] thunderbolt 0000:06:00.0: 0: TMU: supports enhanced uni-directional mode
[   60.137589] thunderbolt 0000:06:00.0: 0: TMU: current mode: off
[   60.137591] thunderbolt 0000:06:00.0: 0: TMU: mode change off -> bi-directional, HiFi requested
[   60.138102] thunderbolt 0000:06:00.0: 0: TMU: mode set to: bi-directional, HiFi
[   60.139778] thunderbolt 0000:06:00.0: 0:13: DP IN resource available after hotplug
[   60.139783] thunderbolt 0000:06:00.0: looking for DP IN <-> DP OUT pairs:
[   60.139895] thunderbolt 0000:06:00.0: 0:13: DP IN available
[   60.139896] thunderbolt 0000:06:00.0: no suitable DP OUT adapter available, not tunneling
[   60.140018] thunderbolt 0000:06:00.0: 0:14: DP IN resource available after hotplug
[   60.140021] thunderbolt 0000:06:00.0: looking for DP IN <-> DP OUT pairs:
[   60.140145] thunderbolt 0000:06:00.0: 0:13: DP IN available
[   60.140277] thunderbolt 0000:06:00.0: 0:14: DP IN available
[   60.140278] thunderbolt 0000:06:00.0: no suitable DP OUT adapter available, not tunneling
[   78.863111] thunderbolt 0000:06:00.0: 0: suspending switch
[   78.863125] thunderbolt 0000:06:00.0: 0: enabling wakeup: 0x3f
[   78.864812] thunderbolt 0000:06:00.0: stopping RX ring 0
[   78.864825] thunderbolt 0000:06:00.0: disabling interrupt at register 0x38200 bit 12 (0x1001 -> 0x1)
[   78.864849] thunderbolt 0000:06:00.0: stopping TX ring 0
[   78.864857] thunderbolt 0000:06:00.0: disabling interrupt at register 0x38200 bit 0 (0x1 -> 0x0)
[   78.864870] thunderbolt 0000:06:00.0: control channel stopped

There is no unplug at all here so the domain can go back to runtime
suspend.

  reply	other threads:[~2024-10-23  7:39 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-10  3:01 USB-C DisplayPort display failing to stay active with Intel Barlow Ridge USB4 controller, power-management related issue? Aaron Rainbolt
2024-10-10  4:49 ` Mika Westerberg
2024-10-11  4:26   ` Aaron Rainbolt
2024-10-11 16:38     ` Mika Westerberg
2024-10-11 18:02       ` Aaron Rainbolt
2024-10-11 23:37       ` Aaron Rainbolt
2024-10-23  6:27         ` Mika Westerberg
2024-10-23  7:39           ` Mika Westerberg [this message]
2024-10-23 22:44             ` Aaron Rainbolt
2024-10-24 15:43               ` Mika Westerberg
2024-10-31 14:55                 ` Aaron Rainbolt
2024-11-01  7:21                   ` Mika Westerberg
2024-11-01 23:13                     ` Aaron Rainbolt
2024-11-04  6:01                       ` Mika Westerberg
2024-11-05 20:16                         ` Aaron Rainbolt
2024-11-06  6:06                           ` Mika Westerberg
2024-11-06 17:01                             ` Aaron Rainbolt
2024-11-07  9:45                               ` Mika Westerberg
2024-11-11  8:22                                 ` Mika Westerberg
2024-11-12 21:44                                   ` Aaron Rainbolt
2024-11-14 11:51                                     ` Mika Westerberg
2024-11-14 16:41                                       ` Aaron Rainbolt
2024-11-15 13:20                                         ` Mika Westerberg
2024-12-12 22:12                                           ` Aaron Rainbolt
2024-12-13 12:03                                             ` Mika Westerberg
2025-01-24 23:05                                           ` Aaron Rainbolt
2025-01-26  5:53                                             ` Mika Westerberg
2025-01-26 16:12                                               ` Gil Fine
2025-01-28  8:29                                                 ` Gil Fine

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=20241023073931.GH275077@black.fi.intel.com \
    --to=mika.westerberg@linux.intel.com \
    --cc=YehezkelShB@gmail.com \
    --cc=andreas.noever@gmail.com \
    --cc=arainbolt@kfocus.org \
    --cc=gil.fine@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=michael.jamet@intel.com \
    --cc=mmikowski@kfocus.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).