diff options
author | Richard Zhao <rizhao@nvidia.com> | 2018-04-12 19:06:02 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-04-16 13:49:43 -0400 |
commit | cc9f3d80e32c63ae003a8dc66016a035100a6359 (patch) | |
tree | 50fc79abb1c314a76f576ba3571e877d9c84e2d7 /drivers/gpu/nvgpu/gk20a/channel_gk20a.c | |
parent | a0dfb2b91112a766fb4b3e2aaafa99167151c3da (diff) |
gpu: nvgpu: pass pid/tid from os specific code to common code
linux driver runs in user's process but qnx driver has dedicate driver
process, so they have different way to get user pid. nvgpu common code
expect calls from os specific code pass pid/tid.
ce/cde open channel for internal use, we use driver pid.
Jira VQRM-3534
Change-Id: I892372ac5f1dc4d25f9928d16992bcc659d12a56
Signed-off-by: Richard Zhao <rizhao@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1694145
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@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/channel_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/channel_gk20a.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c index f50c37a7..2f5514a8 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c | |||
@@ -615,7 +615,8 @@ void __gk20a_channel_kill(struct channel_gk20a *ch) | |||
615 | 615 | ||
616 | struct channel_gk20a *gk20a_open_new_channel(struct gk20a *g, | 616 | struct channel_gk20a *gk20a_open_new_channel(struct gk20a *g, |
617 | s32 runlist_id, | 617 | s32 runlist_id, |
618 | bool is_privileged_channel) | 618 | bool is_privileged_channel, |
619 | pid_t pid, pid_t tid) | ||
619 | { | 620 | { |
620 | struct fifo_gk20a *f = &g->fifo; | 621 | struct fifo_gk20a *f = &g->fifo; |
621 | struct channel_gk20a *ch; | 622 | struct channel_gk20a *ch; |
@@ -645,8 +646,8 @@ struct channel_gk20a *gk20a_open_new_channel(struct gk20a *g, | |||
645 | /* Channel privilege level */ | 646 | /* Channel privilege level */ |
646 | ch->is_privileged_channel = is_privileged_channel; | 647 | ch->is_privileged_channel = is_privileged_channel; |
647 | 648 | ||
648 | ch->pid = nvgpu_current_tid(g); | 649 | ch->pid = tid; |
649 | ch->tgid = nvgpu_current_pid(g); /* process granularity for FECS traces */ | 650 | ch->tgid = pid; /* process granularity for FECS traces */ |
650 | 651 | ||
651 | if (g->ops.fifo.alloc_inst(g, ch)) { | 652 | if (g->ops.fifo.alloc_inst(g, ch)) { |
652 | ch->g = NULL; | 653 | ch->g = NULL; |