summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/common')
-rw-r--r--drivers/gpu/nvgpu/common/linux/ioctl_channel.c18
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
37static 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.