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.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
index 4c1a61a9..64b991a2 100644
--- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
@@ -8013,16 +8013,13 @@ int gk20a_gr_wait_for_sm_lock_down(struct gk20a *g, u32 gpc, u32 tpc,
8013 return -ETIMEDOUT; 8013 return -ETIMEDOUT;
8014} 8014}
8015 8015
8016void gk20a_suspend_single_sm(struct gk20a *g, 8016void gk20a_gr_suspend_single_sm(struct gk20a *g,
8017 u32 gpc, u32 tpc, 8017 u32 gpc, u32 tpc, u32 sm,
8018 u32 global_esr_mask, bool check_errors) 8018 u32 global_esr_mask, bool check_errors)
8019{ 8019{
8020 u32 offset;
8021 int err; 8020 int err;
8022 u32 dbgr_control0; 8021 u32 dbgr_control0;
8023 u32 gpc_stride = nvgpu_get_litter_value(g, GPU_LIT_GPC_STRIDE); 8022 u32 offset = gk20a_gr_gpc_offset(g, gpc) + gk20a_gr_tpc_offset(g, tpc);
8024 u32 tpc_in_gpc_stride = nvgpu_get_litter_value(g, GPU_LIT_TPC_IN_GPC_STRIDE);
8025 offset = gpc_stride * gpc + tpc_in_gpc_stride * tpc;
8026 8023
8027 /* if an SM debugger isn't attached, skip suspend */ 8024 /* if an SM debugger isn't attached, skip suspend */
8028 if (!g->ops.gr.sm_debugger_attached(g)) { 8025 if (!g->ops.gr.sm_debugger_attached(g)) {
@@ -8031,6 +8028,9 @@ void gk20a_suspend_single_sm(struct gk20a *g,
8031 return; 8028 return;
8032 } 8029 }
8033 8030
8031 nvgpu_log(g, gpu_dbg_fn | gpu_dbg_gpu_dbg,
8032 "suspending gpc:%d, tpc:%d, sm%d", gpc, tpc, sm);
8033
8034 /* assert stop trigger. */ 8034 /* assert stop trigger. */
8035 dbgr_control0 = gk20a_readl(g, 8035 dbgr_control0 = gk20a_readl(g,
8036 gr_gpc0_tpc0_sm_dbgr_control0_r() + offset); 8036 gr_gpc0_tpc0_sm_dbgr_control0_r() + offset);