blob: 14c5a777682e54b236e257e85c9f5699ea62e12d [file] [log] [blame]
Jesse Barnesac2874b2010-07-01 16:47:31 -07001#if !defined(_DRM_TRACE_H_) || defined(TRACE_HEADER_MULTI_READ)
2#define _DRM_TRACE_H_
3
4#include <linux/stringify.h>
5#include <linux/types.h>
6#include <linux/tracepoint.h>
7
8#undef TRACE_SYSTEM
9#define TRACE_SYSTEM drm
Jesse Barnesac2874b2010-07-01 16:47:31 -070010#define TRACE_INCLUDE_FILE drm_trace
11
12TRACE_EVENT(drm_vblank_event,
Jesse Barnesb9c2c9a2010-07-01 16:48:09 -070013 TP_PROTO(int crtc, unsigned int seq),
14 TP_ARGS(crtc, seq),
15 TP_STRUCT__entry(
16 __field(int, crtc)
17 __field(unsigned int, seq)
18 ),
19 TP_fast_assign(
20 __entry->crtc = crtc;
21 __entry->seq = seq;
22 ),
Seung-Woo Kim04274cd2013-07-01 19:44:14 +090023 TP_printk("crtc=%d, seq=%u", __entry->crtc, __entry->seq)
Jesse Barnesb9c2c9a2010-07-01 16:48:09 -070024);
Jesse Barnesac2874b2010-07-01 16:47:31 -070025
Jesse Barnesb9c2c9a2010-07-01 16:48:09 -070026TRACE_EVENT(drm_vblank_event_queued,
Daniel Vetter7d52cb82017-03-08 15:12:43 +010027 TP_PROTO(struct drm_file *file, int crtc, unsigned int seq),
28 TP_ARGS(file, crtc, seq),
Jesse Barnesb9c2c9a2010-07-01 16:48:09 -070029 TP_STRUCT__entry(
Daniel Vetter7d52cb82017-03-08 15:12:43 +010030 __field(struct drm_file *, file)
Jesse Barnesb9c2c9a2010-07-01 16:48:09 -070031 __field(int, crtc)
32 __field(unsigned int, seq)
33 ),
34 TP_fast_assign(
Daniel Vetter7d52cb82017-03-08 15:12:43 +010035 __entry->file = file;
Jesse Barnesb9c2c9a2010-07-01 16:48:09 -070036 __entry->crtc = crtc;
37 __entry->seq = seq;
38 ),
Daniel Vetter7d52cb82017-03-08 15:12:43 +010039 TP_printk("file=%p, crtc=%d, seq=%u", __entry->file, __entry->crtc, \
Jesse Barnesb9c2c9a2010-07-01 16:48:09 -070040 __entry->seq)
41);
Jesse Barnesac2874b2010-07-01 16:47:31 -070042
Jesse Barnesb9c2c9a2010-07-01 16:48:09 -070043TRACE_EVENT(drm_vblank_event_delivered,
Daniel Vetter7d52cb82017-03-08 15:12:43 +010044 TP_PROTO(struct drm_file *file, int crtc, unsigned int seq),
45 TP_ARGS(file, crtc, seq),
Jesse Barnesb9c2c9a2010-07-01 16:48:09 -070046 TP_STRUCT__entry(
Daniel Vetter7d52cb82017-03-08 15:12:43 +010047 __field(struct drm_file *, file)
Jesse Barnesb9c2c9a2010-07-01 16:48:09 -070048 __field(int, crtc)
49 __field(unsigned int, seq)
50 ),
51 TP_fast_assign(
Daniel Vetter7d52cb82017-03-08 15:12:43 +010052 __entry->file = file;
Jesse Barnesb9c2c9a2010-07-01 16:48:09 -070053 __entry->crtc = crtc;
54 __entry->seq = seq;
55 ),
Daniel Vetter7d52cb82017-03-08 15:12:43 +010056 TP_printk("file=%p, crtc=%d, seq=%u", __entry->file, __entry->crtc, \
Jesse Barnesb9c2c9a2010-07-01 16:48:09 -070057 __entry->seq)
Jesse Barnesac2874b2010-07-01 16:47:31 -070058);
59
60#endif /* _DRM_TRACE_H_ */
61
62/* This part must be outside protection */
63#undef TRACE_INCLUDE_PATH
64#define TRACE_INCLUDE_PATH .
65#include <trace/define_trace.h>