diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gv11b/subctx_gv11b.c')
-rw-r--r-- | drivers/gpu/nvgpu/gv11b/subctx_gv11b.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gv11b/subctx_gv11b.c b/drivers/gpu/nvgpu/gv11b/subctx_gv11b.c index 4d68926f..c3ff9185 100644 --- a/drivers/gpu/nvgpu/gv11b/subctx_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/subctx_gv11b.c | |||
@@ -25,6 +25,7 @@ | |||
25 | 25 | ||
26 | #include <nvgpu/hw/gv11b/hw_ram_gv11b.h> | 26 | #include <nvgpu/hw/gv11b/hw_ram_gv11b.h> |
27 | #include <nvgpu/hw/gv11b/hw_ctxsw_prog_gv11b.h> | 27 | #include <nvgpu/hw/gv11b/hw_ctxsw_prog_gv11b.h> |
28 | #include <nvgpu/hw/gv11b/hw_gr_gv11b.h> | ||
28 | 29 | ||
29 | static void gv11b_init_subcontext_pdb(struct channel_gk20a *c, | 30 | static void gv11b_init_subcontext_pdb(struct channel_gk20a *c, |
30 | struct nvgpu_mem *inst_block); | 31 | struct nvgpu_mem *inst_block); |
@@ -147,3 +148,10 @@ int gv11b_update_subctx_header(struct channel_gk20a *c, u64 gpu_va) | |||
147 | nvgpu_mem_end(g, gr_mem); | 148 | nvgpu_mem_end(g, gr_mem); |
148 | return ret; | 149 | return ret; |
149 | } | 150 | } |
151 | |||
152 | int gv11b_get_max_subctx_count(struct gk20a *g) | ||
153 | { | ||
154 | u32 data = gk20a_readl(g, gr_pri_fe_chip_def_info_r()); | ||
155 | |||
156 | return gr_pri_fe_chip_def_info_max_veid_count_v(data); | ||
157 | } | ||