From b8efd9d04537d6129e2ce8b067417e46b0e7436f Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Thu, 27 Jul 2017 12:58:03 -0700 Subject: gpu: nvgpu: Make LTC disabling common code Refactor the sync_debugfs LTC HAL op so that the logic to enable or disable LTC goes to common code nvgpu_ltc_sync_enabled() and the LTC HAL set_enabled only performs the hardware register access. Create a new common function nvgpu_init_ltc_support() to initialize the LTC software variable, and move hardware initialization of LTC to be called from it. JIRA NVGPU-62 Change-Id: Ib1cf4f5b83ca3dac08407464ed56a732e0a33923 Signed-off-by: Terje Bergstrom Reviewed-on: https://git-master.nvidia.com/r/1528262 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/mm_gk20a.h | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a/mm_gk20a.h') diff --git a/drivers/gpu/nvgpu/gk20a/mm_gk20a.h b/drivers/gpu/nvgpu/gk20a/mm_gk20a.h index 2f35df71..c56b28bb 100644 --- a/drivers/gpu/nvgpu/gk20a/mm_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/mm_gk20a.h @@ -245,14 +245,8 @@ struct mm_gk20a { bool sw_ready; int physical_bits; bool use_full_comp_tag_line; -#ifdef CONFIG_DEBUG_FS - u32 ltc_enabled; -#if LINUX_VERSION_CODE < KERNEL_VERSION(4,4,0) - u32 ltc_enabled_debug; -#else - bool ltc_enabled_debug; -#endif -#endif + bool ltc_enabled_current; + bool ltc_enabled_target; #if LINUX_VERSION_CODE < KERNEL_VERSION(4,4,0) u32 bypass_smmu; u32 disable_bigpage; -- cgit v1.2.2