From 964a849d6176da362c375d7d72b94289e9b905de Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Mon, 30 Oct 2017 13:24:20 -0700 Subject: gpu: nvgpu: Use get_maxfreq HAL Use the get_maxfreq HAL for filling max frequency for GPU characteristics. JIRA NVGPU-259 Change-Id: I754495ae83a5e513cc09497649f6bf4eee7057ad Signed-off-by: Terje Bergstrom Reviewed-on: https://git-master.nvidia.com/r/1588661 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/gk20a.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'drivers') diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c index e4bfce7f..a4afba63 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a.c @@ -390,7 +390,6 @@ int gk20a_wait_for_idle(struct gk20a *g) int gk20a_init_gpu_characteristics(struct gk20a *g) { struct nvgpu_gpu_characteristics *gpu = &g->gpu_characteristics; - struct gk20a_platform *platform = dev_get_drvdata(dev_from_gk20a(g)); gpu->L2_cache_size = g->ops.ltc.determine_L2_size_bytes(g); gpu->on_board_video_memory_size = 0; /* integrated GPU */ @@ -485,9 +484,8 @@ int gk20a_init_gpu_characteristics(struct gk20a *g) gpu->map_buffer_batch_limit = 256; - if (platform->clk_round_rate) - gpu->max_freq = platform->clk_round_rate(dev_from_gk20a(g), - UINT_MAX); + if (g->ops.clk.get_maxrate) + gpu->max_freq = g->ops.clk.get_maxrate(&g->clk); g->ops.gr.get_preemption_mode_flags(g, &g->gr.preemption_mode_rec); gpu->graphics_preemption_mode_flags = -- cgit v1.2.2