From 04470a984d3e91ea08b4b2a4db11341e7ee84640 Mon Sep 17 00:00:00 2001 From: Seema Khowala Date: Sat, 8 Jul 2017 20:51:26 -0700 Subject: 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 Reviewed-on: https://git-master.nvidia.com/r/1515778 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/gr_gk20a.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/gpu/nvgpu/gk20a') 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) 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); -- cgit v1.2.2