From 29b688960fcf6279f58d95f7e17f31ef15129a80 Mon Sep 17 00:00:00 2001 From: Seema Khowala Date: Sun, 2 Jul 2017 15:39:27 -0700 Subject: gpu: nvgpu: add suspend_all_sms gr ops This is required to support multiple SM and t19x sm register address changes JIRA GPUT19X-75 Change-Id: Icdae3b6ed67a3d3deeb17f29528184b2d7a70af5 Signed-off-by: Seema Khowala Reviewed-on: https://git-master/r/1512215 GVS: Gerrit_Virtual_Submit Reviewed-by: Vijayakumar Subbu --- drivers/gpu/nvgpu/gk20a/gr_gk20a.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a/gr_gk20a.c') 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) * Return number of TPCs in a GPC * Return 0 if GPC index is invalid i.e. GPC is disabled */ -static u32 gr_gk20a_get_tpc_count(struct gr_gk20a *gr, u32 gpc_index) +u32 gr_gk20a_get_tpc_count(struct gr_gk20a *gr, u32 gpc_index) { if (gpc_index >= gr->gpc_count) return 0; @@ -8047,7 +8047,7 @@ void gk20a_gr_suspend_single_sm(struct gk20a *g, } } -void gk20a_suspend_all_sms(struct gk20a *g, +void gk20a_gr_suspend_all_sms(struct gk20a *g, u32 global_esr_mask, bool check_errors) { struct gr_gk20a *gr = &g->gr; @@ -8062,8 +8062,10 @@ void gk20a_suspend_all_sms(struct gk20a *g, return; } + nvgpu_log(g, gpu_dbg_fn | gpu_dbg_gpu_dbg, "suspending all sms"); /* assert stop trigger. uniformity assumption: all SMs will have - * the same state in dbg_control0. */ + * the same state in dbg_control0. + */ dbgr_control0 = gk20a_readl(g, gr_gpc0_tpc0_sm_dbgr_control0_r()); 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) bool ctx_resident = false; if (gk20a_is_channel_ctx_resident(ch)) { - gk20a_suspend_all_sms(g, 0, false); + g->ops.gr.suspend_all_sms(g, 0, false); ctx_resident = true; } else { gk20a_disable_channel_tsg(g, ch); -- cgit v1.2.2