summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/fecs_trace_gk20a.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/fecs_trace_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/fecs_trace_gk20a.c7
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}