All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: Lukas Wunner <lukas@wunner.de>
Cc: "Deucher, Alexander" <Alexander.Deucher@amd.com>,
	"Limonciello, Mario" <Mario.Limonciello@amd.com>,
	Bjorn Helgaas <bhelgaas@google.com>,
	Andreas Noever <andreas.noever@gmail.com>,
	"open list:PCI SUBSYSTEM" <linux-pci@vger.kernel.org>,
	"open list:THUNDERBOLT DRIVER" <linux-usb@vger.kernel.org>,
	Michael Jamet <michael.jamet@intel.com>,
	Yehezkel Bernat <YehezkelShB@gmail.com>
Subject: Re: [PATCH 0/2] Mark USB4 controllers as is_thunderbolt
Date: Tue, 8 Feb 2022 08:33:18 +0200	[thread overview]
Message-ID: <YgIOro/30ouh27TU@lahna> (raw)
In-Reply-To: <20220207174703.GA25761@wunner.de>

Hi,

On Mon, Feb 07, 2022 at 06:47:03PM +0100, Lukas Wunner wrote:
> On Mon, Feb 07, 2022 at 03:52:13PM +0000, Deucher, Alexander wrote:
> > > From: Mika Westerberg <mika.westerberg@linux.intel.com>
> > > The other option is to look for ACPI companion (ACPI_COMPANION()) of the
> > > device. AFAICT dGPUs don't have one (as the BIOS does not know in advance
> > > what will be connected to the hotplug ports) whereas internal does typically
> > > have one.
> > 
> > Yeah, this is probably the right way to do this.
> 
> No, that doesn't work.  At least Apple represents the first few devices
> in the Thunderbolt daisy-chain in the ACPI namespace, so IIUC you'd find
> an ACPI companion for those but not for the remainder of the daisy-chain.
> This is from a 2019/2020 MacBookPro16,1:
> 
> $ grep 'Device ' acpidump/mbp161/ssdt6.dsl
>             Device (UPSB)
>                 Device (DSB0)
>                     Device (NHI0)
>                 Device (DSB1)
>                     Device (UPS0)
>                         Device (DSB0)
>                             Device (DEV0)
>                         Device (DSB3)
>                             Device (UPS0)
>                                 Device (DSB0)
>                                     Device (DEV0)
>                                 Device (DSB3)
>                                     Device (DEV0)
>             ...
> 
> There's a *reason* why I introduced the is_thunderbolt flag,
> there is no other reliable way to detect externally attached devices.

In case of dGPU, the thing (I think) that is needed is whether there is
some sort of power resource attached to the root port that allows
powering it down or so. That can still be done without is_thunderbolt
flag using the current ACPI functions.

[ IMHO we should get rid of that flag completely, or rename it to some
 more generic like "removable" (following USB, perhaps moving to driver
 core) that allows drivers to check if the device is soldered on the
 motherboard or hanging off of some hotpluggable port. ]

      reply	other threads:[~2022-02-08  6:33 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-04 18:28 [PATCH 0/2] Mark USB4 controllers as is_thunderbolt Mario Limonciello
2022-02-04 18:28 ` [PATCH 1/2] thunderbolt: move definition of PCI_CLASS_SERIAL_USB_USB4 Mario Limonciello
2022-02-04 18:28 ` [PATCH 2/2] pci: mark USB4 devices as "is_thunderbolt" Mario Limonciello
2022-02-04 22:29   ` Bjorn Helgaas
2022-02-05  9:39     ` Lukas Wunner
2022-02-04 18:36 ` [PATCH 0/2] Mark USB4 controllers as is_thunderbolt Deucher, Alexander
2022-02-07  6:41 ` Mika Westerberg
2022-02-07 15:00   ` Deucher, Alexander
2022-02-07 15:45     ` Mika Westerberg
2022-02-07 15:52       ` Deucher, Alexander
2022-02-07 17:47         ` Lukas Wunner
2022-02-08  6:33           ` Mika Westerberg [this message]

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=YgIOro/30ouh27TU@lahna \
    --to=mika.westerberg@linux.intel.com \
    --cc=Alexander.Deucher@amd.com \
    --cc=Mario.Limonciello@amd.com \
    --cc=YehezkelShB@gmail.com \
    --cc=andreas.noever@gmail.com \
    --cc=bhelgaas@google.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=lukas@wunner.de \
    --cc=michael.jamet@intel.com \
    /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.