summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/tegra/trace.h
blob: 5a1ab4046e926fefe4cb6d73d2c3ebe031eb45bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#undef TRACE_SYSTEM
#define TRACE_SYSTEM tegra

#if !defined(DRM_TEGRA_TRACE_H) || defined(TRACE_HEADER_MULTI_READ)
#define DRM_TEGRA_TRACE_H 1

#include <linux/device.h>
#include <linux/tracepoint.h>

DECLARE_EVENT_CLASS(register_access,
	TP_PROTO(struct device *dev, unsigned int offset, u32 value),
	TP_ARGS(dev, offset, value),
	TP_STRUCT__entry(
		__field(struct device *, dev)
		__field(unsigned int, offset)
		__field(u32, value)
	),
	TP_fast_assign(
		__entry->dev = dev;
		__entry->offset = offset;
		__entry->value = value;
	),
	TP_printk("%s %04x %08x", dev_name(__entry->dev), __entry->offset,
		  __entry->value)
);

DEFINE_EVENT(register_access, dc_writel,
	TP_PROTO(struct device *dev, unsigned int offset, u32 value),
	TP_ARGS(dev, offset, value));
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));

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));

DEFINE_EVENT(register_access, dpaux_writel,
	TP_PROTO(struct device *dev, unsigned int offset, u32 value),
	TP_ARGS(dev, offset, value));
DEFINE_EVENT(register_access, dpaux_readl,
	TP_PROTO(struct device *dev, unsigned int offset, u32 value),
	TP_ARGS(dev, offset, value));

DEFINE_EVENT(register_access, sor_writel,
	TP_PROTO(struct device *dev, unsigned int offset, u32 value),
	TP_ARGS(dev, offset, value));
DEFINE_EVENT(register_access, sor_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 */
#undef TRACE_INCLUDE_PATH
#define TRACE_INCLUDE_PATH ../../drivers/gpu/drm/tegra
#define TRACE_INCLUDE_FILE trace
#include <trace/define_trace.h>
OpenPOWER on IntegriCloud