diff options
author | Richard Zhao <rizhao@nvidia.com> | 2018-03-29 19:52:16 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-04-10 04:11:44 -0400 |
commit | 31432919cac8fc4ddad3b9245cf61ffd47d5db82 (patch) | |
tree | 4121f32495f8ccd92be8a38071e33d8918e1fa88 /drivers/gpu/nvgpu/vgpu | |
parent | 546e77812150fbcab601b529b053758f58d02bc1 (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/vgpu')
-rw-r--r-- | drivers/gpu/nvgpu/vgpu/fifo_vgpu.c | 2 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/vgpu/gp10b/vgpu_fuse_gp10b.c | 1 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/vgpu/gv11b/vgpu_fifo_gv11b.c | 1 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/vgpu/gv11b/vgpu_gr_gv11b.c | 1 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/vgpu/gv11b/vgpu_subctx_gv11b.c | 1 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/vgpu/mm_vgpu.c | 3 |
6 files changed, 5 insertions, 4 deletions
diff --git a/drivers/gpu/nvgpu/vgpu/fifo_vgpu.c b/drivers/gpu/nvgpu/vgpu/fifo_vgpu.c index c8a8ce49..d077f329 100644 --- a/drivers/gpu/nvgpu/vgpu/fifo_vgpu.c +++ b/drivers/gpu/nvgpu/vgpu/fifo_vgpu.c | |||
@@ -89,7 +89,7 @@ int vgpu_channel_alloc_inst(struct gk20a *g, struct channel_gk20a *ch) | |||
89 | msg.cmd = TEGRA_VGPU_CMD_CHANNEL_ALLOC_HWCTX; | 89 | msg.cmd = TEGRA_VGPU_CMD_CHANNEL_ALLOC_HWCTX; |
90 | msg.handle = vgpu_get_handle(g); | 90 | msg.handle = vgpu_get_handle(g); |
91 | p->id = ch->chid; | 91 | p->id = ch->chid; |
92 | p->pid = (u64)current->tgid; | 92 | p->pid = (u64)ch->pid; |
93 | err = vgpu_comm_sendrecv(&msg, sizeof(msg), sizeof(msg)); | 93 | err = vgpu_comm_sendrecv(&msg, sizeof(msg), sizeof(msg)); |
94 | if (err || msg.ret) { | 94 | if (err || msg.ret) { |
95 | nvgpu_err(g, "fail"); | 95 | nvgpu_err(g, "fail"); |
diff --git a/drivers/gpu/nvgpu/vgpu/gp10b/vgpu_fuse_gp10b.c b/drivers/gpu/nvgpu/vgpu/gp10b/vgpu_fuse_gp10b.c index 52b2aee5..0d3c6bc1 100644 --- a/drivers/gpu/nvgpu/vgpu/gp10b/vgpu_fuse_gp10b.c +++ b/drivers/gpu/nvgpu/vgpu/gp10b/vgpu_fuse_gp10b.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <nvgpu/enabled.h> | 23 | #include <nvgpu/enabled.h> |
24 | 24 | ||
25 | #include "gk20a/gk20a.h" | 25 | #include "gk20a/gk20a.h" |
26 | #include "vgpu_fuse_gp10b.h" | ||
26 | 27 | ||
27 | int vgpu_gp10b_fuse_check_priv_security(struct gk20a *g) | 28 | int vgpu_gp10b_fuse_check_priv_security(struct gk20a *g) |
28 | { | 29 | { |
diff --git a/drivers/gpu/nvgpu/vgpu/gv11b/vgpu_fifo_gv11b.c b/drivers/gpu/nvgpu/vgpu/gv11b/vgpu_fifo_gv11b.c index 18d2de70..9b689699 100644 --- a/drivers/gpu/nvgpu/vgpu/gv11b/vgpu_fifo_gv11b.c +++ b/drivers/gpu/nvgpu/vgpu/gv11b/vgpu_fifo_gv11b.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <nvgpu/vgpu/tegra_vgpu.h> | 26 | #include <nvgpu/vgpu/tegra_vgpu.h> |
27 | 27 | ||
28 | #include "gv11b/fifo_gv11b.h" | 28 | #include "gv11b/fifo_gv11b.h" |
29 | #include "vgpu_fifo_gv11b.h" | ||
29 | 30 | ||
30 | #ifdef CONFIG_TEGRA_GK20A_NVHOST | 31 | #ifdef CONFIG_TEGRA_GK20A_NVHOST |
31 | 32 | ||
diff --git a/drivers/gpu/nvgpu/vgpu/gv11b/vgpu_gr_gv11b.c b/drivers/gpu/nvgpu/vgpu/gv11b/vgpu_gr_gv11b.c index 3c93c581..df4d87da 100644 --- a/drivers/gpu/nvgpu/vgpu/gv11b/vgpu_gr_gv11b.c +++ b/drivers/gpu/nvgpu/vgpu/gv11b/vgpu_gr_gv11b.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include "gk20a/gk20a.h" | 23 | #include "gk20a/gk20a.h" |
24 | #include "vgpu/gr_vgpu.h" | 24 | #include "vgpu/gr_vgpu.h" |
25 | #include "vgpu_subctx_gv11b.h" | 25 | #include "vgpu_subctx_gv11b.h" |
26 | #include "vgpu_gr_gv11b.h" | ||
26 | 27 | ||
27 | int vgpu_gr_gv11b_commit_inst(struct channel_gk20a *c, u64 gpu_va) | 28 | int vgpu_gr_gv11b_commit_inst(struct channel_gk20a *c, u64 gpu_va) |
28 | { | 29 | { |
diff --git a/drivers/gpu/nvgpu/vgpu/gv11b/vgpu_subctx_gv11b.c b/drivers/gpu/nvgpu/vgpu/gv11b/vgpu_subctx_gv11b.c index ba92c8d5..2372b9c4 100644 --- a/drivers/gpu/nvgpu/vgpu/gv11b/vgpu_subctx_gv11b.c +++ b/drivers/gpu/nvgpu/vgpu/gv11b/vgpu_subctx_gv11b.c | |||
@@ -21,6 +21,7 @@ | |||
21 | */ | 21 | */ |
22 | 22 | ||
23 | #include "gk20a/gk20a.h" | 23 | #include "gk20a/gk20a.h" |
24 | #include "vgpu_subctx_gv11b.h" | ||
24 | 25 | ||
25 | #include <nvgpu/vgpu/vgpu.h> | 26 | #include <nvgpu/vgpu/vgpu.h> |
26 | #include <nvgpu/vgpu/tegra_vgpu.h> | 27 | #include <nvgpu/vgpu/tegra_vgpu.h> |
diff --git a/drivers/gpu/nvgpu/vgpu/mm_vgpu.c b/drivers/gpu/nvgpu/vgpu/mm_vgpu.c index 21496906..c10a1982 100644 --- a/drivers/gpu/nvgpu/vgpu/mm_vgpu.c +++ b/drivers/gpu/nvgpu/vgpu/mm_vgpu.c | |||
@@ -31,9 +31,6 @@ | |||
31 | #include <nvgpu/vgpu/vm.h> | 31 | #include <nvgpu/vgpu/vm.h> |
32 | #include <nvgpu/vgpu/vgpu.h> | 32 | #include <nvgpu/vgpu/vgpu.h> |
33 | 33 | ||
34 | #include <nvgpu/linux/vm.h> | ||
35 | #include <nvgpu/linux/nvgpu_mem.h> | ||
36 | |||
37 | #include "mm_vgpu.h" | 34 | #include "mm_vgpu.h" |
38 | #include "gk20a/gk20a.h" | 35 | #include "gk20a/gk20a.h" |
39 | #include "gk20a/mm_gk20a.h" | 36 | #include "gk20a/mm_gk20a.h" |