From 589d6385b19a357cf566b75ded9355f9b8053ad7 Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Thu, 2 Feb 2017 13:24:21 -0800 Subject: gpu: nvgpu: Implement get_rate/set_rate as GPU op Move clock APIs from gk20a_platform to gpu_ops. At the same time allow use of internal get_rate/set_rate for querying both GPCCLK and PWRCLK on iGPU. At the same time we can replace calls to clk framework with the new HAL and drop direct dependency to clk framework. gp10b ops were replaced as a whole at HAL initialization. That replaces anything set in platform probe stage, so reduce that to touch only clock gating regs. Change-Id: Iaf219b1f000d362dbf397d45832f52d25463b31c Signed-off-by: Terje Bergstrom Reviewed-on: http://git-master/r/1300113 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gp106/acr_gp106.c | 1 - drivers/gpu/nvgpu/gp106/clk_gp106.c | 2 -- drivers/gpu/nvgpu/gp106/hal_gp106.c | 2 +- 3 files changed, 1 insertion(+), 4 deletions(-) (limited to 'drivers/gpu/nvgpu/gp106') diff --git a/drivers/gpu/nvgpu/gp106/acr_gp106.c b/drivers/gpu/nvgpu/gp106/acr_gp106.c index 37a3d152..8c744a73 100644 --- a/drivers/gpu/nvgpu/gp106/acr_gp106.c +++ b/drivers/gpu/nvgpu/gp106/acr_gp106.c @@ -13,7 +13,6 @@ #include /* for mdelay */ #include -#include #include #include #include diff --git a/drivers/gpu/nvgpu/gp106/clk_gp106.c b/drivers/gpu/nvgpu/gp106/clk_gp106.c index 6bc4f3b0..487ba3c3 100644 --- a/drivers/gpu/nvgpu/gp106/clk_gp106.c +++ b/drivers/gpu/nvgpu/gp106/clk_gp106.c @@ -16,12 +16,10 @@ * along with this program. If not, see . */ -#include #include /* for mdelay */ #include #include #include -#include #include #include "gk20a/gk20a.h" diff --git a/drivers/gpu/nvgpu/gp106/hal_gp106.c b/drivers/gpu/nvgpu/gp106/hal_gp106.c index d07223c9..a05b71ab 100644 --- a/drivers/gpu/nvgpu/gp106/hal_gp106.c +++ b/drivers/gpu/nvgpu/gp106/hal_gp106.c @@ -218,7 +218,7 @@ int gp106_init_hal(struct gk20a *g) gk20a_dbg_fn(""); - *gops = gp106_ops; + gops->clock_gating = gp106_ops.clock_gating; gops->privsecurity = 1; gops->securegpccs = 1; -- cgit v1.2.2