diff options
author | Seema Khowala <seemaj@nvidia.com> | 2018-03-27 01:31:56 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-03-29 16:53:50 -0400 |
commit | f81d83690f9d08be0daf8a488331fb04d9d23c46 (patch) | |
tree | 1590155c199a62cfd8811297c3d656d0733a5df4 /drivers/gpu/nvgpu/gv11b | |
parent | 8a64eea483d18ce603b049d5485e9f7a742da30b (diff) |
gpu: nvgpu: use gpc_tpc_count[gpc] for number of tpc in a gpc
Using tpc_count instead of gpc_tpc_count indexed by gpc, will result
in pbus error with decode error or client floorswept error codes.
tpc_count represents total number of tpc while gpc_tpc_count[gpc]
represents number of tpc in the indexed gpc.
Bug 1998067
Change-Id: I9adfb98a6c3e209cbb02a8cd5090f6b6adc1ec4b
Signed-off-by: Seema Khowala <seemaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1682469
Reviewed-by: Thomas Fleury <tfleury@nvidia.com>
Tested-by: Thomas Fleury <tfleury@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gv11b')
-rw-r--r-- | drivers/gpu/nvgpu/gv11b/gr_gv11b.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/gv11b/gr_gv11b.c b/drivers/gpu/nvgpu/gv11b/gr_gv11b.c index 4f517fa7..e0c60efb 100644 --- a/drivers/gpu/nvgpu/gv11b/gr_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/gr_gv11b.c | |||
@@ -939,7 +939,8 @@ void gr_gv11b_enable_gpc_exceptions(struct gk20a *g) | |||
939 | gr_gpcs_tpcs_tpccs_tpc_exception_en_mpc_enabled_f()); | 939 | gr_gpcs_tpcs_tpccs_tpc_exception_en_mpc_enabled_f()); |
940 | 940 | ||
941 | tpc_mask = | 941 | tpc_mask = |
942 | gr_gpcs_gpccs_gpc_exception_en_tpc_f((1 << gr->tpc_count) - 1); | 942 | gr_gpcs_gpccs_gpc_exception_en_tpc_f( |
943 | (1 << gr->max_tpc_per_gpc_count) - 1); | ||
943 | 944 | ||
944 | gk20a_writel(g, gr_gpcs_gpccs_gpc_exception_en_r(), | 945 | gk20a_writel(g, gr_gpcs_gpccs_gpc_exception_en_r(), |
945 | (tpc_mask | gr_gpcs_gpccs_gpc_exception_en_gcc_f(1) | | 946 | (tpc_mask | gr_gpcs_gpccs_gpc_exception_en_gcc_f(1) | |
@@ -1743,7 +1744,7 @@ static int gr_gv11b_dump_gr_sm_regs(struct gk20a *g, | |||
1743 | for (gpc = 0; gpc < g->gr.gpc_count; gpc++) { | 1744 | for (gpc = 0; gpc < g->gr.gpc_count; gpc++) { |
1744 | gpc_offset = gk20a_gr_gpc_offset(g, gpc); | 1745 | gpc_offset = gk20a_gr_gpc_offset(g, gpc); |
1745 | 1746 | ||
1746 | for (tpc = 0; tpc < g->gr.tpc_count; tpc++) { | 1747 | for (tpc = 0; tpc < g->gr.gpc_tpc_count[gpc]; tpc++) { |
1747 | tpc_offset = gk20a_gr_tpc_offset(g, tpc); | 1748 | tpc_offset = gk20a_gr_tpc_offset(g, tpc); |
1748 | 1749 | ||
1749 | for (sm = 0; sm < sm_per_tpc; sm++) { | 1750 | for (sm = 0; sm < sm_per_tpc; sm++) { |
@@ -4155,7 +4156,7 @@ static int gr_gv11b_ecc_scrub_is_done(struct gk20a *g, | |||
4155 | for (gpc = 0; gpc < g->gr.gpc_count; gpc++) { | 4156 | for (gpc = 0; gpc < g->gr.gpc_count; gpc++) { |
4156 | gpc_offset = gk20a_gr_gpc_offset(g, gpc); | 4157 | gpc_offset = gk20a_gr_gpc_offset(g, gpc); |
4157 | 4158 | ||
4158 | for (tpc = 0; tpc < g->gr.tpc_count; tpc++) { | 4159 | for (tpc = 0; tpc < g->gr.gpc_tpc_count[gpc]; tpc++) { |
4159 | tpc_offset = gk20a_gr_tpc_offset(g, tpc); | 4160 | tpc_offset = gk20a_gr_tpc_offset(g, tpc); |
4160 | 4161 | ||
4161 | do { | 4162 | do { |