diff options
author | Konsta Holtta <kholtta@nvidia.com> | 2018-06-26 10:18:17 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-07-04 07:42:05 -0400 |
commit | f403800dce923c8bac982291aee213e1e3afdab0 (patch) | |
tree | 01e7b9af55778f1514e5b02e520abf1b7ccd8d39 /drivers/gpu/nvgpu/os/linux/module.c | |
parent | 145eb3321fb8b5411c9e4975eada21515c19ebb0 (diff) |
gpu: nvgpu: move can_railgate to enabled.h
The g->can_railgate flag is a global constant-ish property like the rest
of the flags behind nvgpu_is_enabled() API, so move it there.
Bug 200327089
Change-Id: Id1f2f16ea1975a03fb56f10c2f3c8c705574e341
Signed-off-by: Konsta Holtta <kholtta@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1764266
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/os/linux/module.c')
-rw-r--r-- | drivers/gpu/nvgpu/os/linux/module.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/os/linux/module.c b/drivers/gpu/nvgpu/os/linux/module.c index 4516490b..2df8ab42 100644 --- a/drivers/gpu/nvgpu/os/linux/module.c +++ b/drivers/gpu/nvgpu/os/linux/module.c | |||
@@ -458,7 +458,7 @@ int __gk20a_do_idle(struct gk20a *g, bool force_reset) | |||
458 | * If User disables rail gating, we take one more | 458 | * If User disables rail gating, we take one more |
459 | * extra refcount | 459 | * extra refcount |
460 | */ | 460 | */ |
461 | if (g->can_railgate) | 461 | if (nvgpu_is_enabled(g, NVGPU_CAN_RAILGATE)) |
462 | target_ref_cnt = 1; | 462 | target_ref_cnt = 1; |
463 | else | 463 | else |
464 | target_ref_cnt = 2; | 464 | target_ref_cnt = 2; |
@@ -485,7 +485,7 @@ int __gk20a_do_idle(struct gk20a *g, bool force_reset) | |||
485 | nvgpu_timeout_init(g, &timeout, GK20A_WAIT_FOR_IDLE_MS, | 485 | nvgpu_timeout_init(g, &timeout, GK20A_WAIT_FOR_IDLE_MS, |
486 | NVGPU_TIMER_CPU_TIMER); | 486 | NVGPU_TIMER_CPU_TIMER); |
487 | 487 | ||
488 | if (g->can_railgate && !force_reset) { | 488 | if (nvgpu_is_enabled(g, NVGPU_CAN_RAILGATE) && !force_reset) { |
489 | /* | 489 | /* |
490 | * Case 1 : GPU railgate is supported | 490 | * Case 1 : GPU railgate is supported |
491 | * | 491 | * |
@@ -1047,7 +1047,7 @@ static int gk20a_pm_init(struct device *dev) | |||
1047 | * case, set autosuspend delay to negative which | 1047 | * case, set autosuspend delay to negative which |
1048 | * will suspend runtime pm | 1048 | * will suspend runtime pm |
1049 | */ | 1049 | */ |
1050 | if (g->railgate_delay && g->can_railgate) | 1050 | if (g->railgate_delay && nvgpu_is_enabled(g, NVGPU_CAN_RAILGATE)) |
1051 | pm_runtime_set_autosuspend_delay(dev, | 1051 | pm_runtime_set_autosuspend_delay(dev, |
1052 | g->railgate_delay); | 1052 | g->railgate_delay); |
1053 | else | 1053 | else |