Revert "gpu: nvgpu: avoid redundant enable/disable PG"

This reverts commit 96d53bff85.

Bug 2330230

Change-Id: Icd146e80bac0425fcb59f266f1d3582c40211739
Signed-off-by: Daniel Fu <danifu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1804753
Reviewed-by: svc-misra-checker <svc-misra-checker@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Daniel Fu
2018-08-23 02:32:44 +08:00
committed by mobile promotions
parent 79b10cbcf7
commit 0ba14d89a6

View File

@@ -233,12 +233,7 @@ int dbg_set_powergate(struct dbg_session_gk20a *dbg_s, bool disable_powergate)
return err;
/*do elpg disable before clock gating */
/* we should not disabled it again, if it's already so */
if (g->elpg_enabled) {
g->elpg_enabled = false;
nvgpu_pmu_pg_global_enable(g, false);
}
nvgpu_pmu_pg_global_enable(g, false);
if (g->ops.clock_gating.slcg_gr_load_gating_prod)
g->ops.clock_gating.slcg_gr_load_gating_prod(g,
@@ -282,12 +277,7 @@ int dbg_set_powergate(struct dbg_session_gk20a *dbg_s, bool disable_powergate)
slcg_gr_load_gating_prod(g,
g->slcg_enabled);
}
/* we should not enable it again, if it's already so */
if (!g->elpg_enabled) {
g->elpg_enabled = true;
nvgpu_pmu_pg_global_enable(g, true);
}
nvgpu_pmu_pg_global_enable(g, true);
nvgpu_log(g, gpu_dbg_gpu_dbg | gpu_dbg_fn,
"module idle");