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/common/linux/debug.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'drivers/gpu/nvgpu/common/linux') diff --git a/drivers/gpu/nvgpu/common/linux/debug.c b/drivers/gpu/nvgpu/common/linux/debug.c index e085aed4..a846493e 100644 --- a/drivers/gpu/nvgpu/common/linux/debug.c +++ b/drivers/gpu/nvgpu/common/linux/debug.c @@ -275,15 +275,10 @@ void gk20a_debug_init(struct gk20a *g, const char *debugfs_symlink) debugfs_create_u32("log_trace", S_IRUGO|S_IWUSR, platform->debugfs, &g->log_trace); - nvgpu_spinlock_init(&g->debugfs_lock); - - g->mm.ltc_enabled = true; - g->mm.ltc_enabled_debug = true; - g->debugfs_ltc_enabled = debugfs_create_bool("ltc_enabled", S_IRUGO|S_IWUSR, platform->debugfs, - &g->mm.ltc_enabled_debug); + &g->mm.ltc_enabled_target); g->debugfs_gr_idle_timeout_default = debugfs_create_u32("gr_idle_timeout_default_us", -- cgit v1.2.2