From c8ffe0fdecfa110a9f9beb1b7e0298d3c3c64cc2 Mon Sep 17 00:00:00 2001 From: Thomas Fleury Date: Tue, 10 May 2016 09:05:45 -0700 Subject: 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 Reviewed-on: http://git-master/r/1160384 (cherry picked from commit 75ca739517cc7f7f76714b5f6a1a57c39b8cb38e) Reviewed-on: http://git-master/r/1167021 Reviewed-by: Richard Zhao GVS: Gerrit_Virtual_Submit Reviewed-by: Alex Waterman Reviewed-by: Vijayakumar Subbu --- drivers/gpu/nvgpu/gk20a/ctxsw_trace_gk20a.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a/ctxsw_trace_gk20a.c') 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) .vmid = 0, .tag = NVGPU_CTXSW_TAG_ENGINE_RESET, .context_id = 0, - .pid = 0, + .pid = tsg->tgid, }; - struct channel_gk20a *ch; if (!g->ctxsw_trace) return; g->ops.read_ptimer(g, &entry.timestamp); - mutex_lock(&tsg->ch_list_lock); - if (!list_empty(&tsg->ch_list)) { - ch = list_entry(tsg->ch_list.next, - struct channel_gk20a, ch_entry); - entry.pid = ch->pid; - } - mutex_unlock(&tsg->ch_list_lock); - gk20a_ctxsw_trace_write(g, &entry); gk20a_ctxsw_trace_wake_up(g, 0); #endif -- cgit v1.2.2