summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2017-06-19 15:13:08 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-06-20 14:35:23 -0400
commit930b61e6d19c894ce5101f8ce2804263b9cf8069 (patch)
treea527e61ebc3acd2a8ccff67e4b0d629c993008bc
parentc50b02eb66a7d45612f34236e14b7b7117ae398d (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>
-rw-r--r--drivers/gpu/nvgpu/common/linux/ioctl_channel.c18
-rw-r--r--drivers/gpu/nvgpu/gk20a/gk20a.h18
2 files changed, 18 insertions, 18 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.
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h
index 5039f8e3..b903d790 100644
--- a/drivers/gpu/nvgpu/gk20a/gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/gk20a.h
@@ -1541,24 +1541,6 @@ extern struct class nvgpu_class;
1541int gk20a_prepare_poweroff(struct gk20a *g); 1541int gk20a_prepare_poweroff(struct gk20a *g);
1542int gk20a_finalize_poweron(struct gk20a *g); 1542int gk20a_finalize_poweron(struct gk20a *g);
1543 1543
1544static inline void gk20a_channel_trace_sched_param(
1545 void (*trace)(int chid, int tsgid, pid_t pid, u32 timeslice,
1546 u32 timeout, const char *interleave,
1547 const char *graphics_preempt_mode,
1548 const char *compute_preempt_mode),
1549 struct channel_gk20a *ch)
1550{
1551 (trace)(ch->hw_chid, ch->tsgid, ch->pid,
1552 gk20a_is_channel_marked_as_tsg(ch) ?
1553 tsg_gk20a_from_ch(ch)->timeslice_us : ch->timeslice_us,
1554 ch->timeout_ms_max,
1555 gk20a_fifo_interleave_level_name(ch->interleave_level),
1556 gr_gk20a_graphics_preempt_mode_name(ch->ch_ctx.gr_ctx ?
1557 ch->ch_ctx.gr_ctx->graphics_preempt_mode : 0),
1558 gr_gk20a_compute_preempt_mode_name(ch->ch_ctx.gr_ctx ?
1559 ch->ch_ctx.gr_ctx->compute_preempt_mode : 0));
1560}
1561
1562void nvgpu_wait_for_deferred_interrupts(struct gk20a *g); 1544void nvgpu_wait_for_deferred_interrupts(struct gk20a *g);
1563 1545
1564struct gk20a * __must_check gk20a_get(struct gk20a *g); 1546struct gk20a * __must_check gk20a_get(struct gk20a *g);