summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gm20b/gr_gm20b.c
diff options
context:
space:
mode:
authorRichard Zhao <rizhao@nvidia.com>2018-06-06 23:46:03 -0400
committerTejal Kudav <tkudav@nvidia.com>2018-06-14 09:44:08 -0400
commit6a46965eb3b7b657c089142579ab20d6efefc0fc (patch)
tree60aa4098d4b50af9db21e316098cfbe35c9a4797 /drivers/gpu/nvgpu/gm20b/gr_gm20b.c
parent7a5d498a711833990a9d8fc3f5d3f3e26bee301c (diff)
gpu: nvgpu: correct calculation of sm_id for .record_sm_error_state
Starting with Volta, one TPC could have more than 1 SMs. So .record_sm_error_state needs to have sm number as parameter. Logic tpc id should be read from gr_gpc0_gpm_pd_sm_id_r. Let the function return logical sm_id. RM server will need it to nofify client. Jira EVLR-2643 Bug 200405202 Change-Id: Iffaff05b89b1c5058616b8a6bf50dd73bd4e52f6 Signed-off-by: Richard Zhao <rizhao@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1742165 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gm20b/gr_gm20b.c')
-rw-r--r--drivers/gpu/nvgpu/gm20b/gr_gm20b.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gm20b/gr_gm20b.c b/drivers/gpu/nvgpu/gm20b/gr_gm20b.c
index 331c3af9..261c3054 100644
--- a/drivers/gpu/nvgpu/gm20b/gr_gm20b.c
+++ b/drivers/gpu/nvgpu/gm20b/gr_gm20b.c
@@ -1278,7 +1278,7 @@ void gr_gm20b_get_access_map(struct gk20a *g,
1278 *num_entries = ARRAY_SIZE(wl_addr_gm20b); 1278 *num_entries = ARRAY_SIZE(wl_addr_gm20b);
1279} 1279}
1280 1280
1281int gm20b_gr_record_sm_error_state(struct gk20a *g, u32 gpc, u32 tpc, 1281int gm20b_gr_record_sm_error_state(struct gk20a *g, u32 gpc, u32 tpc, u32 sm,
1282 struct channel_gk20a *fault_ch) 1282 struct channel_gk20a *fault_ch)
1283{ 1283{
1284 int sm_id; 1284 int sm_id;
@@ -1306,7 +1306,7 @@ int gm20b_gr_record_sm_error_state(struct gk20a *g, u32 gpc, u32 tpc,
1306 1306
1307 nvgpu_mutex_release(&g->dbg_sessions_lock); 1307 nvgpu_mutex_release(&g->dbg_sessions_lock);
1308 1308
1309 return 0; 1309 return sm_id;
1310} 1310}
1311 1311
1312int gm20b_gr_update_sm_error_state(struct gk20a *g, 1312int gm20b_gr_update_sm_error_state(struct gk20a *g,