diff options
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux/platform_gv11b_tegra.c')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/platform_gv11b_tegra.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/platform_gv11b_tegra.c b/drivers/gpu/nvgpu/common/linux/platform_gv11b_tegra.c index 5240480e..c56bc0f3 100644 --- a/drivers/gpu/nvgpu/common/linux/platform_gv11b_tegra.c +++ b/drivers/gpu/nvgpu/common/linux/platform_gv11b_tegra.c | |||
@@ -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 | 29 | ||
@@ -34,6 +35,7 @@ | |||
34 | #include "gk20a/gk20a.h" | 35 | #include "gk20a/gk20a.h" |
35 | #include "platform_gk20a.h" | 36 | #include "platform_gk20a.h" |
36 | #include "clk.h" | 37 | #include "clk.h" |
38 | #include "scale.h" | ||
37 | 39 | ||
38 | #include "gp10b/platform_gp10b.h" | 40 | #include "gp10b/platform_gp10b.h" |
39 | #include "platform_gp10b_tegra.h" | 41 | #include "platform_gp10b_tegra.h" |
@@ -135,9 +137,16 @@ static int gv11b_tegra_railgate(struct device *dev) | |||
135 | { | 137 | { |
136 | #ifdef TEGRA194_POWER_DOMAIN_GPU | 138 | #ifdef TEGRA194_POWER_DOMAIN_GPU |
137 | struct gk20a_platform *platform = gk20a_get_platform(dev); | 139 | struct gk20a_platform *platform = gk20a_get_platform(dev); |
140 | struct gk20a_scale_profile *profile = platform->g->scale_profile; | ||
138 | struct gk20a *g = get_gk20a(dev); | 141 | struct gk20a *g = get_gk20a(dev); |
139 | int i; | 142 | int i; |
140 | 143 | ||
144 | /* remove emc frequency floor */ | ||
145 | if (profile) | ||
146 | tegra_bwmgr_set_emc( | ||
147 | (struct tegra_bwmgr_client *)profile->private_data, | ||
148 | 0, TEGRA_BWMGR_SET_EMC_FLOOR); | ||
149 | |||
141 | if (tegra_bpmp_running()) { | 150 | if (tegra_bpmp_running()) { |
142 | nvgpu_log(g, gpu_dbg_info, "bpmp running"); | 151 | nvgpu_log(g, gpu_dbg_info, "bpmp running"); |
143 | if (!tegra_powergate_is_powered(TEGRA194_POWER_DOMAIN_GPU)) { | 152 | if (!tegra_powergate_is_powered(TEGRA194_POWER_DOMAIN_GPU)) { |
@@ -164,6 +173,7 @@ static int gv11b_tegra_unrailgate(struct device *dev) | |||
164 | #ifdef TEGRA194_POWER_DOMAIN_GPU | 173 | #ifdef TEGRA194_POWER_DOMAIN_GPU |
165 | struct gk20a_platform *platform = gk20a_get_platform(dev); | 174 | struct gk20a_platform *platform = gk20a_get_platform(dev); |
166 | struct gk20a *g = get_gk20a(dev); | 175 | struct gk20a *g = get_gk20a(dev); |
176 | struct gk20a_scale_profile *profile = platform->g->scale_profile; | ||
167 | int i; | 177 | int i; |
168 | 178 | ||
169 | if (tegra_bpmp_running()) { | 179 | if (tegra_bpmp_running()) { |
@@ -182,6 +192,13 @@ static int gv11b_tegra_unrailgate(struct device *dev) | |||
182 | } else { | 192 | } else { |
183 | nvgpu_log(g, gpu_dbg_info, "bpmp not running"); | 193 | nvgpu_log(g, gpu_dbg_info, "bpmp not running"); |
184 | } | 194 | } |
195 | |||
196 | /* to start with set emc frequency floor to max rate*/ | ||
197 | if (profile) | ||
198 | tegra_bwmgr_set_emc( | ||
199 | (struct tegra_bwmgr_client *)profile->private_data, | ||
200 | tegra_bwmgr_get_max_emc_rate(), | ||
201 | TEGRA_BWMGR_SET_EMC_FLOOR); | ||
185 | #endif | 202 | #endif |
186 | return ret; | 203 | return ret; |
187 | } | 204 | } |
@@ -225,6 +242,17 @@ struct gk20a_platform gv11b_tegra_platform = { | |||
225 | .busy = gk20a_tegra_busy, | 242 | .busy = gk20a_tegra_busy, |
226 | .idle = gk20a_tegra_idle, | 243 | .idle = gk20a_tegra_idle, |
227 | 244 | ||
245 | .clk_round_rate = gp10b_round_clk_rate, | ||
246 | .get_clk_freqs = gp10b_clk_get_freqs, | ||
247 | |||
248 | /* frequency scaling configuration */ | ||
249 | .initscale = gp10b_tegra_scale_init, | ||
250 | .prescale = gp10b_tegra_prescale, | ||
251 | .postscale = gp10b_tegra_postscale, | ||
252 | .devfreq_governor = "nvhost_podgov", | ||
253 | |||
254 | .qos_notify = gk20a_scale_qos_notify, | ||
255 | |||
228 | .dump_platform_dependencies = gk20a_tegra_debug_dump, | 256 | .dump_platform_dependencies = gk20a_tegra_debug_dump, |
229 | 257 | ||
230 | .soc_name = "tegra19x", | 258 | .soc_name = "tegra19x", |