From c43053761b4c74c584f22f31c3d8585df8c6d233 Mon Sep 17 00:00:00 2001 From: Seshendra Gadagottu Date: Fri, 22 Jan 2016 14:25:16 -0800 Subject: gpu: nvgpu: add support for therm gate ctrl During gpu init, therm gate control is required to add delay cycles before clock gating. Bug 1717152 Change-Id: Ifabc428cf7b49e49964dc994eba2c38af4aa1a91 Signed-off-by: Seshendra Gadagottu Reviewed-on: http://git-master/r/936443 Reviewed-by: Terje Bergstrom Tested-by: Terje Bergstrom --- drivers/gpu/nvgpu/gm20b/hw_therm_gm20b.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'drivers/gpu/nvgpu/gm20b') diff --git a/drivers/gpu/nvgpu/gm20b/hw_therm_gm20b.h b/drivers/gpu/nvgpu/gm20b/hw_therm_gm20b.h index a0d8ffc9..e8a5b6a5 100644 --- a/drivers/gpu/nvgpu/gm20b/hw_therm_gm20b.h +++ b/drivers/gpu/nvgpu/gm20b/hw_therm_gm20b.h @@ -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 * under the terms and conditions of the GNU General Public License, @@ -186,6 +186,14 @@ static inline u32 therm_gate_ctrl_eng_idle_filt_mant_m(void) { 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) { return (v & 0xf) << 20; -- cgit v1.2.2