Skip to content

Commit

Permalink
Revert "drm/nouveau: pmu: Change the init value of elpg_disable_depth…
Browse files Browse the repository at this point in the history
… to 1"

This reverts commit b575426.

Changing the default value is causing the existing logic(to
enable/disable ELPG) to fail.

BUG=none
TEST=See ELPG stats to confirm ELPG entry/exit.

Change-Id: I0f951686937b9e264a0bb5858667fe68a441b34e
Signed-off-by: Deepak Goyal <dgoyal@nvidia.com>
Reviewed-on: https://chromium-review.googlesource.com/311550
Commit-Ready: Mark Zhang <markz@nvidia.com>
Tested-by: Mark Zhang <markz@nvidia.com>
Reviewed-by: Mark Zhang <markz@nvidia.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
  • Loading branch information
Deepak Goyal authored and chrome-bot committed Nov 11, 2015
1 parent a003d7b commit 41b5f71
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
10 changes: 5 additions & 5 deletions drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gk20a.c
Original file line number Diff line number Diff line change
Expand Up @@ -3180,11 +3180,7 @@ gk20a_pmu_init(struct nvkm_object *object)
nvkm_timer_alarm(priv, PMU_DVFS_INTERVAL, &priv->alarm);

mutex_lock(&priv->elpg_mutex);
/*
* ELPG will be enabled when PMU finishes booting, so setting the
* counter to 1 initialy.
*/
priv->elpg_disable_depth = 1;
priv->elpg_disable_depth = 0;
mutex_unlock(&priv->elpg_mutex);

mutex_lock(&priv->clk_gating_mutex);
Expand All @@ -3206,6 +3202,10 @@ gk20a_pmu_fini(struct nvkm_object *object, bool suspend)
cancel_work_sync(&priv->base.recv.work);
cancel_work_sync(&priv->pg_init);

mutex_lock(&priv->elpg_mutex);
priv->elpg_disable_depth = 0;
mutex_unlock(&priv->elpg_mutex);

mutex_lock(&priv->clk_gating_mutex);
priv->clk_gating_disable_depth = 0;
mutex_unlock(&priv->clk_gating_mutex);
Expand Down
9 changes: 4 additions & 5 deletions drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gm20b.c
Original file line number Diff line number Diff line change
Expand Up @@ -2592,6 +2592,9 @@ gm20b_pmu_fini(struct nvkm_object *object, bool suspend)
gk20a_pmu_enable(priv, pmc, false);
priv->isr_enabled = false;
mutex_unlock(&priv->isr_mutex);
mutex_lock(&priv->elpg_mutex);
priv->elpg_disable_depth = 0;
mutex_unlock(&priv->elpg_mutex);
priv->pmu_state = PMU_STATE_OFF;
mutex_lock(&priv->clk_gating_mutex);
priv->clk_gating_disable_depth = 0;
Expand Down Expand Up @@ -2668,11 +2671,7 @@ gm20b_pmu_init(struct nvkm_object *object) {
priv->pmu_setup_elpg = gm20b_pmu_setup_elpg;

mutex_lock(&priv->elpg_mutex);
/*
* ELPG will be enabled when PMU finishes booting, so setting the
* counter to 1 initialy.
*/
priv->elpg_disable_depth = 1;
priv->elpg_disable_depth = 0;
mutex_unlock(&priv->elpg_mutex);

mutex_lock(&priv->clk_gating_mutex);
Expand Down

0 comments on commit 41b5f71

Please sign in to comment.