diff options
author | Neil Gabriel <ngabriel@nvidia.com> | 2014-06-26 19:02:32 -0400 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2015-03-18 15:11:12 -0400 |
commit | ed0c49a0b160f234f70474d299b2740e950158b8 (patch) | |
tree | 70df8f903fda7aaaa63e9ea55064aac29a7cce0f /drivers/gpu | |
parent | 1bc3b3436f25a8a1de3dd336984dfaa014737a16 (diff) |
gpu: nvgpu: Initialize ELPG ref-count early.
gk20a_pmu_disable_elpg can be called before the PMU driver has
received and processed the INIT message from the PMU. If change
ensures that the ELPG ref-count has been initialized to zero
before that can happen.
Bug 200016313
Change-Id: Ic80ec1ee69b1eb0499effb1abf556f78cb041f5e
Signed-off-by: Neil Gabriel <ngabriel@nvidia.com>
Reviewed-on: http://git-master/r/429161
Reviewed-on: http://git-master/r/433299
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Robert Shih <rshih@nvidia.com>
Tested-by: Robert Shih <rshih@nvidia.com>
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/pmu_gk20a.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c b/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c index f77ad10b..9d52c943 100644 --- a/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c | |||
@@ -1915,6 +1915,9 @@ int gk20a_init_pmu_setup_sw(struct gk20a *g) | |||
1915 | 1915 | ||
1916 | gk20a_dbg_fn(""); | 1916 | gk20a_dbg_fn(""); |
1917 | 1917 | ||
1918 | /* start with elpg disabled until first enable call */ | ||
1919 | pmu->elpg_refcnt = 0; | ||
1920 | |||
1918 | if (pmu->sw_ready) { | 1921 | if (pmu->sw_ready) { |
1919 | for (i = 0; i < pmu->mutex_cnt; i++) { | 1922 | for (i = 0; i < pmu->mutex_cnt; i++) { |
1920 | pmu->mutex[i].id = i; | 1923 | pmu->mutex[i].id = i; |
@@ -2478,9 +2481,6 @@ static int pmu_init_powergating(struct pmu_gk20a *pmu) | |||
2478 | gk20a_pmu_cmd_post(g, &cmd, NULL, NULL, PMU_COMMAND_QUEUE_HPQ, | 2481 | gk20a_pmu_cmd_post(g, &cmd, NULL, NULL, PMU_COMMAND_QUEUE_HPQ, |
2479 | pmu_handle_pg_elpg_msg, pmu, &seq, ~0); | 2482 | pmu_handle_pg_elpg_msg, pmu, &seq, ~0); |
2480 | 2483 | ||
2481 | /* start with elpg disabled until first enable call */ | ||
2482 | pmu->elpg_refcnt = 0; | ||
2483 | |||
2484 | pmu->pmu_state = PMU_STATE_ELPG_BOOTING; | 2484 | pmu->pmu_state = PMU_STATE_ELPG_BOOTING; |
2485 | 2485 | ||
2486 | return 0; | 2486 | return 0; |