aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2017-08-15 09:41:11 -0400
committerThierry Reding <treding@nvidia.com>2017-08-17 11:57:15 -0400
commit07a8aab89927ee58100b9a0d121dafacbcc3a5dd (patch)
treed026cf81dd8345088bb300cc4504f75e43e43ffc
parent67e04d1ab19b0cc6d87ca7c44b058edf678bc3a3 (diff)
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.c8
-rw-r--r--drivers/gpu/drm/tegra/trace.h7
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 @@
24#include "hdmi.h" 24#include "hdmi.h"
25#include "drm.h" 25#include "drm.h"
26#include "dc.h" 26#include "dc.h"
27#include "trace.h"
27 28
28#define HDMI_ELD_BUFFER_SIZE 96 29#define HDMI_ELD_BUFFER_SIZE 96
29 30
@@ -102,12 +103,17 @@ enum {
102static inline u32 tegra_hdmi_readl(struct tegra_hdmi *hdmi, 103static inline u32 tegra_hdmi_readl(struct tegra_hdmi *hdmi,
103 unsigned int offset) 104 unsigned int offset)
104{ 105{
105 return readl(hdmi->regs + (offset << 2)); 106 u32 value = readl(hdmi->regs + (offset << 2));
107
108 trace_hdmi_readl(hdmi->dev, offset, value);
109
110 return value;
106} 111}
107 112
108static inline void tegra_hdmi_writel(struct tegra_hdmi *hdmi, u32 value, 113static inline void tegra_hdmi_writel(struct tegra_hdmi *hdmi, u32 value,
109 unsigned int offset) 114 unsigned int offset)
110{ 115{
116 trace_hdmi_writel(hdmi->dev, offset, value);
111 writel(value, hdmi->regs + (offset << 2)); 117 writel(value, hdmi->regs + (offset << 2));
112} 118}
113 119
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,
31 TP_PROTO(struct device *dev, unsigned int offset, u32 value), 31 TP_PROTO(struct device *dev, unsigned int offset, u32 value),
32 TP_ARGS(dev, offset, value)); 32 TP_ARGS(dev, offset, value));
33 33
34DEFINE_EVENT(register_access, hdmi_writel,
35 TP_PROTO(struct device *dev, unsigned int offset, u32 value),
36 TP_ARGS(dev, offset, value));
37DEFINE_EVENT(register_access, hdmi_readl,
38 TP_PROTO(struct device *dev, unsigned int offset, u32 value),
39 TP_ARGS(dev, offset, value));
40
34#endif /* DRM_TEGRA_TRACE_H */ 41#endif /* DRM_TEGRA_TRACE_H */
35 42
36/* This part must be outside protection */ 43/* This part must be outside protection */