summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gm20b/gr_gm20b.c
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2016-05-19 14:45:06 -0400
committerTerje Bergstrom <tbergstrom@nvidia.com>2016-05-20 16:59:34 -0400
commit9e908d2a8dfb986d2acd024b986ba9917cfe71b1 (patch)
tree3ddafe0da2b1cfebf883ac73284ce8634848a43e /drivers/gpu/nvgpu/gm20b/gr_gm20b.c
parent72ae2dedf56e8d8f252497e7cadc80dd9c90ff81 (diff)
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 <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/1150600
Diffstat (limited to 'drivers/gpu/nvgpu/gm20b/gr_gm20b.c')
-rw-r--r--drivers/gpu/nvgpu/gm20b/gr_gm20b.c2
1 files changed, 1 insertions, 1 deletions
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)
586 gr_cwd_gpc_tpc_id_tpc0_s(); 586 gr_cwd_gpc_tpc_id_tpc0_s();
587 587
588 for (j = 0; j < 4; j++) { 588 for (j = 0; j < 4; j++) {
589 u32 sm_id = (i / 4) + j; 589 u32 sm_id = (i * 4) + j;
590 u32 bits; 590 u32 bits;
591 591
592 if (sm_id >= g->gr.tpc_count) 592 if (sm_id >= g->gr.tpc_count)