gpu: nvgpu: support multiple sm for t19x

Allocate memory for sm_to_cluster to support multiple sm

Bug 1951026

Change-Id: I48256f097fbc95e4432950a7e8de62577819a025
Signed-off-by: Seema Khowala <seemaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1515778
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Seema Khowala
2017-07-08 20:51:26 -07:00
committed by mobile promotions
parent 02acac71b3
commit 04470a984d

View File

@@ -3203,6 +3203,7 @@ static int gr_gk20a_init_gr_config(struct gk20a *g, struct gr_gk20a *gr)
u32 gpc_new_skip_mask;
u32 tmp;
u32 gpc_stride = nvgpu_get_litter_value(g, GPU_LIT_GPC_STRIDE);
u32 sm_per_tpc = nvgpu_get_litter_value(g, GPU_LIT_NUM_SM_PER_TPC);
tmp = gk20a_readl(g, pri_ringmaster_enum_fbp_r());
gr->num_fbps = pri_ringmaster_enum_fbp_count_v(tmp);
@@ -3338,7 +3339,7 @@ static int gr_gk20a_init_gr_config(struct gk20a *g, struct gr_gk20a *gr)
}
gr->sm_to_cluster = nvgpu_kzalloc(g, gr->gpc_count * gr->tpc_count *
sizeof(struct sm_info));
sm_per_tpc * sizeof(struct sm_info));
gr->no_of_sm = 0;
gk20a_dbg_info("fbps: %d", gr->num_fbps);