From e2c4832a219a7502448cb1084ce0ee48311b80b8 Mon Sep 17 00:00:00 2001 From: Thomas Fleury Date: Mon, 26 Jun 2017 11:05:56 -0700 Subject: 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 Reviewed-on: https://git-master/r/1508819 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Vijayakumar Subbu Reviewed-by: Terje Bergstrom --- drivers/gpu/nvgpu/pstate/pstate.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'drivers/gpu/nvgpu/pstate') 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); void gk20a_deinit_pstate_support(struct gk20a *g) { + if (g->ops.clk.mclk_deinit) + g->ops.clk.mclk_deinit(g); + nvgpu_mutex_destroy(&g->perf_pmu.pstatesobjs.pstate_mutex); } @@ -104,6 +107,14 @@ int gk20a_init_pstate_pmu_support(struct gk20a *g) gk20a_dbg_fn(""); + if (g->ops.clk.mclk_init) { + err = g->ops.clk.mclk_init(g); + if (err) { + nvgpu_err(g, "failed to set mclk"); + /* Indicate error and continue */ + } + } + err = volt_rail_pmu_setup(g); if (err) return err; -- cgit v1.2.2