diff options
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/clk.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/clk.c b/drivers/gpu/nvgpu/common/linux/clk.c index a9888590..ea5b023d 100644 --- a/drivers/gpu/nvgpu/common/linux/clk.c +++ b/drivers/gpu/nvgpu/common/linux/clk.c | |||
@@ -106,9 +106,21 @@ static int nvgpu_linux_predict_mv_at_hz_cur_tfloor(struct clk_gk20a *clk, | |||
106 | clk_get_parent(clk->tegra_clk), rate); | 106 | clk_get_parent(clk->tegra_clk), rate); |
107 | } | 107 | } |
108 | 108 | ||
109 | static unsigned long nvgpu_linux_get_maxrate(struct clk_gk20a *clk) | 109 | static unsigned long nvgpu_linux_get_maxrate(struct gk20a *g, u32 api_domain) |
110 | { | 110 | { |
111 | return tegra_dvfs_get_maxrate(clk_get_parent(clk->tegra_clk)); | 111 | int ret; |
112 | |||
113 | switch (api_domain) { | ||
114 | case CTRL_CLK_DOMAIN_GPCCLK: | ||
115 | ret = tegra_dvfs_get_maxrate(clk_get_parent(g->clk.tegra_clk)); | ||
116 | break; | ||
117 | default: | ||
118 | nvgpu_err(g, "unknown clock: %u", api_domain); | ||
119 | ret = 0; | ||
120 | break; | ||
121 | } | ||
122 | |||
123 | return ret; | ||
112 | } | 124 | } |
113 | 125 | ||
114 | static int nvgpu_linux_prepare_enable(struct clk_gk20a *clk) | 126 | static int nvgpu_linux_prepare_enable(struct clk_gk20a *clk) |