summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/fecs_trace_gk20a.c
diff options
context:
space:
mode:
authorSeema Khowala <seemaj@nvidia.com>2018-12-13 14:02:11 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2019-02-22 21:59:18 -0500
commitc9d4df288d51e4776188a25a6a2bb26ddd897a20 (patch)
treede70d1fa9da9bd79e783d24db5953c74f5d15fb8 /drivers/gpu/nvgpu/gk20a/fecs_trace_gk20a.c
parentd975bda39876b288479ef5d72cb0495fe1c85c6b (diff)
gpu: nvgpu: remove code for ch not bound to tsg
- Remove handling for channels that are no more bound to tsg as channel could be referenceable but no more part of a tsg - Use tsg_gk20a_from_ch to get pointer to tsg for a given channel - Clear unhandled gr interrupts Bug 2429295 JIRA NVGPU-1580 Change-Id: I9da43a2bc9a0282c793b9f301eaf8e8604f91d70 Signed-off-by: Seema Khowala <seemaj@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1972492 (cherry picked from commit 013ca60edd97e7719e389b3048fed9b165277251 in dev-kernel) Reviewed-on: https://git-master.nvidia.com/r/2018262 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: Debarshi Dutta <ddutta@nvidia.com> Tested-by: Debarshi Dutta <ddutta@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Bibek Basu <bbasu@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
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}