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/gk20a | |
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/gk20a')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gr_gk20a.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c index 9d85a5ef..cf63546b 100644 --- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c | |||
@@ -4417,7 +4417,7 @@ void gk20a_gr_enable_gpc_exceptions(struct gk20a *g) | |||
4417 | gr_gpcs_tpcs_tpccs_tpc_exception_en_sm_enabled_f()); | 4417 | gr_gpcs_tpcs_tpccs_tpc_exception_en_sm_enabled_f()); |
4418 | 4418 | ||
4419 | tpc_mask = | 4419 | tpc_mask = |
4420 | gr_gpcs_gpccs_gpc_exception_en_tpc_f((1 << gr->tpc_count) - 1); | 4420 | gr_gpcs_gpccs_gpc_exception_en_tpc_f((1 << gr->max_tpc_per_gpc_count) - 1); |
4421 | 4421 | ||
4422 | gk20a_writel(g, gr_gpcs_gpccs_gpc_exception_en_r(), tpc_mask); | 4422 | gk20a_writel(g, gr_gpcs_gpccs_gpc_exception_en_r(), tpc_mask); |
4423 | } | 4423 | } |
@@ -5792,7 +5792,7 @@ static int gk20a_gr_handle_gpc_exception(struct gk20a *g, bool *post_event, | |||
5792 | + gpc_offset); | 5792 | + gpc_offset); |
5793 | 5793 | ||
5794 | /* check if any tpc has an exception */ | 5794 | /* check if any tpc has an exception */ |
5795 | for (tpc = 0; tpc < gr->tpc_count; tpc++) { | 5795 | for (tpc = 0; tpc < gr->gpc_tpc_count[gpc]; tpc++) { |
5796 | if ((gr_gpc0_gpccs_gpc_exception_tpc_v(gpc_exception) & | 5796 | if ((gr_gpc0_gpccs_gpc_exception_tpc_v(gpc_exception) & |
5797 | (1 << tpc)) == 0) | 5797 | (1 << tpc)) == 0) |
5798 | continue; | 5798 | continue; |
@@ -8674,7 +8674,7 @@ int gr_gk20a_clear_sm_errors(struct gk20a *g) | |||
8674 | for (gpc = 0; gpc < gr->gpc_count; gpc++) { | 8674 | for (gpc = 0; gpc < gr->gpc_count; gpc++) { |
8675 | 8675 | ||
8676 | /* check if any tpc has an exception */ | 8676 | /* check if any tpc has an exception */ |
8677 | for (tpc = 0; tpc < gr->tpc_count; tpc++) { | 8677 | for (tpc = 0; tpc < gr->gpc_tpc_count[gpc]; tpc++) { |
8678 | 8678 | ||
8679 | for (sm = 0; sm < sm_per_tpc; sm++) { | 8679 | for (sm = 0; sm < sm_per_tpc; sm++) { |
8680 | global_esr = g->ops.gr.get_sm_hww_global_esr(g, | 8680 | global_esr = g->ops.gr.get_sm_hww_global_esr(g, |