All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kurt Kartaltepe <kkartaltepe@gmail.com>
To: "Christian König" <christian.koenig@amd.com>
Cc: Alex Deucher <alexdeucher@gmail.com>, amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/amdgpu: Remove pci address checks from acpi_vfct_bios
Date: Tue, 19 Mar 2024 08:04:37 -0700	[thread overview]
Message-ID: <CACawnnwei18rsUPXcPW8iUBXyKBghoOHSzMMy6ndwi64ovF88g@mail.gmail.com> (raw)
In-Reply-To: <cbc7739a-21c3-4872-bcb0-4fceaf607d32@amd.com>

On Tue, Mar 19, 2024 at 2:54 AM Christian König
<christian.koenig@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.

  reply	other threads:[~2024-03-20 10:49 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-18  6:52 [PATCH] drm/amdgpu: Remove pci address checks from acpi_vfct_bios Kurt Kartaltepe
2024-03-18 13:36 ` Alex Deucher
2024-03-18 14:19   ` Kurt Kartaltepe
2024-03-18 15:42     ` Alex Deucher
2024-03-18 16:06       ` Kurt Kartaltepe
2024-03-18 19:52         ` Alex Deucher
2024-03-18 19:57           ` Alex Deucher
2024-03-19  1:55             ` Kurt Kartaltepe
2024-03-19  9:54               ` Christian König
2024-03-19 15:04                 ` Kurt Kartaltepe [this message]
2024-03-20 13:31                   ` Christian König
2024-03-20 14:24                     ` Kurt Kartaltepe

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=CACawnnwei18rsUPXcPW8iUBXyKBghoOHSzMMy6ndwi64ovF88g@mail.gmail.com \
    --to=kkartaltepe@gmail.com \
    --cc=alexdeucher@gmail.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=christian.koenig@amd.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.