From 1e125f245e95982d02746aab0fd2b9ea8db009f8 Mon Sep 17 00:00:00 2001 From: Peter Daifuku Date: Thu, 27 Sep 2018 17:23:37 -0700 Subject: gpu: nvgpu: support for clk.measure_freq for igpu Add support for the measure_freq clock op for igpu: - add nvgpu_clk_measure_freq(), which in turn calls the get_rate() clock op. - Initialize the measure_freq clock op to nvgpu_clk_measure_freq() for native linux and vgpu. JIRA ESRM-398 Change-Id: I8a3b2ee79e29e3491a16f55281494f05cd841b07 Signed-off-by: Peter Daifuku Reviewed-on: https://git-master.nvidia.com/r/1850585 Reviewed-by: svc-misra-checker GVS: Gerrit_Virtual_Submit Reviewed-by: Debarshi Dutta Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Nirav Patel Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/os/linux/clk.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/gpu/nvgpu/os') diff --git a/drivers/gpu/nvgpu/os/linux/clk.c b/drivers/gpu/nvgpu/os/linux/clk.c index e76720ac..36c13577 100644 --- a/drivers/gpu/nvgpu/os/linux/clk.c +++ b/drivers/gpu/nvgpu/os/linux/clk.c @@ -26,6 +26,7 @@ #include "platform_gk20a.h" #include +#include #define HZ_TO_MHZ(x) ((x) / 1000000) @@ -280,4 +281,5 @@ void nvgpu_linux_init_clk_support(struct gk20a *g) g->ops.clk.clk_domain_get_f_points = nvgpu_linux_clk_get_f_points; g->ops.clk.get_clk_range = nvgpu_clk_get_range; g->ops.clk.clk_get_round_rate = nvgpu_clk_get_round_rate; + g->ops.clk.measure_freq = nvgpu_clk_measure_freq; } -- cgit v1.2.2