mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-23 18:16:01 +03:00
gpu: nvgpu: gp10b: add delay cycles before engine gating
For copy engine, add 16 clock cycle delay before engine clock gating. Bug 1717152 Change-Id: Ife92299c052f44000bc0d900f0129a2eab13f3b5 Signed-off-by: Seshendra Gadagottu <sgadagottu@nvidia.com> Reviewed-on: http://git-master/r/998408 GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
This commit is contained in:
committed by
Deepak Nibade
parent
b8db86a6b6
commit
d730381f93
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved.
|
* Copyright (c) 2014-2016, NVIDIA CORPORATION. All rights reserved.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify it
|
* This program is free software; you can redistribute it and/or modify it
|
||||||
* under the terms and conditions of the GNU General Public License,
|
* under the terms and conditions of the GNU General Public License,
|
||||||
@@ -246,6 +246,14 @@ static inline u32 therm_gate_ctrl_eng_idle_filt_mant_m(void)
|
|||||||
{
|
{
|
||||||
return 0x7 << 13;
|
return 0x7 << 13;
|
||||||
}
|
}
|
||||||
|
static inline u32 therm_gate_ctrl_eng_delay_before_f(u32 v)
|
||||||
|
{
|
||||||
|
return (v & 0xf) << 16;
|
||||||
|
}
|
||||||
|
static inline u32 therm_gate_ctrl_eng_delay_before_m(void)
|
||||||
|
{
|
||||||
|
return 0xf << 16;
|
||||||
|
}
|
||||||
static inline u32 therm_gate_ctrl_eng_delay_after_f(u32 v)
|
static inline u32 therm_gate_ctrl_eng_delay_after_f(u32 v)
|
||||||
{
|
{
|
||||||
return (v & 0xf) << 20;
|
return (v & 0xf) << 20;
|
||||||
|
|||||||
@@ -78,8 +78,22 @@ static int gp10b_init_therm_setup_hw(struct gk20a *g)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int gp10b_update_therm_gate_ctrl(struct gk20a *g)
|
||||||
|
{
|
||||||
|
u32 gate_ctrl;
|
||||||
|
|
||||||
|
gate_ctrl = gk20a_readl(g, therm_gate_ctrl_r(ENGINE_CE2_GK20A));
|
||||||
|
gate_ctrl = set_field(gate_ctrl,
|
||||||
|
therm_gate_ctrl_eng_delay_before_m(),
|
||||||
|
therm_gate_ctrl_eng_delay_before_f(4));
|
||||||
|
gk20a_writel(g, therm_gate_ctrl_r(ENGINE_CE2_GK20A), gate_ctrl);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
void gp10b_init_therm_ops(struct gpu_ops *gops)
|
void gp10b_init_therm_ops(struct gpu_ops *gops)
|
||||||
{
|
{
|
||||||
gops->therm.init_therm_setup_hw = gp10b_init_therm_setup_hw;
|
gops->therm.init_therm_setup_hw = gp10b_init_therm_setup_hw;
|
||||||
|
gops->therm.update_therm_gate_ctrl = gp10b_update_therm_gate_ctrl;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user