From b17d9708c9e9930778de43de1edf1385acb13ebd Mon Sep 17 00:00:00 2001 From: Vijayakumar Subbu Date: Wed, 27 Jul 2016 22:29:15 -0700 Subject: gpu: nvgpu: Add dGPU clocks support JIRA DNVGPU-45 Change-Id: I237ce81e31b036c05c82d46eea8694ffe1c2e3df Signed-off-by: Mahantesh Kumbar Signed-off-by: Vijayakumar Subbu Reviewed-on: http://git-master/r/1205849 (cherry picked from commit 9a4006f76b75a8ad525e7aa5ad1f609aaae49126) Reviewed-on: http://git-master/r/1227256 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/gk20a.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'drivers/gpu/nvgpu/gk20a/gk20a.c') diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c index ebe2dca4..c9f84041 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a.c @@ -63,6 +63,9 @@ #include "hal.h" #include "vgpu/vgpu.h" #include "pci.h" +#ifdef CONFIG_ARCH_TEGRA_18x_SOC +#include "pstate/pstate.h" +#endif #define CREATE_TRACE_POINTS #include @@ -956,6 +959,16 @@ int gk20a_pm_finalize_poweron(struct device *dev) goto done; } +#ifdef CONFIG_ARCH_TEGRA_18x_SOC + if (g->ops.pmupstate) { + err = gk20a_init_pstate_support(g); + if (err) { + gk20a_err(dev, "failed to init pstates"); + goto done; + } + } +#endif + err = gk20a_init_pmu_support(g); if (err) { gk20a_err(dev, "failed to init gk20a pmu"); @@ -968,6 +981,16 @@ int gk20a_pm_finalize_poweron(struct device *dev) goto done; } +#ifdef CONFIG_ARCH_TEGRA_18x_SOC + if (g->ops.pmupstate) { + err = gk20a_init_pstate_pmu_support(g); + if (err) { + gk20a_err(dev, "failed to init pstates"); + goto done; + } + } +#endif + if (g->ops.pmu.mclk_init) { err = g->ops.pmu.mclk_init(g); if (err) { -- cgit v1.2.2