diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/trace/events/gk20a.h | 47 | ||||
-rw-r--r-- | include/uapi/linux/nvgpu.h | 14 |
2 files changed, 44 insertions, 17 deletions
diff --git a/include/trace/events/gk20a.h b/include/trace/events/gk20a.h index fc5cb872..ba71dda2 100644 --- a/include/trace/events/gk20a.h +++ b/include/trace/events/gk20a.h | |||
@@ -192,9 +192,11 @@ DEFINE_EVENT(gk20a_channel_getput, gk20a_channel_put_nofree, | |||
192 | 192 | ||
193 | DECLARE_EVENT_CLASS(gk20a_channel_sched_params, | 193 | DECLARE_EVENT_CLASS(gk20a_channel_sched_params, |
194 | TP_PROTO(int chid, int tsgid, pid_t pid, u32 timeslice, | 194 | TP_PROTO(int chid, int tsgid, pid_t pid, u32 timeslice, |
195 | u32 timeout, const char *interleave, const char *preempt_mode), | 195 | u32 timeout, const char *interleave, |
196 | const char *graphics_preempt_mode, | ||
197 | const char *compute_preempt_mode), | ||
196 | TP_ARGS(chid, tsgid, pid, timeslice, timeout, | 198 | TP_ARGS(chid, tsgid, pid, timeslice, timeout, |
197 | interleave, preempt_mode), | 199 | interleave, graphics_preempt_mode, compute_preempt_mode), |
198 | TP_STRUCT__entry( | 200 | TP_STRUCT__entry( |
199 | __field(int, chid) | 201 | __field(int, chid) |
200 | __field(int, tsgid) | 202 | __field(int, tsgid) |
@@ -202,7 +204,8 @@ DECLARE_EVENT_CLASS(gk20a_channel_sched_params, | |||
202 | __field(u32, timeslice) | 204 | __field(u32, timeslice) |
203 | __field(u32, timeout) | 205 | __field(u32, timeout) |
204 | __field(const char *, interleave) /* no need to copy */ | 206 | __field(const char *, interleave) /* no need to copy */ |
205 | __field(const char *, preempt_mode) /* no need to copy */ | 207 | __field(const char *, graphics_preempt_mode) /* no need to copy */ |
208 | __field(const char *, compute_preempt_mode) /* no need to copy */ | ||
206 | ), | 209 | ), |
207 | TP_fast_assign( | 210 | TP_fast_assign( |
208 | __entry->chid = chid; | 211 | __entry->chid = chid; |
@@ -211,47 +214,59 @@ DECLARE_EVENT_CLASS(gk20a_channel_sched_params, | |||
211 | __entry->timeslice = timeslice; | 214 | __entry->timeslice = timeslice; |
212 | __entry->timeout = timeout; | 215 | __entry->timeout = timeout; |
213 | __entry->interleave = interleave; | 216 | __entry->interleave = interleave; |
214 | __entry->preempt_mode = preempt_mode; | 217 | __entry->graphics_preempt_mode = graphics_preempt_mode; |
218 | __entry->compute_preempt_mode = compute_preempt_mode; | ||
215 | ), | 219 | ), |
216 | TP_printk("chid=%d tsgid=%d pid=%d timeslice=%u timeout=%u interleave=%s preempt=%s", | 220 | TP_printk("chid=%d tsgid=%d pid=%d timeslice=%u timeout=%u interleave=%s graphics_preempt=%s compute_preempt=%s", |
217 | __entry->chid, __entry->tsgid, __entry->pid, | 221 | __entry->chid, __entry->tsgid, __entry->pid, |
218 | __entry->timeslice, __entry->timeout, | 222 | __entry->timeslice, __entry->timeout, |
219 | __entry->interleave, __entry->preempt_mode) | 223 | __entry->interleave, __entry->graphics_preempt_mode, |
224 | __entry->compute_preempt_mode) | ||
220 | ); | 225 | ); |
221 | 226 | ||
222 | DEFINE_EVENT(gk20a_channel_sched_params, gk20a_channel_sched_defaults, | 227 | DEFINE_EVENT(gk20a_channel_sched_params, gk20a_channel_sched_defaults, |
223 | TP_PROTO(int chid, int tsgid, pid_t pid, u32 timeslice, | 228 | TP_PROTO(int chid, int tsgid, pid_t pid, u32 timeslice, |
224 | u32 timeout, const char *interleave, const char *preempt_mode), | 229 | u32 timeout, const char *interleave, |
230 | const char *graphics_preempt_mode, | ||
231 | const char *compute_preempt_mode), | ||
225 | TP_ARGS(chid, tsgid, pid, timeslice, timeout, | 232 | TP_ARGS(chid, tsgid, pid, timeslice, timeout, |
226 | interleave, preempt_mode) | 233 | interleave, graphics_preempt_mode, compute_preempt_mode) |
227 | ); | 234 | ); |
228 | 235 | ||
229 | DEFINE_EVENT(gk20a_channel_sched_params, gk20a_channel_set_priority, | 236 | DEFINE_EVENT(gk20a_channel_sched_params, gk20a_channel_set_priority, |
230 | TP_PROTO(int chid, int tsgid, pid_t pid, u32 timeslice, | 237 | TP_PROTO(int chid, int tsgid, pid_t pid, u32 timeslice, |
231 | u32 timeout, const char *interleave, const char *preempt_mode), | 238 | u32 timeout, const char *interleave, |
239 | const char *graphics_preempt_mode, | ||
240 | const char *compute_preempt_mode), | ||
232 | TP_ARGS(chid, tsgid, pid, timeslice, timeout, | 241 | TP_ARGS(chid, tsgid, pid, timeslice, timeout, |
233 | interleave, preempt_mode) | 242 | interleave, graphics_preempt_mode, compute_preempt_mode) |
234 | ); | 243 | ); |
235 | 244 | ||
236 | DEFINE_EVENT(gk20a_channel_sched_params, gk20a_channel_set_runlist_interleave, | 245 | DEFINE_EVENT(gk20a_channel_sched_params, gk20a_channel_set_runlist_interleave, |
237 | TP_PROTO(int chid, int tsgid, pid_t pid, u32 timeslice, | 246 | TP_PROTO(int chid, int tsgid, pid_t pid, u32 timeslice, |
238 | u32 timeout, const char *interleave, const char *preempt_mode), | 247 | u32 timeout, const char *interleave, |
248 | const char *graphics_preempt_mode, | ||
249 | const char *compute_preempt_mode), | ||
239 | TP_ARGS(chid, tsgid, pid, timeslice, timeout, | 250 | TP_ARGS(chid, tsgid, pid, timeslice, timeout, |
240 | interleave, preempt_mode) | 251 | interleave, graphics_preempt_mode, compute_preempt_mode) |
241 | ); | 252 | ); |
242 | 253 | ||
243 | DEFINE_EVENT(gk20a_channel_sched_params, gk20a_channel_set_timeslice, | 254 | DEFINE_EVENT(gk20a_channel_sched_params, gk20a_channel_set_timeslice, |
244 | TP_PROTO(int chid, int tsgid, pid_t pid, u32 timeslice, | 255 | TP_PROTO(int chid, int tsgid, pid_t pid, u32 timeslice, |
245 | u32 timeout, const char *interleave, const char *preempt_mode), | 256 | u32 timeout, const char *interleave, |
257 | const char *graphics_preempt_mode, | ||
258 | const char *compute_preempt_mode), | ||
246 | TP_ARGS(chid, tsgid, pid, timeslice, timeout, | 259 | TP_ARGS(chid, tsgid, pid, timeslice, timeout, |
247 | interleave, preempt_mode) | 260 | interleave, graphics_preempt_mode, compute_preempt_mode) |
248 | ); | 261 | ); |
249 | 262 | ||
250 | DEFINE_EVENT(gk20a_channel_sched_params, gk20a_channel_set_timeout, | 263 | DEFINE_EVENT(gk20a_channel_sched_params, gk20a_channel_set_timeout, |
251 | TP_PROTO(int chid, int tsgid, pid_t pid, u32 timeslice, | 264 | TP_PROTO(int chid, int tsgid, pid_t pid, u32 timeslice, |
252 | u32 timeout, const char *interleave, const char *preempt_mode), | 265 | u32 timeout, const char *interleave, |
266 | const char *graphics_preempt_mode, | ||
267 | const char *compute_preempt_mode), | ||
253 | TP_ARGS(chid, tsgid, pid, timeslice, timeout, | 268 | TP_ARGS(chid, tsgid, pid, timeslice, timeout, |
254 | interleave, preempt_mode) | 269 | interleave, graphics_preempt_mode, compute_preempt_mode) |
255 | ); | 270 | ); |
256 | 271 | ||
257 | TRACE_EVENT(gk20a_push_cmdbuf, | 272 | TRACE_EVENT(gk20a_push_cmdbuf, |
diff --git a/include/uapi/linux/nvgpu.h b/include/uapi/linux/nvgpu.h index b8bd21f2..8ebe8d06 100644 --- a/include/uapi/linux/nvgpu.h +++ b/include/uapi/linux/nvgpu.h | |||
@@ -999,6 +999,16 @@ struct nvgpu_event_id_ctrl_args { | |||
999 | 999 | ||
1000 | #define NVGPU_IOCTL_CHANNEL_EVENT_ID_CMD_ENABLE 1 | 1000 | #define NVGPU_IOCTL_CHANNEL_EVENT_ID_CMD_ENABLE 1 |
1001 | 1001 | ||
1002 | struct nvgpu_preemption_mode_args { | ||
1003 | /* only one should be enabled at a time */ | ||
1004 | #define NVGPU_GRAPHICS_PREEMPTION_MODE_WFI BIT(0) | ||
1005 | __u32 graphics_preempt_mode; /* in */ | ||
1006 | |||
1007 | /* only one should be enabled at a time */ | ||
1008 | #define NVGPU_COMPUTE_PREEMPTION_MODE_WFI BIT(0) | ||
1009 | #define NVGPU_COMPUTE_PREEMPTION_MODE_CTA BIT(1) | ||
1010 | __u32 compute_preempt_mode; /* in */ | ||
1011 | }; | ||
1002 | 1012 | ||
1003 | #define NVGPU_IOCTL_CHANNEL_SET_NVMAP_FD \ | 1013 | #define NVGPU_IOCTL_CHANNEL_SET_NVMAP_FD \ |
1004 | _IOW(NVGPU_IOCTL_MAGIC, 5, struct nvgpu_set_nvmap_fd_args) | 1014 | _IOW(NVGPU_IOCTL_MAGIC, 5, struct nvgpu_set_nvmap_fd_args) |
@@ -1046,9 +1056,11 @@ struct nvgpu_event_id_ctrl_args { | |||
1046 | _IOW(NVGPU_IOCTL_MAGIC, 120, struct nvgpu_runlist_interleave_args) | 1056 | _IOW(NVGPU_IOCTL_MAGIC, 120, struct nvgpu_runlist_interleave_args) |
1047 | #define NVGPU_IOCTL_CHANNEL_SET_TIMESLICE \ | 1057 | #define NVGPU_IOCTL_CHANNEL_SET_TIMESLICE \ |
1048 | _IOW(NVGPU_IOCTL_MAGIC, 121, struct nvgpu_timeslice_args) | 1058 | _IOW(NVGPU_IOCTL_MAGIC, 121, struct nvgpu_timeslice_args) |
1059 | #define NVGPU_IOCTL_CHANNEL_SET_PREEMPTION_MODE \ | ||
1060 | _IOW(NVGPU_IOCTL_MAGIC, 122, struct nvgpu_preemption_mode_args) | ||
1049 | 1061 | ||
1050 | #define NVGPU_IOCTL_CHANNEL_LAST \ | 1062 | #define NVGPU_IOCTL_CHANNEL_LAST \ |
1051 | _IOC_NR(NVGPU_IOCTL_CHANNEL_SET_TIMESLICE) | 1063 | _IOC_NR(NVGPU_IOCTL_CHANNEL_SET_PREEMPTION_MODE) |
1052 | #define NVGPU_IOCTL_CHANNEL_MAX_ARG_SIZE sizeof(struct nvgpu_submit_gpfifo_args) | 1064 | #define NVGPU_IOCTL_CHANNEL_MAX_ARG_SIZE sizeof(struct nvgpu_submit_gpfifo_args) |
1053 | 1065 | ||
1054 | /* | 1066 | /* |