summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Fu <danifu@nvidia.com>2018-08-22 14:32:44 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-08-31 04:32:59 -0400
commit0ba14d89a6c5ddf1af254e48c7ebad2ccf359a94 (patch)
tree5bad6c951207713a55330d3d3307e36cb827bf04
parent79b10cbcf7d1544dd5acfda6ba1ab79c4c855377 (diff)
Revert "gpu: nvgpu: avoid redundant enable/disable PG"
This reverts commit 96d53bff8598a44fcec3f2492c8ec630d71d5dd0. 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>
-rw-r--r--drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c14
1 files changed, 2 insertions, 12 deletions
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)
233 return err; 233 return err;
234 234
235 /*do elpg disable before clock gating */ 235 /*do elpg disable before clock gating */
236 236 nvgpu_pmu_pg_global_enable(g, false);
237 /* we should not disabled it again, if it's already so */
238 if (g->elpg_enabled) {
239 g->elpg_enabled = false;
240 nvgpu_pmu_pg_global_enable(g, false);
241 }
242 237
243 if (g->ops.clock_gating.slcg_gr_load_gating_prod) 238 if (g->ops.clock_gating.slcg_gr_load_gating_prod)
244 g->ops.clock_gating.slcg_gr_load_gating_prod(g, 239 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)
282 slcg_gr_load_gating_prod(g, 277 slcg_gr_load_gating_prod(g,
283 g->slcg_enabled); 278 g->slcg_enabled);
284 } 279 }
285 280 nvgpu_pmu_pg_global_enable(g, true);
286 /* we should not enable it again, if it's already so */
287 if (!g->elpg_enabled) {
288 g->elpg_enabled = true;
289 nvgpu_pmu_pg_global_enable(g, true);
290 }
291 281
292 nvgpu_log(g, gpu_dbg_gpu_dbg | gpu_dbg_fn, 282 nvgpu_log(g, gpu_dbg_gpu_dbg | gpu_dbg_fn,
293 "module idle"); 283 "module idle");