diff options
author | seshendra Gadagottu <sgadagottu@nvidia.com> | 2017-12-30 19:51:52 -0500 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-01-19 14:39:54 -0500 |
commit | 968d8cd3e543b951714d9a86373bd721d08c8482 (patch) | |
tree | 01c4a759468421c33aa121991957331ed86546db /drivers/gpu/nvgpu/common/linux/platform_gp10b_tegra.c | |
parent | f50c2af8a7d147855e5537531078bb03740abb67 (diff) |
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 <sgadagottu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1639752
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux/platform_gp10b_tegra.c')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/platform_gp10b_tegra.c | 14 |
1 files changed, 7 insertions, 7 deletions
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 @@ | |||
1 | /* | 1 | /* |
2 | * GP10B Tegra Platform Interface | 2 | * GP10B Tegra Platform Interface |
3 | * | 3 | * |
4 | * Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved. | 4 | * Copyright (c) 2014-2018, NVIDIA CORPORATION. All rights reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify it | 6 | * This program is free software; you can redistribute it and/or modify it |
7 | * under the terms and conditions of the GNU General Public License, | 7 | * under the terms and conditions of the GNU General Public License, |
@@ -150,7 +150,7 @@ static int gp10b_tegra_probe(struct device *dev) | |||
150 | return 0; | 150 | return 0; |
151 | } | 151 | } |
152 | 152 | ||
153 | static int gp10b_tegra_late_probe(struct device *dev) | 153 | int gp10b_tegra_late_probe(struct device *dev) |
154 | { | 154 | { |
155 | /* Cause early VPR resize */ | 155 | /* Cause early VPR resize */ |
156 | gk20a_tegra_secure_page_alloc(dev); | 156 | gk20a_tegra_secure_page_alloc(dev); |
@@ -262,7 +262,7 @@ int gp10b_tegra_reset_deassert(struct device *dev) | |||
262 | return ret; | 262 | return ret; |
263 | } | 263 | } |
264 | 264 | ||
265 | static void gp10b_tegra_prescale(struct device *dev) | 265 | void gp10b_tegra_prescale(struct device *dev) |
266 | { | 266 | { |
267 | struct gk20a *g = get_gk20a(dev); | 267 | struct gk20a *g = get_gk20a(dev); |
268 | u32 avg = 0; | 268 | u32 avg = 0; |
@@ -274,7 +274,7 @@ static void gp10b_tegra_prescale(struct device *dev) | |||
274 | gk20a_dbg_fn("done"); | 274 | gk20a_dbg_fn("done"); |
275 | } | 275 | } |
276 | 276 | ||
277 | static void gp10b_tegra_postscale(struct device *pdev, | 277 | void gp10b_tegra_postscale(struct device *pdev, |
278 | unsigned long freq) | 278 | unsigned long freq) |
279 | { | 279 | { |
280 | struct gk20a_platform *platform = gk20a_get_platform(pdev); | 280 | struct gk20a_platform *platform = gk20a_get_platform(pdev); |
@@ -283,7 +283,7 @@ static void gp10b_tegra_postscale(struct device *pdev, | |||
283 | unsigned long emc_rate; | 283 | unsigned long emc_rate; |
284 | 284 | ||
285 | gk20a_dbg_fn(""); | 285 | gk20a_dbg_fn(""); |
286 | if (profile && !gp10b_tegra_is_railgated(pdev)) { | 286 | if (profile && !platform->is_railgated(pdev)) { |
287 | unsigned long emc_scale; | 287 | unsigned long emc_scale; |
288 | 288 | ||
289 | if (freq <= gp10b_freq_table[0]) | 289 | if (freq <= gp10b_freq_table[0]) |
@@ -303,7 +303,7 @@ static void gp10b_tegra_postscale(struct device *pdev, | |||
303 | gk20a_dbg_fn("done"); | 303 | gk20a_dbg_fn("done"); |
304 | } | 304 | } |
305 | 305 | ||
306 | static long gp10b_round_clk_rate(struct device *dev, unsigned long rate) | 306 | long gp10b_round_clk_rate(struct device *dev, unsigned long rate) |
307 | { | 307 | { |
308 | struct gk20a *g = get_gk20a(dev); | 308 | struct gk20a *g = get_gk20a(dev); |
309 | struct gk20a_scale_profile *profile = g->scale_profile; | 309 | struct gk20a_scale_profile *profile = g->scale_profile; |
@@ -318,7 +318,7 @@ static long gp10b_round_clk_rate(struct device *dev, unsigned long rate) | |||
318 | return freq_table[max_states - 1]; | 318 | return freq_table[max_states - 1]; |
319 | } | 319 | } |
320 | 320 | ||
321 | static int gp10b_clk_get_freqs(struct device *dev, | 321 | int gp10b_clk_get_freqs(struct device *dev, |
322 | unsigned long **freqs, int *num_freqs) | 322 | unsigned long **freqs, int *num_freqs) |
323 | { | 323 | { |
324 | struct gk20a_platform *platform = gk20a_get_platform(dev); | 324 | struct gk20a_platform *platform = gk20a_get_platform(dev); |