diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2016-09-13 13:52:05 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2016-10-19 23:43:50 -0400 |
commit | f4b05d295fe821d2871ba22dde178674359fe563 (patch) | |
tree | 8f2ae393a1763efe488c76ff76427dea167041a5 /drivers/gpu/nvgpu/gk20a/gr_gk20a.c | |
parent | bf29bd942201e17f55ff0894833a84b8f6c0bf97 (diff) |
gpu: nvgpu: Move ELCG programming to therm
Move ELCG parameter programming to a new function in therm,
elcg_init_idle_filter. Implement gk20a variant and use it for gk20a
and gm20b.
JIRA DNVGPU-74
Change-Id: I8ef400f3a6195311fb9e7da8db6c34993d62f461
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/1220433
(cherry picked from commit f6654ae4d83d31cd40b317bf55922964bbfa575d)
Reviewed-on: http://git-master/r/1239421
GVS: Gerrit_Virtual_Submit
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gr_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gr_gk20a.c | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c index fc1978ed..ecc67167 100644 --- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c | |||
@@ -4232,8 +4232,7 @@ void gr_gk20a_init_blcg_mode(struct gk20a *g, u32 mode, u32 engine) | |||
4232 | 4232 | ||
4233 | void gr_gk20a_init_elcg_mode(struct gk20a *g, u32 mode, u32 engine) | 4233 | void gr_gk20a_init_elcg_mode(struct gk20a *g, u32 mode, u32 engine) |
4234 | { | 4234 | { |
4235 | u32 gate_ctrl, idle_filter; | 4235 | u32 gate_ctrl; |
4236 | struct gk20a_platform *platform = dev_get_drvdata(g->dev); | ||
4237 | 4236 | ||
4238 | gate_ctrl = gk20a_readl(g, therm_gate_ctrl_r(engine)); | 4237 | gate_ctrl = gk20a_readl(g, therm_gate_ctrl_r(engine)); |
4239 | 4238 | ||
@@ -4262,29 +4261,7 @@ void gr_gk20a_init_elcg_mode(struct gk20a *g, u32 mode, u32 engine) | |||
4262 | "invalid elcg mode %d", mode); | 4261 | "invalid elcg mode %d", mode); |
4263 | } | 4262 | } |
4264 | 4263 | ||
4265 | if (platform->is_fmodel) { | ||
4266 | gate_ctrl = set_field(gate_ctrl, | ||
4267 | therm_gate_ctrl_eng_delay_after_m(), | ||
4268 | therm_gate_ctrl_eng_delay_after_f(4)); | ||
4269 | } | ||
4270 | |||
4271 | /* 2 * (1 << 9) = 1024 clks */ | ||
4272 | gate_ctrl = set_field(gate_ctrl, | ||
4273 | therm_gate_ctrl_eng_idle_filt_exp_m(), | ||
4274 | therm_gate_ctrl_eng_idle_filt_exp_f(9)); | ||
4275 | gate_ctrl = set_field(gate_ctrl, | ||
4276 | therm_gate_ctrl_eng_idle_filt_mant_m(), | ||
4277 | therm_gate_ctrl_eng_idle_filt_mant_f(2)); | ||
4278 | gk20a_writel(g, therm_gate_ctrl_r(engine), gate_ctrl); | 4264 | gk20a_writel(g, therm_gate_ctrl_r(engine), gate_ctrl); |
4279 | |||
4280 | /* default fecs_idle_filter to 0 */ | ||
4281 | idle_filter = gk20a_readl(g, therm_fecs_idle_filter_r()); | ||
4282 | idle_filter &= ~therm_fecs_idle_filter_value_m(); | ||
4283 | gk20a_writel(g, therm_fecs_idle_filter_r(), idle_filter); | ||
4284 | /* default hubmmu_idle_filter to 0 */ | ||
4285 | idle_filter = gk20a_readl(g, therm_hubmmu_idle_filter_r()); | ||
4286 | idle_filter &= ~therm_hubmmu_idle_filter_value_m(); | ||
4287 | gk20a_writel(g, therm_hubmmu_idle_filter_r(), idle_filter); | ||
4288 | } | 4265 | } |
4289 | 4266 | ||
4290 | void gr_gk20a_init_cg_mode(struct gk20a *g, u32 cgmode, u32 mode_config) | 4267 | void gr_gk20a_init_cg_mode(struct gk20a *g, u32 cgmode, u32 mode_config) |