diff options
author | Debarshi Dutta <ddutta@nvidia.com> | 2019-05-03 04:41:52 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2019-05-09 17:42:14 -0400 |
commit | 4d8ad643d67ac4044f76976c4085a35fcc5d4095 (patch) | |
tree | 6b829f294bf4a6ff453cf08edd11bdaf5e620abb /drivers/gpu/nvgpu/common/power_features/power_features.c | |
parent | bdaacf544127fcfaa474ccb5466aa93f81382416 (diff) |
gpu: nvgpu: wait for gr.initialized before changing cg/pg
set gr.initialized to false in the beginning of gk20a_gr_reset() and
set it to true at the end of successful execution of gk20a_gr_reset.
Use gk20a_gr_wait_initialized() to enable/disable cg/pg
functions to make sure engine is out of reset and initialized.
Bug 2092051
Bug 2429295
Bug 2484211
Bug 1890287
Change-Id: Ic7b0b71382c6d852a625c603dad8609c43b7f20f
Signed-off-by: Seema Khowala <seemaj@nvidia.com>
Signed-off-by: Debarshi Dutta <ddutta@nvidia.com>
(cherry-picked from 7e2f124fd12caf37172f12da8de65093622941a5 in
dev-kernel)
Reviewed-on: https://git-master.nvidia.com/r/2111038
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/common/power_features/power_features.c')
-rw-r--r-- | drivers/gpu/nvgpu/common/power_features/power_features.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/common/power_features/power_features.c b/drivers/gpu/nvgpu/common/power_features/power_features.c index 792fdc01..7f52ba8e 100644 --- a/drivers/gpu/nvgpu/common/power_features/power_features.c +++ b/drivers/gpu/nvgpu/common/power_features/power_features.c | |||
@@ -31,6 +31,8 @@ int nvgpu_cg_pg_disable(struct gk20a *g) | |||
31 | 31 | ||
32 | nvgpu_log_fn(g, " "); | 32 | nvgpu_log_fn(g, " "); |
33 | 33 | ||
34 | gk20a_gr_wait_initialized(g); | ||
35 | |||
34 | /* disable elpg before clock gating */ | 36 | /* disable elpg before clock gating */ |
35 | err = nvgpu_pg_elpg_disable(g); | 37 | err = nvgpu_pg_elpg_disable(g); |
36 | if (err != 0) { | 38 | if (err != 0) { |
@@ -51,6 +53,8 @@ int nvgpu_cg_pg_enable(struct gk20a *g) | |||
51 | 53 | ||
52 | nvgpu_log_fn(g, " "); | 54 | nvgpu_log_fn(g, " "); |
53 | 55 | ||
56 | gk20a_gr_wait_initialized(g); | ||
57 | |||
54 | nvgpu_cg_elcg_enable(g); | 58 | nvgpu_cg_elcg_enable(g); |
55 | 59 | ||
56 | nvgpu_cg_blcg_mode_enable(g); | 60 | nvgpu_cg_blcg_mode_enable(g); |