summaryrefslogtreecommitdiff
path: root/include/soc/tegra
diff options
context:
space:
mode:
authorDmitry Osipenko <digetx@gmail.com>2021-03-19 16:09:33 +0300
committerKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com>2021-04-01 19:58:22 +0200
commitfbd31f5aa60259bfa836dccb35159a7e17a60314 (patch)
treea914b310974c61a59edf8f208513dc11c3bb238d /include/soc/tegra
parente47faa54c3a30af87b0b441b3fc0960dba17c9a2 (diff)
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 <digetx@gmail.com> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> Link: https://lore.kernel.org/r/20210319130933.23261-1-digetx@gmail.com
Diffstat (limited to 'include/soc/tegra')
-rw-r--r--include/soc/tegra/mc.h7
1 files changed, 7 insertions, 0 deletions
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 <linux/bits.h>
+#include <linux/debugfs.h>
#include <linux/err.h>
#include <linux/interconnect-provider.h>
#include <linux/reset-controller.h>
@@ -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);