1 #if !defined(_I915_TRACE_H_) || defined(TRACE_HEADER_MULTI_READ)
4 #include <linux/stringify.h>
5 #include <linux/types.h>
6 #include <linux/tracepoint.h>
11 #define TRACE_SYSTEM i915
12 #define TRACE_SYSTEM_STRING __stringify(TRACE_SYSTEM)
13 #define TRACE_INCLUDE_FILE i915_trace
17 TRACE_EVENT(i915_gem_object_create
,
19 TP_PROTO(struct drm_gem_object
*obj
),
24 __field(struct drm_gem_object
*, obj
)
30 __entry
->size
= obj
->size
;
33 TP_printk("obj=%p, size=%u", __entry
->obj
, __entry
->size
)
36 TRACE_EVENT(i915_gem_object_bind
,
38 TP_PROTO(struct drm_gem_object
*obj
, u32 gtt_offset
),
40 TP_ARGS(obj
, gtt_offset
),
43 __field(struct drm_gem_object
*, obj
)
44 __field(u32
, gtt_offset
)
49 __entry
->gtt_offset
= gtt_offset
;
52 TP_printk("obj=%p, gtt_offset=%08x",
53 __entry
->obj
, __entry
->gtt_offset
)
56 TRACE_EVENT(i915_gem_object_clflush
,
58 TP_PROTO(struct drm_gem_object
*obj
),
63 __field(struct drm_gem_object
*, obj
)
70 TP_printk("obj=%p", __entry
->obj
)
73 TRACE_EVENT(i915_gem_object_change_domain
,
75 TP_PROTO(struct drm_gem_object
*obj
, uint32_t old_read_domains
, uint32_t old_write_domain
),
77 TP_ARGS(obj
, old_read_domains
, old_write_domain
),
80 __field(struct drm_gem_object
*, obj
)
81 __field(u32
, read_domains
)
82 __field(u32
, write_domain
)
87 __entry
->read_domains
= obj
->read_domains
| (old_read_domains
<< 16);
88 __entry
->write_domain
= obj
->write_domain
| (old_write_domain
<< 16);
91 TP_printk("obj=%p, read=%04x, write=%04x",
93 __entry
->read_domains
, __entry
->write_domain
)
96 TRACE_EVENT(i915_gem_object_get_fence
,
98 TP_PROTO(struct drm_gem_object
*obj
, int fence
, int tiling_mode
),
100 TP_ARGS(obj
, fence
, tiling_mode
),
103 __field(struct drm_gem_object
*, obj
)
105 __field(int, tiling_mode
)
110 __entry
->fence
= fence
;
111 __entry
->tiling_mode
= tiling_mode
;
114 TP_printk("obj=%p, fence=%d, tiling=%d",
115 __entry
->obj
, __entry
->fence
, __entry
->tiling_mode
)
118 TRACE_EVENT(i915_gem_object_unbind
,
120 TP_PROTO(struct drm_gem_object
*obj
),
125 __field(struct drm_gem_object
*, obj
)
132 TP_printk("obj=%p", __entry
->obj
)
135 TRACE_EVENT(i915_gem_object_destroy
,
137 TP_PROTO(struct drm_gem_object
*obj
),
142 __field(struct drm_gem_object
*, obj
)
149 TP_printk("obj=%p", __entry
->obj
)
154 TRACE_EVENT(i915_gem_request_submit
,
156 TP_PROTO(struct drm_device
*dev
, u32 seqno
),
161 __field(struct drm_device
*, dev
)
167 __entry
->seqno
= seqno
;
170 TP_printk("dev=%p, seqno=%u", __entry
->dev
, __entry
->seqno
)
173 TRACE_EVENT(i915_gem_request_flush
,
175 TP_PROTO(struct drm_device
*dev
, u32 seqno
,
176 u32 flush_domains
, u32 invalidate_domains
),
178 TP_ARGS(dev
, seqno
, flush_domains
, invalidate_domains
),
181 __field(struct drm_device
*, dev
)
183 __field(u32
, flush_domains
)
184 __field(u32
, invalidate_domains
)
189 __entry
->seqno
= seqno
;
190 __entry
->flush_domains
= flush_domains
;
191 __entry
->invalidate_domains
= invalidate_domains
;
194 TP_printk("dev=%p, seqno=%u, flush=%04x, invalidate=%04x",
195 __entry
->dev
, __entry
->seqno
,
196 __entry
->flush_domains
, __entry
->invalidate_domains
)
200 TRACE_EVENT(i915_gem_request_complete
,
202 TP_PROTO(struct drm_device
*dev
, u32 seqno
),
207 __field(struct drm_device
*, dev
)
213 __entry
->seqno
= seqno
;
216 TP_printk("dev=%p, seqno=%u", __entry
->dev
, __entry
->seqno
)
219 TRACE_EVENT(i915_gem_request_retire
,
221 TP_PROTO(struct drm_device
*dev
, u32 seqno
),
226 __field(struct drm_device
*, dev
)
232 __entry
->seqno
= seqno
;
235 TP_printk("dev=%p, seqno=%u", __entry
->dev
, __entry
->seqno
)
238 TRACE_EVENT(i915_gem_request_wait_begin
,
240 TP_PROTO(struct drm_device
*dev
, u32 seqno
),
245 __field(struct drm_device
*, dev
)
251 __entry
->seqno
= seqno
;
254 TP_printk("dev=%p, seqno=%u", __entry
->dev
, __entry
->seqno
)
257 TRACE_EVENT(i915_gem_request_wait_end
,
259 TP_PROTO(struct drm_device
*dev
, u32 seqno
),
264 __field(struct drm_device
*, dev
)
270 __entry
->seqno
= seqno
;
273 TP_printk("dev=%p, seqno=%u", __entry
->dev
, __entry
->seqno
)
276 TRACE_EVENT(i915_ring_wait_begin
,
278 TP_PROTO(struct drm_device
*dev
),
283 __field(struct drm_device
*, dev
)
290 TP_printk("dev=%p", __entry
->dev
)
293 TRACE_EVENT(i915_ring_wait_end
,
295 TP_PROTO(struct drm_device
*dev
),
300 __field(struct drm_device
*, dev
)
307 TP_printk("dev=%p", __entry
->dev
)
310 #endif /* _I915_TRACE_H_ */
312 /* This part must be outside protection */
313 #undef TRACE_INCLUDE_PATH
314 #define TRACE_INCLUDE_PATH ../../drivers/gpu/drm/i915
315 #include <trace/define_trace.h>