From 968d8cd3e543b951714d9a86373bd721d08c8482 Mon Sep 17 00:00:00 2001 From: seshendra Gadagottu Date: Sat, 30 Dec 2017 16:51:52 -0800 Subject: gpu: nvgpu: gv11b: enable devfreq Enable devfreq for gv11b by enabling ""nvhost_podgov" governor in platform data. Reuse scaling functions from gp10b/gk20a. Remove emc floor on railgate for power saving and make max emc frequency as floor in rail-ungate for faster gpu boot. Bug 2039013 Bug 200377508 Change-Id: I65ee7735202e3decbe3451157f7fc1f1f273c3ff Signed-off-by: seshendra Gadagottu Reviewed-on: https://git-master.nvidia.com/r/1639752 Reviewed-by: svc-mobile-coverity GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/linux/platform_gp10b_tegra.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'drivers/gpu/nvgpu/common/linux/platform_gp10b_tegra.c') diff --git a/drivers/gpu/nvgpu/common/linux/platform_gp10b_tegra.c b/drivers/gpu/nvgpu/common/linux/platform_gp10b_tegra.c index 8a964caf..b6593d7a 100644 --- a/drivers/gpu/nvgpu/common/linux/platform_gp10b_tegra.c +++ b/drivers/gpu/nvgpu/common/linux/platform_gp10b_tegra.c @@ -1,7 +1,7 @@ /* * GP10B Tegra Platform Interface * - * Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2014-2018, NVIDIA CORPORATION. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, @@ -150,7 +150,7 @@ static int gp10b_tegra_probe(struct device *dev) return 0; } -static int gp10b_tegra_late_probe(struct device *dev) +int gp10b_tegra_late_probe(struct device *dev) { /* Cause early VPR resize */ gk20a_tegra_secure_page_alloc(dev); @@ -262,7 +262,7 @@ int gp10b_tegra_reset_deassert(struct device *dev) return ret; } -static void gp10b_tegra_prescale(struct device *dev) +void gp10b_tegra_prescale(struct device *dev) { struct gk20a *g = get_gk20a(dev); u32 avg = 0; @@ -274,7 +274,7 @@ static void gp10b_tegra_prescale(struct device *dev) gk20a_dbg_fn("done"); } -static void gp10b_tegra_postscale(struct device *pdev, +void gp10b_tegra_postscale(struct device *pdev, unsigned long freq) { struct gk20a_platform *platform = gk20a_get_platform(pdev); @@ -283,7 +283,7 @@ static void gp10b_tegra_postscale(struct device *pdev, unsigned long emc_rate; gk20a_dbg_fn(""); - if (profile && !gp10b_tegra_is_railgated(pdev)) { + if (profile && !platform->is_railgated(pdev)) { unsigned long emc_scale; if (freq <= gp10b_freq_table[0]) @@ -303,7 +303,7 @@ static void gp10b_tegra_postscale(struct device *pdev, gk20a_dbg_fn("done"); } -static long gp10b_round_clk_rate(struct device *dev, unsigned long rate) +long gp10b_round_clk_rate(struct device *dev, unsigned long rate) { struct gk20a *g = get_gk20a(dev); struct gk20a_scale_profile *profile = g->scale_profile; @@ -318,7 +318,7 @@ static long gp10b_round_clk_rate(struct device *dev, unsigned long rate) return freq_table[max_states - 1]; } -static int gp10b_clk_get_freqs(struct device *dev, +int gp10b_clk_get_freqs(struct device *dev, unsigned long **freqs, int *num_freqs) { struct gk20a_platform *platform = gk20a_get_platform(dev); -- cgit v1.2.2