diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2017-07-27 15:58:03 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-08-04 12:23:56 -0400 |
commit | b8efd9d04537d6129e2ce8b067417e46b0e7436f (patch) | |
tree | 1a40179a893e10c0fdcdd56797599bcdf6b55206 /drivers/gpu/nvgpu/common/linux | |
parent | c16797e35c2926bf34a61d5d8f37d5675ec23b1b (diff) |
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 <tbergstrom@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1528262
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/debug.c | 7 |
1 files changed, 1 insertions, 6 deletions
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) | |||
275 | debugfs_create_u32("log_trace", S_IRUGO|S_IWUSR, | 275 | debugfs_create_u32("log_trace", S_IRUGO|S_IWUSR, |
276 | platform->debugfs, &g->log_trace); | 276 | platform->debugfs, &g->log_trace); |
277 | 277 | ||
278 | nvgpu_spinlock_init(&g->debugfs_lock); | ||
279 | |||
280 | g->mm.ltc_enabled = true; | ||
281 | g->mm.ltc_enabled_debug = true; | ||
282 | |||
283 | g->debugfs_ltc_enabled = | 278 | g->debugfs_ltc_enabled = |
284 | debugfs_create_bool("ltc_enabled", S_IRUGO|S_IWUSR, | 279 | debugfs_create_bool("ltc_enabled", S_IRUGO|S_IWUSR, |
285 | platform->debugfs, | 280 | platform->debugfs, |
286 | &g->mm.ltc_enabled_debug); | 281 | &g->mm.ltc_enabled_target); |
287 | 282 | ||
288 | g->debugfs_gr_idle_timeout_default = | 283 | g->debugfs_gr_idle_timeout_default = |
289 | debugfs_create_u32("gr_idle_timeout_default_us", | 284 | debugfs_create_u32("gr_idle_timeout_default_us", |