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.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/fecs_trace_gk20a.c b/drivers/gpu/nvgpu/gk20a/fecs_trace_gk20a.c
index cac3ce27..6b384c89 100644
--- a/drivers/gpu/nvgpu/gk20a/fecs_trace_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/fecs_trace_gk20a.c
@@ -457,9 +457,14 @@ int gk20a_fecs_trace_bind_channel(struct gk20a *g,
457 struct gk20a_fecs_trace *trace = g->fecs_trace; 457 struct gk20a_fecs_trace *trace = g->fecs_trace;
458 struct nvgpu_mem *mem; 458 struct nvgpu_mem *mem;
459 u32 context_ptr = gk20a_fecs_trace_fecs_context_ptr(g, ch); 459 u32 context_ptr = gk20a_fecs_trace_fecs_context_ptr(g, ch);
460 pid_t pid;
461 u32 aperture_mask; 460 u32 aperture_mask;
462 461
462 tsg = tsg_gk20a_from_ch(ch);
463 if (tsg == NULL) {
464 nvgpu_err(g, "chid: %d is not bound to tsg", ch->chid);
465 return -EINVAL;
466 }
467
463 nvgpu_log(g, gpu_dbg_fn|gpu_dbg_ctxsw, 468 nvgpu_log(g, gpu_dbg_fn|gpu_dbg_ctxsw,
464 "chid=%d context_ptr=%x inst_block=%llx", 469 "chid=%d context_ptr=%x inst_block=%llx",
465 ch->chid, context_ptr, 470 ch->chid, context_ptr,
@@ -519,11 +524,7 @@ int gk20a_fecs_trace_bind_channel(struct gk20a *g,
519 /* pid (process identifier) in user space, corresponds to tgid (thread 524 /* pid (process identifier) in user space, corresponds to tgid (thread
520 * group id) in kernel space. 525 * group id) in kernel space.
521 */ 526 */
522 if (gk20a_is_channel_marked_as_tsg(ch)) 527 gk20a_fecs_trace_hash_add(g, context_ptr, tsg->tgid);
523 pid = tsg_gk20a_from_ch(ch)->tgid;
524 else
525 pid = ch->tgid;
526 gk20a_fecs_trace_hash_add(g, context_ptr, pid);
527 528
528 return 0; 529 return 0;
529} 530}