1 /* SPDX-License-Identifier: GPL-2.0 OR MIT */
2 /* Copyright 2020 Qiang Yu <yuq825@gmail.com> */
4 #if !defined(_LIMA_TRACE_H) || defined(TRACE_HEADER_MULTI_READ)
7 #include <linux/tracepoint.h>
10 #define TRACE_SYSTEM lima
11 #define TRACE_INCLUDE_FILE lima_trace
13 DECLARE_EVENT_CLASS(lima_task
,
14 TP_PROTO(struct lima_sched_task
*task
),
17 __field(uint64_t, task_id
)
18 __field(unsigned int, context
)
19 __field(unsigned int, seqno
)
20 __string(pipe
, task
->base
.sched
->name
)
24 __entry
->task_id
= task
->base
.id
;
25 __entry
->context
= task
->base
.s_fence
->finished
.context
;
26 __entry
->seqno
= task
->base
.s_fence
->finished
.seqno
;
27 __assign_str(pipe
, task
->base
.sched
->name
)
30 TP_printk("task=%llu, context=%u seqno=%u pipe=%s",
31 __entry
->task_id
, __entry
->context
, __entry
->seqno
,
35 DEFINE_EVENT(lima_task
, lima_task_submit
,
36 TP_PROTO(struct lima_sched_task
*task
),
40 DEFINE_EVENT(lima_task
, lima_task_run
,
41 TP_PROTO(struct lima_sched_task
*task
),
47 /* This part must be outside protection */
48 #undef TRACE_INCLUDE_PATH
49 #define TRACE_INCLUDE_PATH ../../drivers/gpu/drm/lima
50 #include <trace/define_trace.h>