summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/include
diff options
context:
space:
mode:
authorddutta <ddutta@nvidia.com>2018-09-14 01:18:48 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-09-20 13:50:02 -0400
commit1c7258411da89aea5279e9a8d117479928f8bf64 (patch)
tree854c2a248bf7b88141ecb3f27e804fa8065a0983 /drivers/gpu/nvgpu/include
parentfeefb7046a88311d88a37ad2cc934ec7b9a9c28f (diff)
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 <ddutta@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1774280 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/include')
-rw-r--r--drivers/gpu/nvgpu/include/nvgpu/gk20a.h4
1 files changed, 4 insertions, 0 deletions
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 {
1086 int (*clk_domain_get_f_points)(struct gk20a *g, 1086 int (*clk_domain_get_f_points)(struct gk20a *g,
1087 u32 clkapidomain, u32 *pfpointscount, 1087 u32 clkapidomain, u32 *pfpointscount,
1088 u16 *pfreqpointsinmhz); 1088 u16 *pfreqpointsinmhz);
1089 int (*clk_get_round_rate)(struct gk20a *g, u32 api_domain,
1090 unsigned long rate_target, unsigned long *rounded_rate);
1091 int (*get_clk_range)(struct gk20a *g, u32 api_domain,
1092 u16 *min_mhz, u16 *max_mhz);
1089 unsigned long (*measure_freq)(struct gk20a *g, u32 api_domain); 1093 unsigned long (*measure_freq)(struct gk20a *g, u32 api_domain);
1090 u32 (*get_rate_cntr)(struct gk20a *g, struct namemap_cfg *c); 1094 u32 (*get_rate_cntr)(struct gk20a *g, struct namemap_cfg *c);
1091 unsigned long (*get_rate)(struct gk20a *g, u32 api_domain); 1095 unsigned long (*get_rate)(struct gk20a *g, u32 api_domain);