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

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

index 444664b92fbb5ff9d6144c74a49cbf4f14e01321..6050cc4ebbaf694396dd4ae64f1de11367658e35 100644 (file)
@@ -28,6 +28,7 @@
 #include "drm.h"
 #include "dsi.h"
 #include "mipi-phy.h"
+#include "trace.h"
 
 struct tegra_dsi_state {
        struct drm_connector_state base;
@@ -107,12 +108,17 @@ static struct tegra_dsi_state *tegra_dsi_get_state(struct tegra_dsi *dsi)
 
 static inline u32 tegra_dsi_readl(struct tegra_dsi *dsi, unsigned int offset)
 {
-       return readl(dsi->regs + (offset << 2));
+       u32 value = readl(dsi->regs + (offset << 2));
+
+       trace_dsi_readl(dsi->dev, offset, value);
+
+       return value;
 }
 
 static inline void tegra_dsi_writel(struct tegra_dsi *dsi, u32 value,
                                    unsigned int offset)
 {
+       trace_dsi_writel(dsi->dev, offset, value);
        writel(value, dsi->regs + (offset << 2));
 }
 
index e5c2e431c101344c954f8cb19a5d12b0921f21bc..dd0176ff81ebc707e55823b68fe698754d24803b 100644 (file)
@@ -38,6 +38,13 @@ DEFINE_EVENT(register_access, hdmi_readl,
        TP_PROTO(struct device *dev, unsigned int offset, u32 value),
        TP_ARGS(dev, offset, value));
 
+DEFINE_EVENT(register_access, dsi_writel,
+       TP_PROTO(struct device *dev, unsigned int offset, u32 value),
+       TP_ARGS(dev, offset, value));
+DEFINE_EVENT(register_access, dsi_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 */