drm/tegra: hdmi: Trace register accesses
authorThierry Reding <treding@nvidia.com>
Tue, 15 Aug 2017 13:41:11 +0000 (15:41 +0200)
committerThierry Reding <treding@nvidia.com>
Thu, 17 Aug 2017 15:57:15 +0000 (17:57 +0200)
Add tracepoint events for HDMI controller register accesses.

Signed-off-by: Thierry Reding <treding@nvidia.com>
drivers/gpu/drm/tegra/hdmi.c
drivers/gpu/drm/tegra/trace.h

index 9161adaf94c1837d56518fed4c64d56d8fa13ba4..cf9f69fc12e6557c147a58fbeffad91da1f028b7 100644 (file)
@@ -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));
 }
 
index b32d90c967e8aee80fc2dc5db77617cfe37d5da2..e5c2e431c101344c954f8cb19a5d12b0921f21bc 100644 (file)
@@ -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 */