diff options
author | Thomas Fleury <tfleury@nvidia.com> | 2017-06-26 14:05:56 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-06-30 11:46:35 -0400 |
commit | e2c4832a219a7502448cb1084ce0ee48311b80b8 (patch) | |
tree | 2a7316b90502b03901e503462e4ea4eec43eec64 /drivers | |
parent | c12eb17340c90086f378c239da3d9015e7878f0c (diff) |
gpu: nvgpu: move mclk_init to pstate_pmu_support
Preparation for all clock changes should happen in
P-state module
Bug 1921094
Change-Id: I3bfa7d52eee5b40a41d80b362e064665081694a3
Signed-off-by: Thomas Fleury <tfleury@nvidia.com>
Reviewed-on: https://git-master/r/1508819
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.c | 11 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/pstate/pstate.c | 11 |
2 files changed, 11 insertions, 11 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c index 65197aca..7506c1dd 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a.c | |||
@@ -137,9 +137,6 @@ int gk20a_prepare_poweroff(struct gk20a *g) | |||
137 | ret |= gk20a_mm_suspend(g); | 137 | ret |= gk20a_mm_suspend(g); |
138 | ret |= gk20a_fifo_suspend(g); | 138 | ret |= gk20a_fifo_suspend(g); |
139 | 139 | ||
140 | if (g->ops.clk.mclk_deinit) | ||
141 | g->ops.clk.mclk_deinit(g); | ||
142 | |||
143 | /* Disable GPCPLL */ | 140 | /* Disable GPCPLL */ |
144 | if (g->ops.clk.suspend_clk_support) | 141 | if (g->ops.clk.suspend_clk_support) |
145 | ret |= g->ops.clk.suspend_clk_support(g); | 142 | ret |= g->ops.clk.suspend_clk_support(g); |
@@ -273,14 +270,6 @@ int gk20a_finalize_poweron(struct gk20a *g) | |||
273 | goto done; | 270 | goto done; |
274 | } | 271 | } |
275 | 272 | ||
276 | if (g->ops.clk.mclk_init) { | ||
277 | err = g->ops.clk.mclk_init(g); | ||
278 | if (err) { | ||
279 | nvgpu_err(g, "failed to set mclk"); | ||
280 | /* Indicate error dont goto done */ | ||
281 | } | ||
282 | } | ||
283 | |||
284 | #ifdef CONFIG_ARCH_TEGRA_18x_SOC | 273 | #ifdef CONFIG_ARCH_TEGRA_18x_SOC |
285 | if (g->ops.pmupstate) { | 274 | if (g->ops.pmupstate) { |
286 | err = gk20a_init_pstate_pmu_support(g); | 275 | err = gk20a_init_pstate_pmu_support(g); |
diff --git a/drivers/gpu/nvgpu/pstate/pstate.c b/drivers/gpu/nvgpu/pstate/pstate.c index 791832cb..4ce7268e 100644 --- a/drivers/gpu/nvgpu/pstate/pstate.c +++ b/drivers/gpu/nvgpu/pstate/pstate.c | |||
@@ -26,6 +26,9 @@ static int pstate_sw_setup(struct gk20a *g); | |||
26 | 26 | ||
27 | void gk20a_deinit_pstate_support(struct gk20a *g) | 27 | void gk20a_deinit_pstate_support(struct gk20a *g) |
28 | { | 28 | { |
29 | if (g->ops.clk.mclk_deinit) | ||
30 | g->ops.clk.mclk_deinit(g); | ||
31 | |||
29 | nvgpu_mutex_destroy(&g->perf_pmu.pstatesobjs.pstate_mutex); | 32 | nvgpu_mutex_destroy(&g->perf_pmu.pstatesobjs.pstate_mutex); |
30 | } | 33 | } |
31 | 34 | ||
@@ -104,6 +107,14 @@ int gk20a_init_pstate_pmu_support(struct gk20a *g) | |||
104 | 107 | ||
105 | gk20a_dbg_fn(""); | 108 | gk20a_dbg_fn(""); |
106 | 109 | ||
110 | if (g->ops.clk.mclk_init) { | ||
111 | err = g->ops.clk.mclk_init(g); | ||
112 | if (err) { | ||
113 | nvgpu_err(g, "failed to set mclk"); | ||
114 | /* Indicate error and continue */ | ||
115 | } | ||
116 | } | ||
117 | |||
107 | err = volt_rail_pmu_setup(g); | 118 | err = volt_rail_pmu_setup(g); |
108 | if (err) | 119 | if (err) |
109 | return err; | 120 | return err; |