Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
Jesse Barnes | ac2874b | 2010-07-01 16:47:31 -0700 | [diff] [blame] | 2 | #if !defined(_DRM_TRACE_H_) || defined(TRACE_HEADER_MULTI_READ) |
| 3 | #define _DRM_TRACE_H_ |
| 4 | |
| 5 | #include <linux/stringify.h> |
| 6 | #include <linux/types.h> |
| 7 | #include <linux/tracepoint.h> |
| 8 | |
| 9 | #undef TRACE_SYSTEM |
| 10 | #define TRACE_SYSTEM drm |
Jesse Barnes | ac2874b | 2010-07-01 16:47:31 -0700 | [diff] [blame] | 11 | #define TRACE_INCLUDE_FILE drm_trace |
| 12 | |
| 13 | TRACE_EVENT(drm_vblank_event, |
Jesse Barnes | b9c2c9a | 2010-07-01 16:48:09 -0700 | [diff] [blame] | 14 | TP_PROTO(int crtc, unsigned int seq), |
| 15 | TP_ARGS(crtc, seq), |
| 16 | TP_STRUCT__entry( |
| 17 | __field(int, crtc) |
| 18 | __field(unsigned int, seq) |
| 19 | ), |
| 20 | TP_fast_assign( |
| 21 | __entry->crtc = crtc; |
| 22 | __entry->seq = seq; |
| 23 | ), |
Seung-Woo Kim | 04274cd | 2013-07-01 19:44:14 +0900 | [diff] [blame] | 24 | TP_printk("crtc=%d, seq=%u", __entry->crtc, __entry->seq) |
Jesse Barnes | b9c2c9a | 2010-07-01 16:48:09 -0700 | [diff] [blame] | 25 | ); |
Jesse Barnes | ac2874b | 2010-07-01 16:47:31 -0700 | [diff] [blame] | 26 | |
Jesse Barnes | b9c2c9a | 2010-07-01 16:48:09 -0700 | [diff] [blame] | 27 | TRACE_EVENT(drm_vblank_event_queued, |
Daniel Vetter | 7d52cb8 | 2017-03-08 15:12:43 +0100 | [diff] [blame] | 28 | TP_PROTO(struct drm_file *file, int crtc, unsigned int seq), |
| 29 | TP_ARGS(file, crtc, seq), |
Jesse Barnes | b9c2c9a | 2010-07-01 16:48:09 -0700 | [diff] [blame] | 30 | TP_STRUCT__entry( |
Daniel Vetter | 7d52cb8 | 2017-03-08 15:12:43 +0100 | [diff] [blame] | 31 | __field(struct drm_file *, file) |
Jesse Barnes | b9c2c9a | 2010-07-01 16:48:09 -0700 | [diff] [blame] | 32 | __field(int, crtc) |
| 33 | __field(unsigned int, seq) |
| 34 | ), |
| 35 | TP_fast_assign( |
Daniel Vetter | 7d52cb8 | 2017-03-08 15:12:43 +0100 | [diff] [blame] | 36 | __entry->file = file; |
Jesse Barnes | b9c2c9a | 2010-07-01 16:48:09 -0700 | [diff] [blame] | 37 | __entry->crtc = crtc; |
| 38 | __entry->seq = seq; |
| 39 | ), |
Daniel Vetter | 7d52cb8 | 2017-03-08 15:12:43 +0100 | [diff] [blame] | 40 | TP_printk("file=%p, crtc=%d, seq=%u", __entry->file, __entry->crtc, \ |
Jesse Barnes | b9c2c9a | 2010-07-01 16:48:09 -0700 | [diff] [blame] | 41 | __entry->seq) |
| 42 | ); |
Jesse Barnes | ac2874b | 2010-07-01 16:47:31 -0700 | [diff] [blame] | 43 | |
Jesse Barnes | b9c2c9a | 2010-07-01 16:48:09 -0700 | [diff] [blame] | 44 | TRACE_EVENT(drm_vblank_event_delivered, |
Daniel Vetter | 7d52cb8 | 2017-03-08 15:12:43 +0100 | [diff] [blame] | 45 | TP_PROTO(struct drm_file *file, int crtc, unsigned int seq), |
| 46 | TP_ARGS(file, crtc, seq), |
Jesse Barnes | b9c2c9a | 2010-07-01 16:48:09 -0700 | [diff] [blame] | 47 | TP_STRUCT__entry( |
Daniel Vetter | 7d52cb8 | 2017-03-08 15:12:43 +0100 | [diff] [blame] | 48 | __field(struct drm_file *, file) |
Jesse Barnes | b9c2c9a | 2010-07-01 16:48:09 -0700 | [diff] [blame] | 49 | __field(int, crtc) |
| 50 | __field(unsigned int, seq) |
| 51 | ), |
| 52 | TP_fast_assign( |
Daniel Vetter | 7d52cb8 | 2017-03-08 15:12:43 +0100 | [diff] [blame] | 53 | __entry->file = file; |
Jesse Barnes | b9c2c9a | 2010-07-01 16:48:09 -0700 | [diff] [blame] | 54 | __entry->crtc = crtc; |
| 55 | __entry->seq = seq; |
| 56 | ), |
Daniel Vetter | 7d52cb8 | 2017-03-08 15:12:43 +0100 | [diff] [blame] | 57 | TP_printk("file=%p, crtc=%d, seq=%u", __entry->file, __entry->crtc, \ |
Jesse Barnes | b9c2c9a | 2010-07-01 16:48:09 -0700 | [diff] [blame] | 58 | __entry->seq) |
Jesse Barnes | ac2874b | 2010-07-01 16:47:31 -0700 | [diff] [blame] | 59 | ); |
| 60 | |
| 61 | #endif /* _DRM_TRACE_H_ */ |
| 62 | |
| 63 | /* This part must be outside protection */ |
| 64 | #undef TRACE_INCLUDE_PATH |
Thierry Reding | d99ce55 | 2017-09-01 16:49:49 +0200 | [diff] [blame] | 65 | #define TRACE_INCLUDE_PATH ../../drivers/gpu/drm |
Jesse Barnes | ac2874b | 2010-07-01 16:47:31 -0700 | [diff] [blame] | 66 | #include <trace/define_trace.h> |