summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
diff options
context:
space:
mode:
authorRichard Zhao <rizhao@nvidia.com>2018-03-29 19:52:16 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-04-10 04:11:44 -0400
commit31432919cac8fc4ddad3b9245cf61ffd47d5db82 (patch)
tree4121f32495f8ccd92be8a38071e33d8918e1fa88 /drivers/gpu/nvgpu/gk20a/channel_gk20a.c
parent546e77812150fbcab601b529b053758f58d02bc1 (diff)
gpu: nvgpu: vgpu: fix build errors on qnx
- Declare global functions before reaching the implementation. - avoid using current (current process). - assign ch->pid/tgid before using them. Jira VFND-4870 Change-Id: I688a1b89ef4d5dcf046929eab11d7e523caba0a5 Signed-off-by: Richard Zhao <rizhao@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1687142 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Nirav Patel <nipatel@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.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
index a68968fe..f50c37a7 100644
--- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
@@ -645,6 +645,9 @@ struct channel_gk20a *gk20a_open_new_channel(struct gk20a *g,
645 /* Channel privilege level */ 645 /* Channel privilege level */
646 ch->is_privileged_channel = is_privileged_channel; 646 ch->is_privileged_channel = is_privileged_channel;
647 647
648 ch->pid = nvgpu_current_tid(g);
649 ch->tgid = nvgpu_current_pid(g); /* process granularity for FECS traces */
650
648 if (g->ops.fifo.alloc_inst(g, ch)) { 651 if (g->ops.fifo.alloc_inst(g, ch)) {
649 ch->g = NULL; 652 ch->g = NULL;
650 free_channel(f, ch); 653 free_channel(f, ch);
@@ -656,9 +659,6 @@ struct channel_gk20a *gk20a_open_new_channel(struct gk20a *g,
656 /* now the channel is in a limbo out of the free list but not marked as 659 /* now the channel is in a limbo out of the free list but not marked as
657 * alive and used (i.e. get-able) yet */ 660 * alive and used (i.e. get-able) yet */
658 661
659 ch->pid = nvgpu_current_tid(g);
660 ch->tgid = nvgpu_current_pid(g); /* process granularity for FECS traces */
661
662 /* By default, channel is regular (non-TSG) channel */ 662 /* By default, channel is regular (non-TSG) channel */
663 ch->tsgid = NVGPU_INVALID_TSG_ID; 663 ch->tsgid = NVGPU_INVALID_TSG_ID;
664 664