diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2017-06-19 15:13:08 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-06-20 14:35:23 -0400 |
commit | 930b61e6d19c894ce5101f8ce2804263b9cf8069 (patch) | |
tree | a527e61ebc3acd2a8ccff67e4b0d629c993008bc /drivers/gpu/nvgpu/common/linux | |
parent | c50b02eb66a7d45612f34236e14b7b7117ae398d (diff) |
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 <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/1505173
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/ioctl_channel.c | 18 |
1 files changed, 18 insertions, 0 deletions
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 @@ | |||
34 | #include "gk20a/fence_gk20a.h" | 34 | #include "gk20a/fence_gk20a.h" |
35 | #include "ioctl_channel.h" | 35 | #include "ioctl_channel.h" |
36 | 36 | ||
37 | static void gk20a_channel_trace_sched_param( | ||
38 | void (*trace)(int chid, int tsgid, pid_t pid, u32 timeslice, | ||
39 | u32 timeout, const char *interleave, | ||
40 | const char *graphics_preempt_mode, | ||
41 | const char *compute_preempt_mode), | ||
42 | struct channel_gk20a *ch) | ||
43 | { | ||
44 | (trace)(ch->hw_chid, ch->tsgid, ch->pid, | ||
45 | gk20a_is_channel_marked_as_tsg(ch) ? | ||
46 | tsg_gk20a_from_ch(ch)->timeslice_us : ch->timeslice_us, | ||
47 | ch->timeout_ms_max, | ||
48 | gk20a_fifo_interleave_level_name(ch->interleave_level), | ||
49 | gr_gk20a_graphics_preempt_mode_name(ch->ch_ctx.gr_ctx ? | ||
50 | ch->ch_ctx.gr_ctx->graphics_preempt_mode : 0), | ||
51 | gr_gk20a_compute_preempt_mode_name(ch->ch_ctx.gr_ctx ? | ||
52 | ch->ch_ctx.gr_ctx->compute_preempt_mode : 0)); | ||
53 | } | ||
54 | |||
37 | /* | 55 | /* |
38 | * Although channels do have pointers back to the gk20a struct that they were | 56 | * Although channels do have pointers back to the gk20a struct that they were |
39 | * created under in cases where the driver is killed that pointer can be bad. | 57 | * created under in cases where the driver is killed that pointer can be bad. |