mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:35:20 +03:00
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>
This commit is contained in:
committed by
mobile promotions
parent
145eb3321f
commit
f403800dce
@@ -458,7 +458,7 @@ int __gk20a_do_idle(struct gk20a *g, bool force_reset)
|
||||
* If User disables rail gating, we take one more
|
||||
* extra refcount
|
||||
*/
|
||||
if (g->can_railgate)
|
||||
if (nvgpu_is_enabled(g, NVGPU_CAN_RAILGATE))
|
||||
target_ref_cnt = 1;
|
||||
else
|
||||
target_ref_cnt = 2;
|
||||
@@ -485,7 +485,7 @@ int __gk20a_do_idle(struct gk20a *g, bool force_reset)
|
||||
nvgpu_timeout_init(g, &timeout, GK20A_WAIT_FOR_IDLE_MS,
|
||||
NVGPU_TIMER_CPU_TIMER);
|
||||
|
||||
if (g->can_railgate && !force_reset) {
|
||||
if (nvgpu_is_enabled(g, NVGPU_CAN_RAILGATE) && !force_reset) {
|
||||
/*
|
||||
* Case 1 : GPU railgate is supported
|
||||
*
|
||||
@@ -1047,7 +1047,7 @@ static int gk20a_pm_init(struct device *dev)
|
||||
* case, set autosuspend delay to negative which
|
||||
* will suspend runtime pm
|
||||
*/
|
||||
if (g->railgate_delay && g->can_railgate)
|
||||
if (g->railgate_delay && nvgpu_is_enabled(g, NVGPU_CAN_RAILGATE))
|
||||
pm_runtime_set_autosuspend_delay(dev,
|
||||
g->railgate_delay);
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user