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/ctxsw_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/ctxsw_trace_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/ctxsw_trace_gk20a.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/ctxsw_trace_gk20a.c b/drivers/gpu/nvgpu/gk20a/ctxsw_trace_gk20a.c index d435bf79..d43c06be 100644 --- a/drivers/gpu/nvgpu/gk20a/ctxsw_trace_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/ctxsw_trace_gk20a.c | |||
@@ -677,22 +677,13 @@ void gk20a_ctxsw_trace_tsg_reset(struct gk20a *g, struct tsg_gk20a *tsg) | |||
677 | .vmid = 0, | 677 | .vmid = 0, |
678 | .tag = NVGPU_CTXSW_TAG_ENGINE_RESET, | 678 | .tag = NVGPU_CTXSW_TAG_ENGINE_RESET, |
679 | .context_id = 0, | 679 | .context_id = 0, |
680 | .pid = 0, | 680 | .pid = tsg->tgid, |
681 | }; | 681 | }; |
682 | struct channel_gk20a *ch; | ||
683 | 682 | ||
684 | if (!g->ctxsw_trace) | 683 | if (!g->ctxsw_trace) |
685 | return; | 684 | return; |
686 | 685 | ||
687 | g->ops.read_ptimer(g, &entry.timestamp); | 686 | g->ops.read_ptimer(g, &entry.timestamp); |
688 | mutex_lock(&tsg->ch_list_lock); | ||
689 | if (!list_empty(&tsg->ch_list)) { | ||
690 | ch = list_entry(tsg->ch_list.next, | ||
691 | struct channel_gk20a, ch_entry); | ||
692 | entry.pid = ch->pid; | ||
693 | } | ||
694 | mutex_unlock(&tsg->ch_list_lock); | ||
695 | |||
696 | gk20a_ctxsw_trace_write(g, &entry); | 687 | gk20a_ctxsw_trace_write(g, &entry); |
697 | gk20a_ctxsw_trace_wake_up(g, 0); | 688 | gk20a_ctxsw_trace_wake_up(g, 0); |
698 | #endif | 689 | #endif |