From 930b61e6d19c894ce5101f8ce2804263b9cf8069 Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Mon, 19 Jun 2017 12:13:08 -0700 Subject: gpu: nvgpu: Move internal channel trace function Move internal channel trace function to ioctl_channel.c. It's not used anywhere else, so it does not need to be exported outside ioctl_channel.c. JIRA NVGPU-38 Change-Id: If6300781961ffffad4f63bc212d68adf8f3497fc Signed-off-by: Terje Bergstrom Reviewed-on: http://git-master/r/1505173 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/linux/ioctl_channel.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'drivers/gpu/nvgpu/common') diff --git a/drivers/gpu/nvgpu/common/linux/ioctl_channel.c b/drivers/gpu/nvgpu/common/linux/ioctl_channel.c index 08e483a3..17340e8c 100644 --- a/drivers/gpu/nvgpu/common/linux/ioctl_channel.c +++ b/drivers/gpu/nvgpu/common/linux/ioctl_channel.c @@ -34,6 +34,24 @@ #include "gk20a/fence_gk20a.h" #include "ioctl_channel.h" +static void gk20a_channel_trace_sched_param( + void (*trace)(int chid, int tsgid, pid_t pid, u32 timeslice, + u32 timeout, const char *interleave, + const char *graphics_preempt_mode, + const char *compute_preempt_mode), + struct channel_gk20a *ch) +{ + (trace)(ch->hw_chid, ch->tsgid, ch->pid, + gk20a_is_channel_marked_as_tsg(ch) ? + tsg_gk20a_from_ch(ch)->timeslice_us : ch->timeslice_us, + ch->timeout_ms_max, + gk20a_fifo_interleave_level_name(ch->interleave_level), + gr_gk20a_graphics_preempt_mode_name(ch->ch_ctx.gr_ctx ? + ch->ch_ctx.gr_ctx->graphics_preempt_mode : 0), + gr_gk20a_compute_preempt_mode_name(ch->ch_ctx.gr_ctx ? + ch->ch_ctx.gr_ctx->compute_preempt_mode : 0)); +} + /* * Although channels do have pointers back to the gk20a struct that they were * created under in cases where the driver is killed that pointer can be bad. -- cgit v1.2.2