diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2016-05-19 14:43:29 -0400 |
---|---|---|
committer | Deepak Nibade <dnibade@nvidia.com> | 2016-12-27 04:56:16 -0500 |
commit | 21eda905ea69a0e090f6e29c444a9129c65f0b1f (patch) | |
tree | 3d78ae483547231b166c4cb804d26cdef14987a1 | |
parent | 49cedb9650d178ad5653b55885d022aacbd66f61 (diff) |
gpu: nvgpu: Fix SM number when more than 4 TPCs
Use multiplication instead of division to come up with an SM id.
Change-Id: Ib185970ee99cc8c010d02ba846229e0959a5fef3
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/1150599
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Alex Waterman <alexw@nvidia.com>
-rw-r--r-- | drivers/gpu/nvgpu/gp10b/gr_gp10b.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gp10b/gr_gp10b.c b/drivers/gpu/nvgpu/gp10b/gr_gp10b.c index ebe11c67..3c04c2e4 100644 --- a/drivers/gpu/nvgpu/gp10b/gr_gp10b.c +++ b/drivers/gpu/nvgpu/gp10b/gr_gp10b.c | |||
@@ -1399,7 +1399,7 @@ static int gr_gp10b_load_smid_config(struct gk20a *g) | |||
1399 | gr_cwd_gpc_tpc_id_tpc0_s(); | 1399 | gr_cwd_gpc_tpc_id_tpc0_s(); |
1400 | 1400 | ||
1401 | for (j = 0; j < 4; j++) { | 1401 | for (j = 0; j < 4; j++) { |
1402 | u32 sm_id = (i / 4) + j; | 1402 | u32 sm_id = (i * 4) + j; |
1403 | u32 bits; | 1403 | u32 bits; |
1404 | 1404 | ||
1405 | if (sm_id >= g->gr.tpc_count) | 1405 | if (sm_id >= g->gr.tpc_count) |