summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/gk20a.h
diff options
context:
space:
mode:
authorThomas Fleury <tfleury@nvidia.com>2016-03-15 22:06:43 -0400
committerTerje Bergstrom <tbergstrom@nvidia.com>2016-05-21 14:34:18 -0400
commit64f2e3ee9be32aab8bc7f3d373e4b89d60d3fe53 (patch)
tree83c8baae9c734630481d3dc9d4e46cc468284f33 /drivers/gpu/nvgpu/gk20a/gk20a.h
parent57a59616b596d4d7b134ab8a32a4ab7cdfa15f3d (diff)
gpu: nvgpu: update trace for sched params
Use an inline function instead of a macro to "expand" all channel parameters. Jira EVLR-244 Jira EVLR-318 Change-Id: I4e8c5ee6bc9da36564af171be809f50dd2dfd439 Signed-off-by: Thomas Fleury <tfleury@nvidia.com> Reviewed-on: http://git-master/r/1150050 Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gk20a.h')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gk20a.h30
1 files changed, 17 insertions, 13 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h
index 87cf2459..49da164c 100644
--- a/drivers/gpu/nvgpu/gk20a/gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/gk20a.h
@@ -1064,18 +1064,22 @@ static inline struct tsg_gk20a *tsg_gk20a_from_ch(struct channel_gk20a *ch)
1064 return tsg; 1064 return tsg;
1065} 1065}
1066 1066
1067 1067static inline void gk20a_channel_trace_sched_param(
1068#define GK20A_TP_ARGS_SCHED(ch) \ 1068 void (*trace)(int chid, int tsgid, pid_t pid, u32 timeslice,
1069 ch->hw_chid, \ 1069 u32 timeout, const char *interleave,
1070 ch->tsgid, \ 1070 const char *graphics_preempt_mode,
1071 ch->pid, \ 1071 const char *compute_preempt_mode),
1072 gk20a_is_channel_marked_as_tsg(ch) ? \ 1072 struct channel_gk20a *ch)
1073 tsg_gk20a_from_ch(ch)->timeslice_us : ch->timeslice_us, \ 1073{
1074 ch->timeout_ms_max, \ 1074 (trace)(ch->hw_chid, ch->tsgid, ch->pid,
1075 gk20a_fifo_interleave_level_name(ch->interleave_level), \ 1075 gk20a_is_channel_marked_as_tsg(ch) ?
1076 gr_gk20a_graphics_preempt_mode_name(ch->ch_ctx.gr_ctx ? \ 1076 tsg_gk20a_from_ch(ch)->timeslice_us : ch->timeslice_us,
1077 ch->ch_ctx.gr_ctx->graphics_preempt_mode : 0), \ 1077 ch->timeout_ms_max,
1078 gr_gk20a_compute_preempt_mode_name(ch->ch_ctx.gr_ctx ? \ 1078 gk20a_fifo_interleave_level_name(ch->interleave_level),
1079 ch->ch_ctx.gr_ctx->compute_preempt_mode : 0) 1079 gr_gk20a_graphics_preempt_mode_name(ch->ch_ctx.gr_ctx ?
1080 ch->ch_ctx.gr_ctx->graphics_preempt_mode : 0),
1081 gr_gk20a_compute_preempt_mode_name(ch->ch_ctx.gr_ctx ?
1082 ch->ch_ctx.gr_ctx->compute_preempt_mode : 0));
1083}
1080 1084
1081#endif /* GK20A_H */ 1085#endif /* GK20A_H */