summaryrefslogtreecommitdiffstats
path: root/include/trace/events
diff options
context:
space:
mode:
authorDeepak Nibade <dnibade@nvidia.com>2016-04-19 07:27:49 -0400
committerTerje Bergstrom <tbergstrom@nvidia.com>2016-05-09 16:16:29 -0400
commitd868b654419cfa096f563c9281a2a5cc067c23db (patch)
treea11fc30ab435c6e2a4c54b97455d3f5c177ad507 /include/trace/events
parentf14152c081d94710dbde843b8dcd9b3981afb831 (diff)
gpu: nvgpu: separate IOCTL to set preemption mode
Add separate IOCTL NVGPU_IOCTL_CHANNEL_SET_PREEMPTION_MODE to allow setting preemption modes from UMD Define preemption modes in nvgpu.h and use them everywhere Remove mode definitions from mm_gk20a.h Also, we support setting only one preemption mode in a channel But it is possible to have multiple preemption modes (one from graphics and one from compute) set simultaneously Hence, update struct gr_ctx_desc to include two separate preemption modes (graphics_preempt_mode and compute_preempt_mode) API NVGPU_IOCTL_CHANNEL_SET_PREEMPTION_MODE also supports setting two separate preemption modes i.e. one for graphics and one for compute Make necessary changes in code to support two preemption modes Bug 1646259 Change-Id: Ia1dea19e609ba8cc0de2f39ab6c0c4cd6b0a752c Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: http://git-master/r/1131805 Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'include/trace/events')
-rw-r--r--include/trace/events/gk20a.h47
1 files changed, 31 insertions, 16 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
193DECLARE_EVENT_CLASS(gk20a_channel_sched_params, 193DECLARE_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
222DEFINE_EVENT(gk20a_channel_sched_params, gk20a_channel_sched_defaults, 227DEFINE_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
229DEFINE_EVENT(gk20a_channel_sched_params, gk20a_channel_set_priority, 236DEFINE_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
236DEFINE_EVENT(gk20a_channel_sched_params, gk20a_channel_set_runlist_interleave, 245DEFINE_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
243DEFINE_EVENT(gk20a_channel_sched_params, gk20a_channel_set_timeslice, 254DEFINE_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
250DEFINE_EVENT(gk20a_channel_sched_params, gk20a_channel_set_timeout, 263DEFINE_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
257TRACE_EVENT(gk20a_push_cmdbuf, 272TRACE_EVENT(gk20a_push_cmdbuf,