diff options
author | Seema Khowala <seemaj@nvidia.com> | 2017-07-08 23:51:26 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-07-28 08:14:03 -0400 |
commit | 04470a984d3e91ea08b4b2a4db11341e7ee84640 (patch) | |
tree | bf3ccf4d00d24f993b7177b3b3ebf2a207436135 | |
parent | 02acac71b3def0f9a9c63eb7ca2e49e57c46e64d (diff) |
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>
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gr_gk20a.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c index 037f0df4..1fc57a56 100644 --- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c | |||
@@ -3203,6 +3203,7 @@ static int gr_gk20a_init_gr_config(struct gk20a *g, struct gr_gk20a *gr) | |||
3203 | u32 gpc_new_skip_mask; | 3203 | u32 gpc_new_skip_mask; |
3204 | u32 tmp; | 3204 | u32 tmp; |
3205 | u32 gpc_stride = nvgpu_get_litter_value(g, GPU_LIT_GPC_STRIDE); | 3205 | u32 gpc_stride = nvgpu_get_litter_value(g, GPU_LIT_GPC_STRIDE); |
3206 | u32 sm_per_tpc = nvgpu_get_litter_value(g, GPU_LIT_NUM_SM_PER_TPC); | ||
3206 | 3207 | ||
3207 | tmp = gk20a_readl(g, pri_ringmaster_enum_fbp_r()); | 3208 | tmp = gk20a_readl(g, pri_ringmaster_enum_fbp_r()); |
3208 | gr->num_fbps = pri_ringmaster_enum_fbp_count_v(tmp); | 3209 | 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) | |||
3338 | } | 3339 | } |
3339 | 3340 | ||
3340 | gr->sm_to_cluster = nvgpu_kzalloc(g, gr->gpc_count * gr->tpc_count * | 3341 | gr->sm_to_cluster = nvgpu_kzalloc(g, gr->gpc_count * gr->tpc_count * |
3341 | sizeof(struct sm_info)); | 3342 | sm_per_tpc * sizeof(struct sm_info)); |
3342 | gr->no_of_sm = 0; | 3343 | gr->no_of_sm = 0; |
3343 | 3344 | ||
3344 | gk20a_dbg_info("fbps: %d", gr->num_fbps); | 3345 | gk20a_dbg_info("fbps: %d", gr->num_fbps); |