diff options
author | Thierry Reding <treding@nvidia.com> | 2017-08-15 15:41:11 +0200 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2017-08-17 17:57:15 +0200 |
commit | 07a8aab89927ee58100b9a0d121dafacbcc3a5dd (patch) | |
tree | d026cf81dd8345088bb300cc4504f75e43e43ffc | |
parent | 67e04d1ab19b0cc6d87ca7c44b058edf678bc3a3 (diff) | |
download | linux-07a8aab89927ee58100b9a0d121dafacbcc3a5dd.tar.bz2 |
drm/tegra: hdmi: Trace register accesses
Add tracepoint events for HDMI controller register accesses.
Signed-off-by: Thierry Reding <treding@nvidia.com>
-rw-r--r-- | drivers/gpu/drm/tegra/hdmi.c | 8 | ||||
-rw-r--r-- | drivers/gpu/drm/tegra/trace.h | 7 |
2 files changed, 14 insertions, 1 deletions
diff --git a/drivers/gpu/drm/tegra/hdmi.c b/drivers/gpu/drm/tegra/hdmi.c index 9161adaf94c1..cf9f69fc12e6 100644 --- a/drivers/gpu/drm/tegra/hdmi.c +++ b/drivers/gpu/drm/tegra/hdmi.c @@ -24,6 +24,7 @@ #include "hdmi.h" #include "drm.h" #include "dc.h" +#include "trace.h" #define HDMI_ELD_BUFFER_SIZE 96 @@ -102,12 +103,17 @@ enum { static inline u32 tegra_hdmi_readl(struct tegra_hdmi *hdmi, unsigned int offset) { - return readl(hdmi->regs + (offset << 2)); + u32 value = readl(hdmi->regs + (offset << 2)); + + trace_hdmi_readl(hdmi->dev, offset, value); + + return value; } static inline void tegra_hdmi_writel(struct tegra_hdmi *hdmi, u32 value, unsigned int offset) { + trace_hdmi_writel(hdmi->dev, offset, value); writel(value, hdmi->regs + (offset << 2)); } diff --git a/drivers/gpu/drm/tegra/trace.h b/drivers/gpu/drm/tegra/trace.h index b32d90c967e8..e5c2e431c101 100644 --- a/drivers/gpu/drm/tegra/trace.h +++ b/drivers/gpu/drm/tegra/trace.h @@ -31,6 +31,13 @@ DEFINE_EVENT(register_access, dc_readl, TP_PROTO(struct device *dev, unsigned int offset, u32 value), TP_ARGS(dev, offset, value)); +DEFINE_EVENT(register_access, hdmi_writel, + TP_PROTO(struct device *dev, unsigned int offset, u32 value), + TP_ARGS(dev, offset, value)); +DEFINE_EVENT(register_access, hdmi_readl, + TP_PROTO(struct device *dev, unsigned int offset, u32 value), + TP_ARGS(dev, offset, value)); + #endif /* DRM_TEGRA_TRACE_H */ /* This part must be outside protection */ |