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.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
index 64b991a2..f6857b66 100644
--- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
@@ -1147,7 +1147,7 @@ void gr_gk20a_init_sm_id_table(struct gk20a *g)
1147 * Return number of TPCs in a GPC 1147 * Return number of TPCs in a GPC
1148 * Return 0 if GPC index is invalid i.e. GPC is disabled 1148 * Return 0 if GPC index is invalid i.e. GPC is disabled
1149 */ 1149 */
1150static u32 gr_gk20a_get_tpc_count(struct gr_gk20a *gr, u32 gpc_index) 1150u32 gr_gk20a_get_tpc_count(struct gr_gk20a *gr, u32 gpc_index)
1151{ 1151{
1152 if (gpc_index >= gr->gpc_count) 1152 if (gpc_index >= gr->gpc_count)
1153 return 0; 1153 return 0;
@@ -8047,7 +8047,7 @@ void gk20a_gr_suspend_single_sm(struct gk20a *g,
8047 } 8047 }
8048} 8048}
8049 8049
8050void gk20a_suspend_all_sms(struct gk20a *g, 8050void gk20a_gr_suspend_all_sms(struct gk20a *g,
8051 u32 global_esr_mask, bool check_errors) 8051 u32 global_esr_mask, bool check_errors)
8052{ 8052{
8053 struct gr_gk20a *gr = &g->gr; 8053 struct gr_gk20a *gr = &g->gr;
@@ -8062,8 +8062,10 @@ void gk20a_suspend_all_sms(struct gk20a *g,
8062 return; 8062 return;
8063 } 8063 }
8064 8064
8065 nvgpu_log(g, gpu_dbg_fn | gpu_dbg_gpu_dbg, "suspending all sms");
8065 /* assert stop trigger. uniformity assumption: all SMs will have 8066 /* assert stop trigger. uniformity assumption: all SMs will have
8066 * the same state in dbg_control0. */ 8067 * the same state in dbg_control0.
8068 */
8067 dbgr_control0 = 8069 dbgr_control0 =
8068 gk20a_readl(g, gr_gpc0_tpc0_sm_dbgr_control0_r()); 8070 gk20a_readl(g, gr_gpc0_tpc0_sm_dbgr_control0_r());
8069 dbgr_control0 |= gr_gpcs_tpcs_sm_dbgr_control0_stop_trigger_enable_f(); 8071 dbgr_control0 |= gr_gpcs_tpcs_sm_dbgr_control0_stop_trigger_enable_f();
@@ -8221,7 +8223,7 @@ bool gr_gk20a_suspend_context(struct channel_gk20a *ch)
8221 bool ctx_resident = false; 8223 bool ctx_resident = false;
8222 8224
8223 if (gk20a_is_channel_ctx_resident(ch)) { 8225 if (gk20a_is_channel_ctx_resident(ch)) {
8224 gk20a_suspend_all_sms(g, 0, false); 8226 g->ops.gr.suspend_all_sms(g, 0, false);
8225 ctx_resident = true; 8227 ctx_resident = true;
8226 } else { 8228 } else {
8227 gk20a_disable_channel_tsg(g, ch); 8229 gk20a_disable_channel_tsg(g, ch);