diff options
author | Deepak Nibade <dnibade@nvidia.com> | 2016-04-19 07:27:49 -0400 |
---|---|---|
committer | Terje Bergstrom <tbergstrom@nvidia.com> | 2016-05-09 16:16:29 -0400 |
commit | d868b654419cfa096f563c9281a2a5cc067c23db (patch) | |
tree | a11fc30ab435c6e2a4c54b97455d3f5c177ad507 /drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | |
parent | f14152c081d94710dbde843b8dcd9b3981afb831 (diff) |
gpu: nvgpu: separate IOCTL to set preemption mode
Add separate IOCTL NVGPU_IOCTL_CHANNEL_SET_PREEMPTION_MODE
to allow setting preemption modes from UMD
Define preemption modes in nvgpu.h and use them everywhere
Remove mode definitions from mm_gk20a.h
Also, we support setting only one preemption mode in a channel
But it is possible to have multiple preemption modes (one from
graphics and one from compute) set simultaneously
Hence, update struct gr_ctx_desc to include two separate
preemption modes (graphics_preempt_mode and compute_preempt_mode)
API NVGPU_IOCTL_CHANNEL_SET_PREEMPTION_MODE also supports
setting two separate preemption modes i.e. one for graphics
and one for compute
Make necessary changes in code to support two preemption
modes
Bug 1646259
Change-Id: Ia1dea19e609ba8cc0de2f39ab6c0c4cd6b0a752c
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/1131805
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/fifo_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c index eccea4d4..dc3debf2 100644 --- a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | |||
@@ -2599,7 +2599,7 @@ static int gk20a_fifo_sched_debugfs_seq_show( | |||
2599 | runlist = &f->runlist_info[runlist_id]; | 2599 | runlist = &f->runlist_info[runlist_id]; |
2600 | 2600 | ||
2601 | if (ch == f->channel) { | 2601 | if (ch == f->channel) { |
2602 | seq_puts(s, "chid tsgid pid timeslice timeout interleave preempt\n"); | 2602 | seq_puts(s, "chid tsgid pid timeslice timeout interleave graphics_preempt compute_preempt\n"); |
2603 | seq_puts(s, " (usecs) (msecs)\n"); | 2603 | seq_puts(s, " (usecs) (msecs)\n"); |
2604 | ret = 0; | 2604 | ret = 0; |
2605 | } | 2605 | } |
@@ -2611,15 +2611,15 @@ static int gk20a_fifo_sched_debugfs_seq_show( | |||
2611 | if (gk20a_is_channel_marked_as_tsg(ch)) | 2611 | if (gk20a_is_channel_marked_as_tsg(ch)) |
2612 | tsg = &f->tsg[ch->tsgid]; | 2612 | tsg = &f->tsg[ch->tsgid]; |
2613 | 2613 | ||
2614 | seq_printf(s, "%-8d %-8d %-8d %-9d %-8d %-10d %-8d\n", | 2614 | seq_printf(s, "%-8d %-8d %-8d %-9d %-8d %-10d %-8d %-8d\n", |
2615 | ch->hw_chid, | 2615 | ch->hw_chid, |
2616 | ch->tsgid, | 2616 | ch->tsgid, |
2617 | ch->pid, | 2617 | ch->pid, |
2618 | tsg ? tsg->timeslice_us : ch->timeslice_us, | 2618 | tsg ? tsg->timeslice_us : ch->timeslice_us, |
2619 | ch->timeout_ms_max, | 2619 | ch->timeout_ms_max, |
2620 | ch->interleave_level, | 2620 | ch->interleave_level, |
2621 | ch->ch_ctx.gr_ctx ? | 2621 | ch->ch_ctx.gr_ctx ? ch->ch_ctx.gr_ctx->graphics_preempt_mode : -1, |
2622 | ch->ch_ctx.gr_ctx->preempt_mode : -1); | 2622 | ch->ch_ctx.gr_ctx ? ch->ch_ctx.gr_ctx->compute_preempt_mode : -1); |
2623 | gk20a_channel_put(ch); | 2623 | gk20a_channel_put(ch); |
2624 | } | 2624 | } |
2625 | return 0; | 2625 | return 0; |