[PATCH v4 00/10] Overhaul `is_thunderbolt`
Limonciello, Mario
mario.limonciello at amd.com
Tue Feb 15 19:07:00 UTC 2022
On 2/15/2022 01:29, Lukas Wunner wrote:
> On Mon, Feb 14, 2022 at 06:01:50PM -0600, Mario Limonciello wrote:
>> drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 2 +-
>> drivers/gpu/drm/amd/amdgpu/nbio_v2_3.c | 2 +-
>> drivers/gpu/drm/nouveau/nouveau_vga.c | 4 +-
>> drivers/gpu/drm/radeon/radeon_device.c | 4 +-
>> drivers/gpu/drm/radeon/radeon_kms.c | 2 +-
>> drivers/pci/hotplug/pciehp_hpc.c | 6 +-
>> drivers/pci/pci-acpi.c | 15 ++++-
>> drivers/pci/pci.c | 17 +++--
>> drivers/pci/probe.c | 52 ++++++++++++++-
>> drivers/pci/quirks.c | 84 +++++++++++++++++++++++++
>> drivers/platform/x86/apple-gmux.c | 2 +-
>> drivers/thunderbolt/nhi.h | 2 -
>> include/linux/pci.h | 25 +-------
>> include/linux/pci_ids.h | 3 +
>> 14 files changed, 173 insertions(+), 47 deletions(-)
>
> That's an awful lot of additional LoC for what is primarily
> a refactoring job with the intent to simplify things.
You may recall the first version of this series was just for adding
USB4 matches to the existing code paths, and that's when it was noted
that is_thunderbolt is a bit overloaded.
>
> Honestly this looks like an attempt to fix something that
> isn't broken. Specifically, the is_thunderbolt bit apparently
> can't be removed without adding new bits to struct pci_dev.
> Not sure if that can be called progress. >
> Thanks,
>
> Lukas
Within this series there are two new material patches; setting up root
ports for both integrated and discrete USB4 controllers to behave well
with all the existing drivers that rely upon a hint of how they're
connected to configure devices differently.
If y'all collectively prefer this direction to not refactor
is_thunderbolt and push into quirks, a simpler version of this series
would be to leave all the quirks in place, just drop
dev->is_thunderbolt, and set dev->external_facing on all 3 cases:
* Intel TBT controller
* USB4 integrated PCIe tunneling root port/XHCI tunneling root port
* USB4 disctete PCIe tunneling root port/XHCI tunneling root port
All the other drivers and symbols can stay the same then.
More information about the dri-devel
mailing list