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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
|
/*
* Eventlib interface for PVA
*
* Copyright (c) 2016-2019, NVIDIA Corporation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef NVHOST_EVENTS_H
#define NVHOST_EVENTS_H
enum {
NVHOST_SCHEMA_VERSION = 1
};
#define NVHOST_EVENT_PROVIDER_NAME "nv_mm_nvhost"
/* Marks that the task is submitted to hardware */
struct nvhost_task_submit {
/* Engine class ID */
__u32 class_id;
/* Syncpoint ID */
__u32 syncpt_id;
/* Threshold for task completion */
__u32 syncpt_thresh;
/* PID */
__u32 pid;
/* TID */
__u32 tid;
} __packed;
/* Marks that the task is moving to execution */
struct nvhost_task_begin {
/* Engine class ID */
__u32 class_id;
/* Syncpoint ID */
__u32 syncpt_id;
/* Threshold for task completion */
__u32 syncpt_thresh;
} __packed;
/* Marks that the task is completed */
struct nvhost_task_end {
/* Engine class ID */
__u32 class_id;
/* Syncpoint ID */
__u32 syncpt_id;
/* Threshold for task completion */
__u32 syncpt_thresh;
} __packed;
struct nvhost_vpu_perf_counter {
/* Engine class ID */
__u32 class_id;
/* Syncpoint ID */
__u32 syncpt_id;
/* Threshold for task completion */
__u32 syncpt_thresh;
/* Identifier for the R5/VPU algorithm executed */
__u32 operation;
/* Algorithm specific identifying tag for the perf counter */
__u32 tag;
__u32 count;
__u32 average;
__u64 variance;
__u32 minimum;
__u32 maximum;
} __packed;
/* Marks the pre/postfence associated with the task */
struct nvhost_task_fence {
/* Engine class ID */
__u32 class_id;
/* Kind (prefence or postfence) */
__u32 kind;
/* Fence-specific type (see nvdev_fence.h) */
__u32 fence_type;
/* Valid for NVDEV_FENCE_TYPE_SYNCPT only */
__u32 syncpt_id;
__u32 syncpt_thresh;
/* The task this fence is associated with */
__u32 task_syncpt_id;
__u32 task_syncpt_thresh;
/* Valid for NVDEV_FENCE_TYPE_SYNC_FD only */
__u32 sync_fd;
/* Valid for NVDEV_FENCE_TYPE_SEMAPHORE
and NVDEV_FENCE_TYPE_SEMAPHORE_TS */
__u32 semaphore_handle;
__u32 semaphore_offset;
__u32 semaphore_value;
} __packed;
struct nvhost_pva_task_state {
/* Engine class ID */
__u32 class_id;
/* Syncpoint ID */
__u32 syncpt_id;
/* Threshold for task completion */
__u32 syncpt_thresh;
/* Identifier for the R5/VPU algorithm executed */
__u32 operation;
} __packed;
enum {
/* struct nvhost_task_submit */
NVHOST_TASK_SUBMIT = 0,
/* struct nvhost_task_begin */
NVHOST_TASK_BEGIN = 1,
/* struct nvhost_task_end */
NVHOST_TASK_END = 2,
/* struct nvhost_task_fence */
NVHOST_TASK_FENCE = 3,
NVHOST_VPU_PERF_COUNTER_BEGIN = 4,
NVHOST_VPU_PERF_COUNTER_END = 5,
/* struct nvhost_pva_task_state */
NVHOST_PVA_QUEUE_BEGIN = 6,
NVHOST_PVA_QUEUE_END = 7,
NVHOST_PVA_PREPARE_BEGIN = 8,
NVHOST_PVA_PREPARE_END = 9,
NVHOST_PVA_VPU0_BEGIN = 10,
NVHOST_PVA_VPU0_END = 11,
NVHOST_PVA_VPU1_BEGIN = 12,
NVHOST_PVA_VPU1_END = 13,
NVHOST_PVA_POST_BEGIN = 14,
NVHOST_PVA_POST_END = 15,
NVHOST_NUM_EVENT_TYPES = 16
};
enum {
NVHOST_NUM_CUSTOM_FILTER_FLAGS = 0
};
#endif /* NVHOST_EVENTS_H */
|