From 9e908d2a8dfb986d2acd024b986ba9917cfe71b1 Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Thu, 19 May 2016 11:45:06 -0700 Subject: gpu: nvgpu: gp10b: Fix SM number when more than 4 TPCs Use multiplication instead of division to come up with an SM id. Change-Id: I01b76bf1ba5f64e34b6a283306fcd7687c1302ed Signed-off-by: Terje Bergstrom Reviewed-on: http://git-master/r/1150600 --- drivers/gpu/nvgpu/gm20b/gr_gm20b.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/gpu/nvgpu/gm20b/gr_gm20b.c') diff --git a/drivers/gpu/nvgpu/gm20b/gr_gm20b.c b/drivers/gpu/nvgpu/gm20b/gr_gm20b.c index 3b0a399d..84b36232 100644 --- a/drivers/gpu/nvgpu/gm20b/gr_gm20b.c +++ b/drivers/gpu/nvgpu/gm20b/gr_gm20b.c @@ -586,7 +586,7 @@ static int gr_gm20b_load_smid_config(struct gk20a *g) gr_cwd_gpc_tpc_id_tpc0_s(); for (j = 0; j < 4; j++) { - u32 sm_id = (i / 4) + j; + u32 sm_id = (i * 4) + j; u32 bits; if (sm_id >= g->gr.tpc_count) -- cgit v1.2.2