diff options
author | Alex Frid <afrid@nvidia.com> | 2018-05-10 22:44:22 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-05-22 18:08:01 -0400 |
commit | 0c80e197ea81043214b533c9c06c794da5aad877 (patch) | |
tree | 9352ea3609d07428bfa4b6c2655785b4232d83f7 /drivers/gpu/nvgpu/common/linux/clk.c | |
parent | e1cc49420aa478ac103bb8179ca1eca02caeb770 (diff) |
gpu: nvgpu: Add GPU Fmax@Vmin access through BPMP
On Tegra platforms that have clock management under BPMP, and do not
support Tegra DVFS, GPU driver cannot access Fmax@Vmin (get interface
always returns "0"). Added such access through BPMP DVFS shim driver.
Bug 2045903
Change-Id: I0222f2e2917cda15d18ea3296dd1fe53b2ea6b45
Signed-off-by: Alex Frid <afrid@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1722431
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux/clk.c')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/clk.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/clk.c b/drivers/gpu/nvgpu/common/linux/clk.c index a0e56455..414b17c4 100644 --- a/drivers/gpu/nvgpu/common/linux/clk.c +++ b/drivers/gpu/nvgpu/common/linux/clk.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/clk.h> | 19 | #include <linux/clk.h> |
20 | 20 | ||
21 | #include <soc/tegra/tegra-dvfs.h> | 21 | #include <soc/tegra/tegra-dvfs.h> |
22 | #include <soc/tegra/tegra-bpmp-dvfs.h> | ||
22 | 23 | ||
23 | #include "clk.h" | 24 | #include "clk.h" |
24 | #include "os_linux.h" | 25 | #include "os_linux.h" |
@@ -86,6 +87,8 @@ static int nvgpu_linux_clk_set_rate(struct gk20a *g, | |||
86 | 87 | ||
87 | static unsigned long nvgpu_linux_get_fmax_at_vmin_safe(struct gk20a *g) | 88 | static unsigned long nvgpu_linux_get_fmax_at_vmin_safe(struct gk20a *g) |
88 | { | 89 | { |
90 | struct gk20a_platform *platform = gk20a_get_platform(dev_from_gk20a(g)); | ||
91 | |||
89 | /* | 92 | /* |
90 | * On Tegra platforms with GPCPLL bus (gbus) GPU tegra_clk clock exposed | 93 | * On Tegra platforms with GPCPLL bus (gbus) GPU tegra_clk clock exposed |
91 | * to frequency governor is a shared user on the gbus. The latter can be | 94 | * to frequency governor is a shared user on the gbus. The latter can be |
@@ -95,6 +98,10 @@ static unsigned long nvgpu_linux_get_fmax_at_vmin_safe(struct gk20a *g) | |||
95 | return tegra_dvfs_get_fmax_at_vmin_safe_t( | 98 | return tegra_dvfs_get_fmax_at_vmin_safe_t( |
96 | clk_get_parent(g->clk.tegra_clk)); | 99 | clk_get_parent(g->clk.tegra_clk)); |
97 | 100 | ||
101 | if (platform->maxmin_clk_id) | ||
102 | return tegra_bpmp_dvfs_get_fmax_at_vmin( | ||
103 | platform->maxmin_clk_id); | ||
104 | |||
98 | return 0; | 105 | return 0; |
99 | } | 106 | } |
100 | 107 | ||