From 0ba14d89a6c5ddf1af254e48c7ebad2ccf359a94 Mon Sep 17 00:00:00 2001 From: Daniel Fu Date: Thu, 23 Aug 2018 02:32:44 +0800 Subject: Revert "gpu: nvgpu: avoid redundant enable/disable PG" This reverts commit 96d53bff8598a44fcec3f2492c8ec630d71d5dd0. Bug 2330230 Change-Id: Icd146e80bac0425fcb59f266f1d3582c40211739 Signed-off-by: Daniel Fu Reviewed-on: https://git-master.nvidia.com/r/1804753 Reviewed-by: svc-misra-checker GVS: Gerrit_Virtual_Submit Reviewed-by: Vijayakumar Subbu Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a') diff --git a/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c b/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c index 8307081e..3be08865 100644 --- a/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c @@ -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"); -- cgit v1.2.2