diff options
author | Thomas Fleury <tfleury@nvidia.com> | 2016-05-10 12:05:45 -0400 |
---|---|---|
committer | Vijayakumar Subbu <vsubbu@nvidia.com> | 2016-07-19 02:12:51 -0400 |
commit | c8ffe0fdecfa110a9f9beb1b7e0298d3c3c64cc2 (patch) | |
tree | 08054741c436ab6a783e710a9efa87fc7a0b71df /drivers/gpu/nvgpu/gk20a/fecs_trace_gk20a.c | |
parent | 90988af81237d3b56c063b750c32efcbee9ab9cc (diff) |
gpu: nvgpu: add sched control API
Added a dedicated device node to allow an
app manager to control TSG scheduling parameters:
- Get list of TSGs
- Get list of recent TSGs
- Get list of TSGs per pid
- Get TSG current scheduling parameters
- Set TSG timeslice
- Set TSG runlist interleave
Jira VFND-1586
Change-Id: I014c9d1534bce0eaea6c25ad114cf0cff317af79
Signed-off-by: Thomas Fleury <tfleury@nvidia.com>
Reviewed-on: http://git-master/r/1160384
(cherry picked from commit 75ca739517cc7f7f76714b5f6a1a57c39b8cb38e)
Reviewed-on: http://git-master/r/1167021
Reviewed-by: Richard Zhao <rizhao@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/fecs_trace_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/fecs_trace_gk20a.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/fecs_trace_gk20a.c b/drivers/gpu/nvgpu/gk20a/fecs_trace_gk20a.c index 69e2b409..15e645f2 100644 --- a/drivers/gpu/nvgpu/gk20a/fecs_trace_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/fecs_trace_gk20a.c | |||
@@ -596,6 +596,7 @@ static int gk20a_fecs_trace_bind_channel(struct gk20a *g, | |||
596 | struct gk20a_fecs_trace *trace = g->fecs_trace; | 596 | struct gk20a_fecs_trace *trace = g->fecs_trace; |
597 | struct mem_desc *mem = &ch_ctx->gr_ctx->mem; | 597 | struct mem_desc *mem = &ch_ctx->gr_ctx->mem; |
598 | u32 context_ptr = gk20a_fecs_trace_fecs_context_ptr(ch); | 598 | u32 context_ptr = gk20a_fecs_trace_fecs_context_ptr(ch); |
599 | pid_t pid; | ||
599 | 600 | ||
600 | gk20a_dbg(gpu_dbg_fn|gpu_dbg_ctxsw, | 601 | gk20a_dbg(gpu_dbg_fn|gpu_dbg_ctxsw, |
601 | "hw_chid=%d context_ptr=%x inst_block=%llx", | 602 | "hw_chid=%d context_ptr=%x inst_block=%llx", |
@@ -630,7 +631,11 @@ static int gk20a_fecs_trace_bind_channel(struct gk20a *g, | |||
630 | GK20A_FECS_TRACE_NUM_RECORDS)); | 631 | GK20A_FECS_TRACE_NUM_RECORDS)); |
631 | 632 | ||
632 | gk20a_mem_end(g, mem); | 633 | gk20a_mem_end(g, mem); |
633 | gk20a_fecs_trace_hash_add(g, context_ptr, ch->pid); | 634 | if (gk20a_is_channel_marked_as_tsg(ch)) |
635 | pid = tsg_gk20a_from_ch(ch)->tgid; | ||
636 | else | ||
637 | pid = ch->pid; | ||
638 | gk20a_fecs_trace_hash_add(g, context_ptr, pid); | ||
634 | 639 | ||
635 | return 0; | 640 | return 0; |
636 | } | 641 | } |