xref: /openbmc/linux/drivers/gpu/drm/tegra/trace.h (revision 3213486f)
1 #undef TRACE_SYSTEM
2 #define TRACE_SYSTEM tegra
3 
4 #if !defined(DRM_TEGRA_TRACE_H) || defined(TRACE_HEADER_MULTI_READ)
5 #define DRM_TEGRA_TRACE_H 1
6 
7 #include <linux/device.h>
8 #include <linux/tracepoint.h>
9 
10 DECLARE_EVENT_CLASS(register_access,
11 	TP_PROTO(struct device *dev, unsigned int offset, u32 value),
12 	TP_ARGS(dev, offset, value),
13 	TP_STRUCT__entry(
14 		__field(struct device *, dev)
15 		__field(unsigned int, offset)
16 		__field(u32, value)
17 	),
18 	TP_fast_assign(
19 		__entry->dev = dev;
20 		__entry->offset = offset;
21 		__entry->value = value;
22 	),
23 	TP_printk("%s %04x %08x", dev_name(__entry->dev), __entry->offset,
24 		  __entry->value)
25 );
26 
27 DEFINE_EVENT(register_access, dc_writel,
28 	TP_PROTO(struct device *dev, unsigned int offset, u32 value),
29 	TP_ARGS(dev, offset, value));
30 DEFINE_EVENT(register_access, dc_readl,
31 	TP_PROTO(struct device *dev, unsigned int offset, u32 value),
32 	TP_ARGS(dev, offset, value));
33 
34 DEFINE_EVENT(register_access, hdmi_writel,
35 	TP_PROTO(struct device *dev, unsigned int offset, u32 value),
36 	TP_ARGS(dev, offset, value));
37 DEFINE_EVENT(register_access, hdmi_readl,
38 	TP_PROTO(struct device *dev, unsigned int offset, u32 value),
39 	TP_ARGS(dev, offset, value));
40 
41 DEFINE_EVENT(register_access, dsi_writel,
42 	TP_PROTO(struct device *dev, unsigned int offset, u32 value),
43 	TP_ARGS(dev, offset, value));
44 DEFINE_EVENT(register_access, dsi_readl,
45 	TP_PROTO(struct device *dev, unsigned int offset, u32 value),
46 	TP_ARGS(dev, offset, value));
47 
48 DEFINE_EVENT(register_access, dpaux_writel,
49 	TP_PROTO(struct device *dev, unsigned int offset, u32 value),
50 	TP_ARGS(dev, offset, value));
51 DEFINE_EVENT(register_access, dpaux_readl,
52 	TP_PROTO(struct device *dev, unsigned int offset, u32 value),
53 	TP_ARGS(dev, offset, value));
54 
55 DEFINE_EVENT(register_access, sor_writel,
56 	TP_PROTO(struct device *dev, unsigned int offset, u32 value),
57 	TP_ARGS(dev, offset, value));
58 DEFINE_EVENT(register_access, sor_readl,
59 	TP_PROTO(struct device *dev, unsigned int offset, u32 value),
60 	TP_ARGS(dev, offset, value));
61 
62 #endif /* DRM_TEGRA_TRACE_H */
63 
64 /* This part must be outside protection */
65 #undef TRACE_INCLUDE_PATH
66 #define TRACE_INCLUDE_PATH ../../drivers/gpu/drm/tegra
67 #define TRACE_INCLUDE_FILE trace
68 #include <trace/define_trace.h>
69