Commit 932f6529 authored by Thierry Reding's avatar Thierry Reding

drm/tegra: sor: Trace register accesses

Add tracepoint events for SOR controller register accesses.
Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
parent eba7c455
...@@ -26,6 +26,7 @@ ...@@ -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) ...@@ -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));
} }
......
...@@ -52,6 +52,13 @@ DEFINE_EVENT(register_access, dpaux_readl, ...@@ -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 */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment