diff options
author | Richard Zhao <rizhao@nvidia.com> | 2017-08-21 18:36:11 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-08-28 20:04:31 -0400 |
commit | 1ac8f6477df7bd1e1b1c5922b1916ae6450c07ad (patch) | |
tree | cf18b5052e7d0173e48c8f1aa89e07fadf5b3384 /drivers | |
parent | 866165749a0b7b2e6b219bb26bffd69d790d97c5 (diff) |
gpu: nvgpu: vgpu: add TEGRA_VGPU_ATTRIB_MAX_SUBCTX_COUNT
Get max subctx count from RM server.
Jira VFND-3797
Change-Id: I95de2271a77bedfa8703231fa45da05c7d2da3e6
Signed-off-by: Richard Zhao <rizhao@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1543018
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/nvgpu/vgpu/gv11b/vgpu_fifo_gv11b.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/vgpu/gv11b/vgpu_fifo_gv11b.c b/drivers/gpu/nvgpu/vgpu/gv11b/vgpu_fifo_gv11b.c index b9df58ec..f8f021b7 100644 --- a/drivers/gpu/nvgpu/vgpu/gv11b/vgpu_fifo_gv11b.c +++ b/drivers/gpu/nvgpu/vgpu/gv11b/vgpu_fifo_gv11b.c | |||
@@ -14,13 +14,31 @@ | |||
14 | #include <gk20a/gk20a.h> | 14 | #include <gk20a/gk20a.h> |
15 | #include <vgpu/gp10b/vgpu_fifo_gp10b.h> | 15 | #include <vgpu/gp10b/vgpu_fifo_gp10b.h> |
16 | 16 | ||
17 | #include "vgpu/vgpu.h" | ||
18 | |||
17 | #include "vgpu_fifo_gv11b.h" | 19 | #include "vgpu_fifo_gv11b.h" |
18 | #include "vgpu_subctx_gv11b.h" | 20 | #include "vgpu_subctx_gv11b.h" |
19 | 21 | ||
22 | static int vgpu_gv11b_init_fifo_setup_hw(struct gk20a *g) | ||
23 | { | ||
24 | struct fifo_gk20a *f = &g->fifo; | ||
25 | int err; | ||
26 | |||
27 | err = vgpu_get_attribute(vgpu_get_handle(g), | ||
28 | TEGRA_VGPU_ATTRIB_MAX_SUBCTX_COUNT, | ||
29 | &f->t19x.max_subctx_count); | ||
30 | if (err) { | ||
31 | nvgpu_err(g, "get max_subctx_count failed %d", err); | ||
32 | return err; | ||
33 | } | ||
34 | |||
35 | return 0; | ||
36 | } | ||
37 | |||
20 | void vgpu_gv11b_init_fifo_ops(struct gpu_ops *gops) | 38 | void vgpu_gv11b_init_fifo_ops(struct gpu_ops *gops) |
21 | { | 39 | { |
22 | vgpu_gp10b_init_fifo_ops(gops); | 40 | vgpu_gp10b_init_fifo_ops(gops); |
23 | 41 | ||
24 | gops->fifo.init_fifo_setup_hw = NULL; | 42 | gops->fifo.init_fifo_setup_hw = vgpu_gv11b_init_fifo_setup_hw; |
25 | gops->fifo.free_channel_ctx_header = vgpu_gv11b_free_subctx_header; | 43 | gops->fifo.free_channel_ctx_header = vgpu_gv11b_free_subctx_header; |
26 | } | 44 | } |