summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gp10b/therm_gp10b.c
diff options
context:
space:
mode:
authorSeshendra Gadagottu <sgadagottu@nvidia.com>2016-01-26 20:53:12 -0500
committerDeepak Nibade <dnibade@nvidia.com>2016-12-27 04:52:10 -0500
commitd730381f938e67313968c76b34fec0c6f79f0532 (patch)
tree1deacb2ca35eb6c897c49ca68c0e72f70bd18787 /drivers/gpu/nvgpu/gp10b/therm_gp10b.c
parentb8db86a6b63231c488dc0ebca14c61e4c54a3c23 (diff)
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>
Diffstat (limited to 'drivers/gpu/nvgpu/gp10b/therm_gp10b.c')
-rw-r--r--drivers/gpu/nvgpu/gp10b/therm_gp10b.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gp10b/therm_gp10b.c b/drivers/gpu/nvgpu/gp10b/therm_gp10b.c
index 7bf0c0e5..687593b0 100644
--- a/drivers/gpu/nvgpu/gp10b/therm_gp10b.c
+++ b/drivers/gpu/nvgpu/gp10b/therm_gp10b.c
@@ -78,8 +78,22 @@ static int gp10b_init_therm_setup_hw(struct gk20a *g)
78 return 0; 78 return 0;
79} 79}
80 80
81static int gp10b_update_therm_gate_ctrl(struct gk20a *g)
82{
83 u32 gate_ctrl;
84
85 gate_ctrl = gk20a_readl(g, therm_gate_ctrl_r(ENGINE_CE2_GK20A));
86 gate_ctrl = set_field(gate_ctrl,
87 therm_gate_ctrl_eng_delay_before_m(),
88 therm_gate_ctrl_eng_delay_before_f(4));
89 gk20a_writel(g, therm_gate_ctrl_r(ENGINE_CE2_GK20A), gate_ctrl);
90
91 return 0;
92}
93
81void gp10b_init_therm_ops(struct gpu_ops *gops) 94void gp10b_init_therm_ops(struct gpu_ops *gops)
82{ 95{
83 gops->therm.init_therm_setup_hw = gp10b_init_therm_setup_hw; 96 gops->therm.init_therm_setup_hw = gp10b_init_therm_setup_hw;
97 gops->therm.update_therm_gate_ctrl = gp10b_update_therm_gate_ctrl;
84 98
85} 99}