summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/os/linux/platform_gv11b_tegra.c
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/os/linux/platform_gv11b_tegra.c
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/os/linux/platform_gv11b_tegra.c')
-rw-r--r--drivers/gpu/nvgpu/os/linux/platform_gv11b_tegra.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/os/linux/platform_gv11b_tegra.c b/drivers/gpu/nvgpu/os/linux/platform_gv11b_tegra.c
index 1b4a5456..b055eb6e 100644
--- a/drivers/gpu/nvgpu/os/linux/platform_gv11b_tegra.c
+++ b/drivers/gpu/nvgpu/os/linux/platform_gv11b_tegra.c
@@ -97,6 +97,8 @@ static int gv11b_tegra_probe(struct device *dev)
97 gp10b_tegra_get_clocks(dev); 97 gp10b_tegra_get_clocks(dev);
98 nvgpu_linux_init_clk_support(platform->g); 98 nvgpu_linux_init_clk_support(platform->g);
99 99
100 nvgpu_mutex_init(&platform->clk_get_freq_lock);
101
100 return 0; 102 return 0;
101} 103}
102 104
@@ -108,12 +110,16 @@ static int gv11b_tegra_late_probe(struct device *dev)
108 110
109static int gv11b_tegra_remove(struct device *dev) 111static int gv11b_tegra_remove(struct device *dev)
110{ 112{
113 struct gk20a_platform *platform = gk20a_get_platform(dev);
114
111 gv11b_tegra_scale_exit(dev); 115 gv11b_tegra_scale_exit(dev);
112 116
113#ifdef CONFIG_TEGRA_GK20A_NVHOST 117#ifdef CONFIG_TEGRA_GK20A_NVHOST
114 nvgpu_free_nvhost_dev(get_gk20a(dev)); 118 nvgpu_free_nvhost_dev(get_gk20a(dev));
115#endif 119#endif
116 120
121 nvgpu_mutex_destroy(&platform->clk_get_freq_lock);
122
117 return 0; 123 return 0;
118} 124}
119 125