drm/tegra: sor: Trace register accesses

Add tracepoint events for SOR controller register accesses.

Signed-off-by: Thierry Reding <treding@nvidia.com>
This commit is contained in:
Thierry Reding 2017-08-15 15:41:14 +02:00
parent eba7c4551a
commit 932f652913
2 changed files with 14 additions and 1 deletions

View File

@ -26,6 +26,7 @@
#include "dc.h" #include "dc.h"
#include "drm.h" #include "drm.h"
#include "sor.h" #include "sor.h"
#include "trace.h"
#define SOR_REKEY 0x38 #define SOR_REKEY 0x38
@ -234,12 +235,17 @@ static inline struct tegra_sor *to_sor(struct tegra_output *output)
static inline u32 tegra_sor_readl(struct tegra_sor *sor, unsigned int offset) static inline u32 tegra_sor_readl(struct tegra_sor *sor, unsigned int offset)
{ {
return readl(sor->regs + (offset << 2)); u32 value = readl(sor->regs + (offset << 2));
trace_sor_readl(sor->dev, offset, value);
return value;
} }
static inline void tegra_sor_writel(struct tegra_sor *sor, u32 value, static inline void tegra_sor_writel(struct tegra_sor *sor, u32 value,
unsigned int offset) unsigned int offset)
{ {
trace_sor_writel(sor->dev, offset, value);
writel(value, sor->regs + (offset << 2)); writel(value, sor->regs + (offset << 2));
} }

View File

@ -52,6 +52,13 @@ DEFINE_EVENT(register_access, dpaux_readl,
TP_PROTO(struct device *dev, unsigned int offset, u32 value), TP_PROTO(struct device *dev, unsigned int offset, u32 value),
TP_ARGS(dev, offset, value)); TP_ARGS(dev, offset, value));
DEFINE_EVENT(register_access, sor_writel,
TP_PROTO(struct device *dev, unsigned int offset, u32 value),
TP_ARGS(dev, offset, value));
DEFINE_EVENT(register_access, sor_readl,
TP_PROTO(struct device *dev, unsigned int offset, u32 value),
TP_ARGS(dev, offset, value));
#endif /* DRM_TEGRA_TRACE_H */ #endif /* DRM_TEGRA_TRACE_H */
/* This part must be outside protection */ /* This part must be outside protection */