summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gr_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gr_gk20a.c21
1 files changed, 4 insertions, 17 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
index d2c77c93..4bedcc9a 100644
--- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
@@ -5501,21 +5501,6 @@ bool gk20a_gr_sm_debugger_attached(struct gk20a *g)
5501 return false; 5501 return false;
5502} 5502}
5503 5503
5504void gk20a_gr_clear_sm_hww(struct gk20a *g,
5505 u32 gpc, u32 tpc, u32 global_esr)
5506{
5507 u32 gpc_stride = nvgpu_get_litter_value(g, GPU_LIT_GPC_STRIDE);
5508 u32 tpc_in_gpc_stride = nvgpu_get_litter_value(g, GPU_LIT_TPC_IN_GPC_STRIDE);
5509 u32 offset = gpc_stride * gpc + tpc_in_gpc_stride * tpc;
5510
5511 gk20a_writel(g, gr_gpc0_tpc0_sm_hww_global_esr_r() + offset,
5512 global_esr);
5513
5514 /* clear the warp hww */
5515 gk20a_writel(g, gr_gpc0_tpc0_sm_hww_warp_esr_r() + offset,
5516 gr_gpc0_tpc0_sm_hww_warp_esr_error_none_f());
5517}
5518
5519int gr_gk20a_handle_sm_exception(struct gk20a *g, u32 gpc, u32 tpc, u32 sm, 5504int gr_gk20a_handle_sm_exception(struct gk20a *g, u32 gpc, u32 tpc, u32 sm,
5520 bool *post_event, struct channel_gk20a *fault_ch, 5505 bool *post_event, struct channel_gk20a *fault_ch,
5521 u32 *hww_global_esr) 5506 u32 *hww_global_esr)
@@ -5678,7 +5663,8 @@ static int gk20a_gr_handle_tpc_exception(struct gk20a *g, u32 gpc, u32 tpc,
5678 /* clear the hwws, also causes tpc and gpc 5663 /* clear the hwws, also causes tpc and gpc
5679 * exceptions to be cleared 5664 * exceptions to be cleared
5680 */ 5665 */
5681 gk20a_gr_clear_sm_hww(g, gpc, tpc, *hww_global_esr); 5666 g->ops.gr.clear_sm_hww(g,
5667 gpc, tpc, sm, *hww_global_esr);
5682 5668
5683 } 5669 }
5684 5670
@@ -8439,7 +8425,8 @@ int gr_gk20a_clear_sm_errors(struct gk20a *g)
8439 /* clearing hwws, also causes tpc and gpc 8425 /* clearing hwws, also causes tpc and gpc
8440 * exceptions to be cleared 8426 * exceptions to be cleared
8441 */ 8427 */
8442 gk20a_gr_clear_sm_hww(g, gpc, tpc, global_esr); 8428 g->ops.gr.clear_sm_hww(g,
8429 gpc, tpc, sm, global_esr);
8443 } 8430 }
8444 } 8431 }
8445 } 8432 }