summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gm20b/gr_gm20b.c
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2017-02-16 12:29:15 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2017-02-17 18:30:58 -0500
commitc218fefe848893c9e4fa6b44ac65439444e47b04 (patch)
treedafb1ce230be964796220b5957ad7585d9307c7c /drivers/gpu/nvgpu/gm20b/gr_gm20b.c
parent4b8edeffe56685a9a3bdb9440af6376bb3bded61 (diff)
gpu: nvgpu: Fix unicast register accesses for SM
In two places we used broadcast register as base, but added the unicast offset to it. This causes the write to go well beyond valid register range. Change the broadcast base to use unicast base instead in sequence to resume a single SM and to record error state of SM. Bug 200256272 Change-Id: I4ca9af2bb5877dba20ab96575f5094d42949c9e2 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> (cherry-picked from commit 04177b3414535ce5092c8baeae29883bada9d36c) Reviewed-on: http://git-master/r/1306331 Reviewed-by: Automatic_Commit_Validation_User
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 0e0d3f62..0375d71f 100644
--- a/drivers/gpu/nvgpu/gm20b/gr_gm20b.c
+++ b/drivers/gpu/nvgpu/gm20b/gr_gm20b.c
@@ -1259,9 +1259,9 @@ static int gm20b_gr_record_sm_error_state(struct gk20a *g, u32 gpc, u32 tpc)
1259 gr->sm_error_states[sm_id].hww_warp_esr_pc = gk20a_readl(g, 1259 gr->sm_error_states[sm_id].hww_warp_esr_pc = gk20a_readl(g,
1260 gr_gpc0_tpc0_sm_hww_warp_esr_pc_r() + offset); 1260 gr_gpc0_tpc0_sm_hww_warp_esr_pc_r() + offset);
1261 gr->sm_error_states[sm_id].hww_global_esr_report_mask = gk20a_readl(g, 1261 gr->sm_error_states[sm_id].hww_global_esr_report_mask = gk20a_readl(g,
1262 gr_gpcs_tpcs_sm_hww_global_esr_report_mask_r() + offset); 1262 gr_gpc0_tpc0_sm_hww_global_esr_report_mask_r() + offset);
1263 gr->sm_error_states[sm_id].hww_warp_esr_report_mask = gk20a_readl(g, 1263 gr->sm_error_states[sm_id].hww_warp_esr_report_mask = gk20a_readl(g,
1264 gr_gpcs_tpcs_sm_hww_warp_esr_report_mask_r() + offset); 1264 gr_gpc0_tpc0_sm_hww_warp_esr_report_mask_r() + offset);
1265 1265
1266 mutex_unlock(&g->dbg_sessions_lock); 1266 mutex_unlock(&g->dbg_sessions_lock);
1267 1267