[PATCH] drm/amdgpu: Remove pci address checks from acpi_vfct_bios
Kurt Kartaltepe
kkartaltepe at gmail.com
Tue Mar 19 15:04:37 UTC 2024
On Tue, Mar 19, 2024 at 2:54 AM Christian König
<christian.koenig at amd.com> wrote:
>
>
> Well what problems do you run into? The ACPI and BIOS assignments
> usually work much better than whatever the Linux PCI subsystem comes up
> with.
Perhaps its easier to show the lspci output for the BIOS assignment
and we can agree it's far from helpful
+-04.1-[64-c3]----00.0-[65-68]--+-01.0-[66]----00.0-[67]----00.0
Intel Corporation JHL7540 Thunderbolt 3 USB Controller [Titan Ridge
DD 2018]
| +-02.0-[67]--
| \-04.0-[68]--
In this case the bios has assigned the upstream port 65-68, for its 3
downstreams 66,67,68, and then assigned the upstream port of the
device's own bridge to 67.
In this case not only did BIOS produce an invalid topology but it also
does not provide any space at the first upstream or downstream ports
which the current PCI implementation would require to assign bus
numbers if I understand it correctly.
>
> The PCI subsystem in the Linux kernel for example can't handle back to
> back resources behind multiple downstream bridges.
>
> So when the BIOS fails to assign something it's extremely unlikely that
> the Linux kernel will do the right thing either.
I'm not sure this is still the case, the PCI subsystem with realloc
(and assign-busses for x86) deals with enumerating this topology which
reports multiple bridges just fine. The same configuration as above
produces this bus numbering (with hpbussize=20)
+-04.1-[24-66]----00.0-[25-66]--+-01.0-[26-45]----00.0-[27-29]--+-01.0-[28]----00.0
Intel Corporation DG2 [Arc A750]
| |
\-04.0-[29]----00.0 Intel Corporation DG2 Audio Controller
| +-02.0-[46]----00.0 Intel
Corporation JHL7540 Thunderbolt 3 USB Controller [Titan Ridge DD 2018]
| \-04.0-[47-66]--
The Linux kernel doesnt do the right thing without these features, and
these are not the default. So you may be right that by default it does
not recover from the situation of well.
Given the bus allocation at the root port I can imagine a more
aggressive than default but less aggressive than `assign-busses`
reallocation scheme could deal with both preserving root allocations
like the APU and renumbering things behind upstream ports. That might
be a better approach than renumbering even the root bus devices.
>
> Regards,
> Christian.
More information about the amd-gfx
mailing list