Commit 704a746
NVIDIA: VR: SAUCE: tegra: bpmp: Add sysfs for memory bandwidth QoS
BugLink: https://bugs.launchpad.net/bugs/2147212
Tegra410 exposes memory bandwidth QoS for PCIe and GPU UPHY traffic on the
path to DRAM. Each bandwidth group can cap PCIe read, PCIe write, or
combined GPU UPHY read and write traffic, with target limits.
The memory bandwidth QoS is not exposed as ordinary host MMIO and
cannot be controlled from the kernel. The bandwidth limits can be programmed
by sending the corresponding requests (MBWT MRQ) to the BPMP.
On Tegra410, an ACPI-based platform, Linux BPMP driver does not use the
device-tree mailbox path for communicating with the BPMP firmware.
As a result, there is no existing client driver or interface that can be
used to send the memory bandwidth requests to the BPMP.
This patch exposes a sysfs directory mbwt_control on the tegra-bpmp platform
device with pcie_instance_id, vc_type, and bandwidth.
Writing bandwidth issues an MBWT_SET for the selected group (pcie_instance_id)
and traffic class (vc_type).
A read issues MBWT_GET and returns the bandwidth value reported by firmware.
These attributes are exposed only if MBWT QUERY probe reports both
MBWT_SET and MBWT_GET commands as supported.
ABI documented in Documentation/ABI/testing/sys-platform-tegra-bpmp
Signed-off-by: Aniruddha Rao <anrao@nvidia.com>
(backported from V4 internal mail <20260423140823.2848045-4-anrao@nvidia.com>)
[kobak: Keep functional MRQ_SOCHUB_MBWT ABI definitions and sysfs
interface from V4; condense verbose per-field ABI comments while
preserving enum/struct layout and Documentation/ABI coverage; use
refcounted kobject allocation for mbwt_control; validate
pcie_instance_id/vc_type before staging; return only the bandwidth
value from bandwidth reads; report BPMP SET rejections to userspace;
fail BPMP probe on mbwt_control sysfs registration failure so 7.0-bos
does not silently boot without the requested MBWT interface.]
Signed-off-by: Koba Ko <kobak@nvidia.com>
Acked-by: Carol L Soto <csoto@nvidia.com>
Acked-by: Matthew R. Ochs <mochs@nvidia.com>
Signed-off-by: Brad Figg <bfigg@nvidia.com>1 parent 285736f commit 704a746
6 files changed
Lines changed: 479 additions & 1 deletion
File tree
- Documentation/ABI/testing
- drivers/firmware/tegra
- include/soc/tegra
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
0 commit comments