diff options
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/nvgpu/gv11b/gr_gv11b.c | 3 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gv11b/subctx_gv11b.c | 8 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gv11b/subctx_gv11b.h | 4 |
3 files changed, 12 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/gv11b/gr_gv11b.c b/drivers/gpu/nvgpu/gv11b/gr_gv11b.c index 5b0526b0..33a5067e 100644 --- a/drivers/gpu/nvgpu/gv11b/gr_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/gr_gv11b.c | |||
@@ -1649,10 +1649,9 @@ static void gv11b_write_bundle_veid_state(struct gk20a *g, u32 index) | |||
1649 | struct av_list_gk20a *sw_veid_bundle_init = | 1649 | struct av_list_gk20a *sw_veid_bundle_init = |
1650 | &g->gr.ctx_vars.sw_veid_bundle_init; | 1650 | &g->gr.ctx_vars.sw_veid_bundle_init; |
1651 | u32 j; | 1651 | u32 j; |
1652 | u32 data = gk20a_readl(g, gr_pri_fe_chip_def_info_r()); | ||
1653 | u32 num_subctx, err = 0; | 1652 | u32 num_subctx, err = 0; |
1654 | 1653 | ||
1655 | num_subctx = gr_pri_fe_chip_def_info_max_veid_count_v(data); | 1654 | num_subctx = gv11b_get_max_subctx_count(g); |
1656 | 1655 | ||
1657 | for (j = 0; j < num_subctx; j++) { | 1656 | for (j = 0; j < num_subctx; j++) { |
1658 | 1657 | ||
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 | } | ||
diff --git a/drivers/gpu/nvgpu/gv11b/subctx_gv11b.h b/drivers/gpu/nvgpu/gv11b/subctx_gv11b.h index 357cd254..fdfe9e3b 100644 --- a/drivers/gpu/nvgpu/gv11b/subctx_gv11b.h +++ b/drivers/gpu/nvgpu/gv11b/subctx_gv11b.h | |||
@@ -2,7 +2,7 @@ | |||
2 | * | 2 | * |
3 | * Volta GPU series Subcontext | 3 | * Volta GPU series Subcontext |
4 | * | 4 | * |
5 | * Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved. | 5 | * Copyright (c) 2016 - 2017, NVIDIA CORPORATION. All rights reserved. |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify it | 7 | * This program is free software; you can redistribute it and/or modify it |
8 | * under the terms and conditions of the GNU General Public License, | 8 | * under the terms and conditions of the GNU General Public License, |
@@ -24,4 +24,6 @@ int gv11b_alloc_subctx_header(struct channel_gk20a *c); | |||
24 | void gv11b_free_subctx_header(struct channel_gk20a *c); | 24 | void gv11b_free_subctx_header(struct channel_gk20a *c); |
25 | 25 | ||
26 | int gv11b_update_subctx_header(struct channel_gk20a *c, u64 gpu_va); | 26 | int gv11b_update_subctx_header(struct channel_gk20a *c, u64 gpu_va); |
27 | |||
28 | int gv11b_get_max_subctx_count(struct gk20a *g); | ||
27 | #endif /* __SUBCONTEXT_GV11B_H__ */ | 29 | #endif /* __SUBCONTEXT_GV11B_H__ */ |