summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorPeter Daifuku <pdaifuku@nvidia.com>2016-11-30 18:58:10 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2016-12-08 04:40:13 -0500
commitdd075c39bb94f195ca70683f5a767093e2901900 (patch)
treebdea946aa16ca3de5a4d364c9f4e0be2e85c89ba /drivers
parent9bc735ac6a0776f76604f91b6c2659450aef3028 (diff)
gpu: nvgpu: fix pes_tpc_count
In calculation of pes_tpc_count, accumulate the number of PEs with TPCs connected to them instead of using the architectural maximum number. Bug 200250616 Change-Id: I4b2edc420ac03e24f2c298587d4dd1d77c51f5d6 Signed-off-by: Peter Daifuku <pdaifuku@nvidia.com> Reviewed-on: http://git-master/r/1262642 (cherry picked from commit 65723cf5be8fe24bcaf56570883f0880a198efcb) Reviewed-on: http://git-master/r/1263958 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Vladislav Buzov <vbuzov@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gr_gk20a.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
index 06d3a008..7e5984d3 100644
--- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
@@ -3371,9 +3371,6 @@ static int gr_gk20a_init_gr_config(struct gk20a *g, struct gr_gk20a *gr)
3371 gr_gpc0_fs_gpc_num_available_zculls_v(tmp); 3371 gr_gpc0_fs_gpc_num_available_zculls_v(tmp);
3372 gr->zcb_count += gr->gpc_zcb_count[gpc_index]; 3372 gr->zcb_count += gr->gpc_zcb_count[gpc_index];
3373 3373
3374 gr->gpc_ppc_count[gpc_index] = gr->pe_count_per_gpc;
3375 gr->ppc_count += gr->gpc_ppc_count[gpc_index];
3376
3377 if (g->ops.gr.get_gpc_tpc_mask) 3374 if (g->ops.gr.get_gpc_tpc_mask)
3378 gr->gpc_tpc_mask[gpc_index] = 3375 gr->gpc_tpc_mask[gpc_index] =
3379 g->ops.gr.get_gpc_tpc_mask(g, gpc_index); 3376 g->ops.gr.get_gpc_tpc_mask(g, gpc_index);
@@ -3398,10 +3395,18 @@ static int gr_gk20a_init_gr_config(struct gk20a *g, struct gr_gk20a *gr)
3398 pes_tpc_mask = gr_gpc0_gpm_pd_pes_tpc_id_mask_mask_v(tmp); 3395 pes_tpc_mask = gr_gpc0_gpm_pd_pes_tpc_id_mask_mask_v(tmp);
3399 pes_tpc_count = count_bits(pes_tpc_mask); 3396 pes_tpc_count = count_bits(pes_tpc_mask);
3400 3397
3398 /* detect PES presence by seeing if there are
3399 * TPCs connected to it.
3400 */
3401 if (pes_tpc_count != 0)
3402 gr->gpc_ppc_count[gpc_index]++;
3403
3401 gr->pes_tpc_count[pes_index][gpc_index] = pes_tpc_count; 3404 gr->pes_tpc_count[pes_index][gpc_index] = pes_tpc_count;
3402 gr->pes_tpc_mask[pes_index][gpc_index] = pes_tpc_mask; 3405 gr->pes_tpc_mask[pes_index][gpc_index] = pes_tpc_mask;
3403 } 3406 }
3404 3407
3408 gr->ppc_count += gr->gpc_ppc_count[gpc_index];
3409
3405 gpc_new_skip_mask = 0; 3410 gpc_new_skip_mask = 0;
3406 if (gr->pe_count_per_gpc > 1 && 3411 if (gr->pe_count_per_gpc > 1 &&
3407 gr->pes_tpc_count[0][gpc_index] + 3412 gr->pes_tpc_count[0][gpc_index] +