summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gp10b/gr_gp10b.c
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2017-02-02 16:24:21 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2017-03-16 14:48:29 -0400
commit589d6385b19a357cf566b75ded9355f9b8053ad7 (patch)
tree6453c1d3525c6a53b7b749a39b51e4a598680a64 /drivers/gpu/nvgpu/gp10b/gr_gp10b.c
parent686c3b701fb1db75a0b416a25c288c04a396df31 (diff)
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 <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/1300113 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gp10b/gr_gp10b.c')
-rw-r--r--drivers/gpu/nvgpu/gp10b/gr_gp10b.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/gp10b/gr_gp10b.c b/drivers/gpu/nvgpu/gp10b/gr_gp10b.c
index 96919d2e..c4d097a7 100644
--- a/drivers/gpu/nvgpu/gp10b/gr_gp10b.c
+++ b/drivers/gpu/nvgpu/gp10b/gr_gp10b.c
@@ -13,7 +13,6 @@
13 * more details. 13 * more details.
14 */ 14 */
15 15
16#include <linux/clk.h>
17#include <linux/delay.h> 16#include <linux/delay.h>
18#include <linux/version.h> 17#include <linux/version.h>
19#include <linux/vmalloc.h> 18#include <linux/vmalloc.h>
@@ -2255,12 +2254,11 @@ static int gp10b_gr_fuse_override(struct gk20a *g)
2255 2254
2256static int gr_gp10b_init_preemption_state(struct gk20a *g) 2255static int gr_gp10b_init_preemption_state(struct gk20a *g)
2257{ 2256{
2258 struct gk20a_platform *platform = gk20a_get_platform(g->dev);
2259 u32 debug_2; 2257 u32 debug_2;
2260 u64 sysclk_rate; 2258 u64 sysclk_rate;
2261 u32 sysclk_cycles; 2259 u32 sysclk_cycles;
2262 2260
2263 sysclk_rate = platform->clk_get_rate(g->dev); 2261 sysclk_rate = g->ops.clk.get_rate(g, CTRL_CLK_DOMAIN_GPCCLK);
2264 sysclk_cycles = (u32)((sysclk_rate * NVGPU_GFXP_WFI_TIMEOUT_US) / 1000000ULL); 2262 sysclk_cycles = (u32)((sysclk_rate * NVGPU_GFXP_WFI_TIMEOUT_US) / 1000000ULL);
2265 gk20a_writel(g, gr_fe_gfxp_wfi_timeout_r(), 2263 gk20a_writel(g, gr_fe_gfxp_wfi_timeout_r(),
2266 gr_fe_gfxp_wfi_timeout_count_f(sysclk_cycles)); 2264 gr_fe_gfxp_wfi_timeout_count_f(sysclk_cycles));