mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
gpu: nvgpu: vgpu: Implement clk.get_maxfreq
Modify HAL clk->get_maxfreq() signature to match the one in clk->set_rate() and clk->get_rate(). It allows support of multiple clocks. Implement clk.get_maxfreq operation for vgpu and use it to fill max_freq field in GPU characteristics query. JIRA NVGPU-388 Change-Id: I93bfc2aa76e38b8a5e0ac55d87c4e26df6fea77f Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1597329 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
5944f49f55
commit
744d5a5212
@@ -106,9 +106,21 @@ static int nvgpu_linux_predict_mv_at_hz_cur_tfloor(struct clk_gk20a *clk,
|
||||
clk_get_parent(clk->tegra_clk), rate);
|
||||
}
|
||||
|
||||
static unsigned long nvgpu_linux_get_maxrate(struct clk_gk20a *clk)
|
||||
static unsigned long nvgpu_linux_get_maxrate(struct gk20a *g, u32 api_domain)
|
||||
{
|
||||
return tegra_dvfs_get_maxrate(clk_get_parent(clk->tegra_clk));
|
||||
int ret;
|
||||
|
||||
switch (api_domain) {
|
||||
case CTRL_CLK_DOMAIN_GPCCLK:
|
||||
ret = tegra_dvfs_get_maxrate(clk_get_parent(g->clk.tegra_clk));
|
||||
break;
|
||||
default:
|
||||
nvgpu_err(g, "unknown clock: %u", api_domain);
|
||||
ret = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int nvgpu_linux_prepare_enable(struct clk_gk20a *clk)
|
||||
|
||||
Reference in New Issue
Block a user