From 744d5a5212936fd453bacc46be52e6aeef076a69 Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Fri, 10 Nov 2017 10:53:51 -0800 Subject: 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 Reviewed-on: https://git-master.nvidia.com/r/1597329 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/gk20a.c | 2 +- drivers/gpu/nvgpu/gk20a/gk20a.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a') diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c index ab3d86be..8f67da69 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a.c @@ -466,7 +466,7 @@ int gk20a_init_gpu_characteristics(struct gk20a *g) gpu->cbc_comptags_per_line = g->gr.comptags_per_cacheline; if (g->ops.clk.get_maxrate) - gpu->max_freq = g->ops.clk.get_maxrate(&g->clk); + gpu->max_freq = g->ops.clk.get_maxrate(g, CTRL_CLK_DOMAIN_GPCCLK); gpu->local_video_memory_size = g->mm.vidmem.size; diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h index 4bc5c04b..fb12d0d2 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gk20a.h @@ -880,7 +880,7 @@ struct gpu_ops { u32 (*get_ref_clock_rate)(struct gk20a *g); int (*predict_mv_at_hz_cur_tfloor)(struct clk_gk20a *clk, unsigned long rate); - unsigned long (*get_maxrate)(struct clk_gk20a *clk); + unsigned long (*get_maxrate)(struct gk20a *g, u32 api_domain); int (*prepare_enable)(struct clk_gk20a *clk); void (*disable_unprepare)(struct clk_gk20a *clk); int (*get_voltage)(struct clk_gk20a *clk, u64 *val); -- cgit v1.2.2