From fbd31f5aa60259bfa836dccb35159a7e17a60314 Mon Sep 17 00:00:00 2001 From: Dmitry Osipenko Date: Fri, 19 Mar 2021 16:09:33 +0300 Subject: memory: tegra20: Add debug statistics Add debug statistics collection support. The statistics is available via debugfs in '/sys/kernel/debug/mc/stats', it shows percent of memory controller utilization for each memory client. This information is intended to help with debugging of memory performance issues, it already was proven to be useful by helping to improve memory bandwidth management of the display driver. Signed-off-by: Dmitry Osipenko Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210319130933.23261-1-digetx@gmail.com --- include/soc/tegra/mc.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include') diff --git a/include/soc/tegra/mc.h b/include/soc/tegra/mc.h index d731407e23bb..d2fbe6a8b25b 100644 --- a/include/soc/tegra/mc.h +++ b/include/soc/tegra/mc.h @@ -7,6 +7,7 @@ #define __SOC_TEGRA_MC_H__ #include +#include #include #include #include @@ -175,6 +176,8 @@ struct tegra_mc_soc { unsigned int num_resets; const struct tegra_mc_icc_ops *icc_ops; + + int (*init)(struct tegra_mc *mc); }; struct tegra_mc { @@ -196,6 +199,10 @@ struct tegra_mc { struct icc_provider provider; spinlock_t lock; + + struct { + struct dentry *root; + } debugfs; }; int tegra_mc_write_emem_configuration(struct tegra_mc *mc, unsigned long rate); -- cgit v1.2.3