From: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com>
To: igt-dev@lists.freedesktop.org
Cc: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org,
Kamil Konieczny <kamil.konieczny@linux.intel.com>,
Andi Shyti <andi.shyti@linux.intel.com>,
Krzysztof Karas <krzysztof.karas@intel.com>,
Krzysztof Niemiec <krzysztof.niemiec@intel.com>,
Sebastian Brzezinka <sebastian.brzezinka@intel.com>,
Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com>
Subject: [PATCH i-g-t v3 0/6] lsgpu: Report upstream port link bandwidth
Date: Wed, 28 Jan 2026 17:08:58 +0100 [thread overview]
Message-ID: <20260128161041.225652-8-janusz.krzysztofik@linux.intel.com> (raw)
Users of Intel discrete graphics adapters are confused with fake
information on PCIe link bandwidth (speed and size) of their GPU devices
reported by tools like lspci or lsgpu. That fake information is
unfortunately provided by hardware, Linux PCI subsystem just exposes it
untouched to upper layers, including userspace via sysfs, and userspace
tools just report those fake values.
While we can't do much about the kernel side or general purpose userspace
tools like lspci, we can try to address the issue with our lsgpu utility.
Correct link bandwidth attributes of a discrete GPU card can be obtained
from the kernel by looking not at the PCI device of the GPU itself, only
at a PCIe upstream port of the card's PCI bridge. For integrity with
content of the sysfs and with output from the other tools, we are not
going to replace the fake information with that from the bridge upstream
port, only show that port and its attributes themselves while listing
devices.
Since the tool uses our udev based igt_device_scan library for identifying
GPU devices and printing their properties and attributes, modifications
that we need apply to that library.
v3: Fix incorrect use of ffs(),
- fix bridge link attribute printing suppressed with DEVTYPE_DISCRETE,
- in commit description, elaborate more on reasons for using libpci.
v2: Keep dump_props_and_attrs() generic: hand over decision on omitting
link attributes to the caller, and implementation of the check to a
helper (Sebastian),
- drop unclear GET_REG_MASK macro (Sebastian),
- reuse no longer needed variable containing PCI_HEADER_TYPE for storing
PCI_EXP_FLAGS_TYPE,
- maintain a single instance of struct pci_access throughout processing
of the whole udev device list (Sebastian),
- hand over detection of AER attributes to a helper,
- merge a formerly separate patch "lib/igt_device_scan: Don't print
bridge not applicable attributes" into "lib/igt_device_scan: Print GPU
upstream port parent/child relations" (Sebastian),
- allocate memory to local attributes of a bridge for safety (Sebastian),
- no need for DEVTYPE_BRIDGE, just skip attributes if NULL.
Janusz Krzysztofik (6):
lib/igt_device_scan: Don't print fake link bandwidth attributes
lib/igt_device_scan: Split out reusable part of update_or_add_parent
lib/igt_device_scan: Include PCIe bridge upstream port if available
lib/igt_device_scan: List PCIe bridge ports after their children
lib/igt_device_scan: Omit AER statistics data from attributes
lib/igt_device_scan: Print GPU upstream port parent/child relations
lib/igt_device_scan.c | 201 +++++++++++++++++++++++++++++++++++-------
lib/meson.build | 2 +
meson.build | 1 +
3 files changed, 172 insertions(+), 32 deletions(-)
--
2.52.0
next reply other threads:[~2026-01-28 16:11 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-28 16:08 Janusz Krzysztofik [this message]
2026-01-28 16:08 ` [PATCH i-g-t v3 1/6] lib/igt_device_scan: Don't print fake link bandwidth attributes Janusz Krzysztofik
2026-02-02 8:45 ` Krzysztof Karas
2026-01-28 16:09 ` [PATCH i-g-t v3 2/6] lib/igt_device_scan: Split out reusable part of update_or_add_parent Janusz Krzysztofik
2026-01-28 16:09 ` [PATCH i-g-t v3 3/6] lib/igt_device_scan: Include PCIe bridge upstream port if available Janusz Krzysztofik
2026-02-02 11:08 ` Krzysztof Karas
2026-01-28 16:09 ` [PATCH i-g-t v3 4/6] lib/igt_device_scan: List PCIe bridge ports after their children Janusz Krzysztofik
2026-01-28 16:09 ` [PATCH i-g-t v3 5/6] lib/igt_device_scan: Omit AER statistics data from attributes Janusz Krzysztofik
2026-01-28 16:09 ` [PATCH i-g-t v3 6/6] lib/igt_device_scan: Print GPU upstream port parent/child relations Janusz Krzysztofik
2026-01-29 11:49 ` Sebastian Brzezinka
2026-01-30 11:09 ` Janusz Krzysztofik
2026-02-02 17:21 ` Janusz Krzysztofik
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=20260128161041.225652-8-janusz.krzysztofik@linux.intel.com \
--to=janusz.krzysztofik@linux.intel.com \
--cc=andi.shyti@linux.intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=kamil.konieczny@linux.intel.com \
--cc=krzysztof.karas@intel.com \
--cc=krzysztof.niemiec@intel.com \
--cc=sebastian.brzezinka@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox