summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAniruddha Rao <anrao@nvidia.com>2026-09-29 09:59:15 +0000
committerThierry Reding <treding@nvidia.com>2026-10-02 09:49:49 +0200
commit514a33dde445ebc25fe69bb24218c7119a7befeb (patch)
tree1f12e6c719d6b78de406630b4005840546ed1a10 /include
parent7432bd82f69e54cfeb6fb83538dc418c67915b31 (diff)
downloadlinux-next-514a33dde445ebc25fe69bb24218c7119a7befeb.tar.gz
linux-next-514a33dde445ebc25fe69bb24218c7119a7befeb.zip
firmware: tegra: bpmp: Add MBWT sysfs interface
Different workloads can place different memory-bandwidth demands on the system. Selecting an appropriate bandwidth limit depends on the runtime workload mix and on the devices carrying that traffic, such as PCIe traffic or GPU traffic connected over the chip-to-chip link (NVCLINK). That information is not available to the kernel. BPMP firmware of some Tegra platforms provides Memory Bandwidth Throttler (MBWT) controls for PCIe and GPU traffic connected over NVCLINK on the path to DRAM. Each PCIe bandwidth group has a single shared cap for all traffic in that group. Bandwidth for a group can be set per traffic type. Describe the available bandwidth groups and traffic types in platform data. Each entry maps a sysfs name to the corresponding firmware instance and VC type so that these values can vary between platforms. Add sysfs attributes on the tegra-bpmp platform device to expose a narrow userspace interface for MBWT control. The attributes are arranged as mbwt/<bandwidth-group>/<traffic-type>/bandwidth. The directory names come from platform data. The current platform description uses pcie0 through pcie5 for bandwidth groups and pcie_read, pcie_write and nvclink for traffic types. Reading a bandwidth attribute queries firmware for the selected bandwidth group and traffic type. Writing an integer programs the target bandwidth cap in GB/s for that bandwidth group and traffic type. Register the attributes only when BPMP firmware reports support for the MBWT GET_BW and SET_BW requests through its query ABI. Signed-off-by: Aniruddha Rao <anrao@nvidia.com> [treding@nvidia.com: minor stylistic changes] Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'include')
-rw-r--r--include/soc/tegra/bpmp.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/soc/tegra/bpmp.h b/include/soc/tegra/bpmp.h
index a33582590a3b..f55db918ccb1 100644
--- a/include/soc/tegra/bpmp.h
+++ b/include/soc/tegra/bpmp.h
@@ -16,6 +16,7 @@
#include <soc/tegra/bpmp-abi.h>
struct tegra_bpmp_clk;
+struct tegra_bpmp_mbwt_soc;
struct tegra_bpmp_ops;
struct tegra_bpmp_soc {
@@ -28,6 +29,7 @@ struct tegra_bpmp_soc {
} channels;
const struct tegra_bpmp_ops *ops;
+ const struct tegra_bpmp_mbwt_soc *mbwt;
unsigned int num_resets;
};