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>
This commit is contained in:
ddutta
2018-09-14 10:48:48 +05:30
committed by mobile promotions
parent feefb7046a
commit 1c7258411d
6 changed files with 158 additions and 0 deletions

View File

@@ -274,6 +274,9 @@ struct gk20a_platform {
/* scaling rate */
unsigned long cached_rate;
/* synchronized access to platform->clk_get_freqs */
struct nvgpu_mutex clk_get_freq_lock;
};
static inline struct gk20a_platform *gk20a_get_platform(