From 1c7258411da89aea5279e9a8d117479928f8bf64 Mon Sep 17 00:00:00 2001 From: ddutta Date: Fri, 14 Sep 2018 10:48:48 +0530 Subject: gpu: nvgpu: expose linux clock controls via HAL Expose the linux specific clock implementations via the HAL interface to allow nvgpu to use the controls globally. This patch does the following. 1) Implement a new ops interface and a corresponding linux specific implementation for allowing nvgpu to iterate through a list of available clock frequencies via nvgpu_linux_clk_get_f_points(). 2) Implement nvgpu_linux_clk_get_range(). Bug 2061372 Change-Id: I7ce9a999dbdcd9fafcc84301af148545f6ca97a9 Signed-off-by: Debarshi Dutta Reviewed-on: https://git-master.nvidia.com/r/1774280 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/include/nvgpu/gk20a.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'drivers/gpu/nvgpu/include') diff --git a/drivers/gpu/nvgpu/include/nvgpu/gk20a.h b/drivers/gpu/nvgpu/include/nvgpu/gk20a.h index 8f2881ec..5821f742 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/gk20a.h +++ b/drivers/gpu/nvgpu/include/nvgpu/gk20a.h @@ -1086,6 +1086,10 @@ struct gpu_ops { int (*clk_domain_get_f_points)(struct gk20a *g, u32 clkapidomain, u32 *pfpointscount, u16 *pfreqpointsinmhz); + int (*clk_get_round_rate)(struct gk20a *g, u32 api_domain, + unsigned long rate_target, unsigned long *rounded_rate); + int (*get_clk_range)(struct gk20a *g, u32 api_domain, + u16 *min_mhz, u16 *max_mhz); unsigned long (*measure_freq)(struct gk20a *g, u32 api_domain); u32 (*get_rate_cntr)(struct gk20a *g, struct namemap_cfg *c); unsigned long (*get_rate)(struct gk20a *g, u32 api_domain); -- cgit v1.2.2