summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common/linux/platform_gv11b_tegra.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux/platform_gv11b_tegra.c')
-rw-r--r--drivers/gpu/nvgpu/common/linux/platform_gv11b_tegra.c30
1 files changed, 29 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/platform_gv11b_tegra.c b/drivers/gpu/nvgpu/common/linux/platform_gv11b_tegra.c
index a452896f..81b6204d 100644
--- a/drivers/gpu/nvgpu/common/linux/platform_gv11b_tegra.c
+++ b/drivers/gpu/nvgpu/common/linux/platform_gv11b_tegra.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * GV11B Tegra Platform Interface 2 * GV11B Tegra Platform Interface
3 * 3 *
4 * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved. 4 * Copyright (c) 2016-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,
@@ -23,6 +23,7 @@
23#include <linux/reset.h> 23#include <linux/reset.h>
24#include <linux/hashtable.h> 24#include <linux/hashtable.h>
25#include <linux/clk.h> 25#include <linux/clk.h>
26#include <linux/platform/tegra/emc_bwmgr.h>
26 27
27#include <nvgpu/nvhost.h> 28#include <nvgpu/nvhost.h>
28#include <nvgpu/nvhost_t19x.h> 29#include <nvgpu/nvhost_t19x.h>
@@ -35,6 +36,7 @@
35#include "gk20a/gk20a.h" 36#include "gk20a/gk20a.h"
36#include "platform_gk20a.h" 37#include "platform_gk20a.h"
37#include "clk.h" 38#include "clk.h"
39#include "scale.h"
38 40
39#include "gp10b/platform_gp10b.h" 41#include "gp10b/platform_gp10b.h"
40#include "platform_gp10b_tegra.h" 42#include "platform_gp10b_tegra.h"
@@ -130,9 +132,16 @@ static int gv11b_tegra_railgate(struct device *dev)
130{ 132{
131#ifdef TEGRA194_POWER_DOMAIN_GPU 133#ifdef TEGRA194_POWER_DOMAIN_GPU
132 struct gk20a_platform *platform = gk20a_get_platform(dev); 134 struct gk20a_platform *platform = gk20a_get_platform(dev);
135 struct gk20a_scale_profile *profile = platform->g->scale_profile;
133 struct gk20a *g = get_gk20a(dev); 136 struct gk20a *g = get_gk20a(dev);
134 int i; 137 int i;
135 138
139 /* remove emc frequency floor */
140 if (profile)
141 tegra_bwmgr_set_emc(
142 (struct tegra_bwmgr_client *)profile->private_data,
143 0, TEGRA_BWMGR_SET_EMC_FLOOR);
144
136 if (tegra_bpmp_running()) { 145 if (tegra_bpmp_running()) {
137 nvgpu_log(g, gpu_dbg_info, "bpmp running"); 146 nvgpu_log(g, gpu_dbg_info, "bpmp running");
138 if (!tegra_powergate_is_powered(TEGRA194_POWER_DOMAIN_GPU)) { 147 if (!tegra_powergate_is_powered(TEGRA194_POWER_DOMAIN_GPU)) {
@@ -159,6 +168,7 @@ static int gv11b_tegra_unrailgate(struct device *dev)
159#ifdef TEGRA194_POWER_DOMAIN_GPU 168#ifdef TEGRA194_POWER_DOMAIN_GPU
160 struct gk20a_platform *platform = gk20a_get_platform(dev); 169 struct gk20a_platform *platform = gk20a_get_platform(dev);
161 struct gk20a *g = get_gk20a(dev); 170 struct gk20a *g = get_gk20a(dev);
171 struct gk20a_scale_profile *profile = platform->g->scale_profile;
162 int i; 172 int i;
163 173
164 if (tegra_bpmp_running()) { 174 if (tegra_bpmp_running()) {
@@ -177,6 +187,13 @@ static int gv11b_tegra_unrailgate(struct device *dev)
177 } else { 187 } else {
178 nvgpu_log(g, gpu_dbg_info, "bpmp not running"); 188 nvgpu_log(g, gpu_dbg_info, "bpmp not running");
179 } 189 }
190
191 /* to start with set emc frequency floor to max rate*/
192 if (profile)
193 tegra_bwmgr_set_emc(
194 (struct tegra_bwmgr_client *)profile->private_data,
195 tegra_bwmgr_get_max_emc_rate(),
196 TEGRA_BWMGR_SET_EMC_FLOOR);
180#endif 197#endif
181 return ret; 198 return ret;
182} 199}
@@ -200,6 +217,7 @@ struct gk20a_platform t19x_gpu_tegra_platform = {
200 .ch_wdt_timeout_ms = 5000, 217 .ch_wdt_timeout_ms = 5000,
201 218
202 .probe = gv11b_tegra_probe, 219 .probe = gv11b_tegra_probe,
220 .late_probe = gp10b_tegra_late_probe,
203 .remove = gv11b_tegra_remove, 221 .remove = gv11b_tegra_remove,
204 222
205 .enable_slcg = false, 223 .enable_slcg = false,
@@ -219,6 +237,16 @@ struct gk20a_platform t19x_gpu_tegra_platform = {
219 .busy = gk20a_tegra_busy, 237 .busy = gk20a_tegra_busy,
220 .idle = gk20a_tegra_idle, 238 .idle = gk20a_tegra_idle,
221 239
240 .clk_round_rate = gp10b_round_clk_rate,
241 .get_clk_freqs = gp10b_clk_get_freqs,
242
243 /* frequency scaling configuration */
244 .prescale = gp10b_tegra_prescale,
245 .postscale = gp10b_tegra_postscale,
246 .devfreq_governor = "nvhost_podgov",
247
248 .qos_notify = gk20a_scale_qos_notify,
249
222 .dump_platform_dependencies = gk20a_tegra_debug_dump, 250 .dump_platform_dependencies = gk20a_tegra_debug_dump,
223 251
224 .soc_name = "tegra19x", 252 .soc_name = "tegra19x",