diff options
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/nvgpu/pci.c | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/drivers/gpu/nvgpu/pci.c b/drivers/gpu/nvgpu/pci.c index 5165c715..5d058ed9 100644 --- a/drivers/gpu/nvgpu/pci.c +++ b/drivers/gpu/nvgpu/pci.c | |||
@@ -47,6 +47,7 @@ static struct gk20a_platform nvgpu_pci_device = { | |||
47 | 47 | ||
48 | /* power management configuration */ | 48 | /* power management configuration */ |
49 | .railgate_delay = 500, | 49 | .railgate_delay = 500, |
50 | .can_railgate = false, | ||
50 | .can_elpg = false, | 51 | .can_elpg = false, |
51 | 52 | ||
52 | /* power management callbacks */ | 53 | /* power management callbacks */ |
@@ -165,17 +166,21 @@ static int nvgpu_pci_pm_init(struct device *dev) | |||
165 | #ifdef CONFIG_PM | 166 | #ifdef CONFIG_PM |
166 | struct gk20a_platform *platform = gk20a_get_platform(dev); | 167 | struct gk20a_platform *platform = gk20a_get_platform(dev); |
167 | 168 | ||
168 | if (platform->railgate_delay) | 169 | if (!platform->can_railgate) { |
169 | pm_runtime_set_autosuspend_delay(dev, | 170 | pm_runtime_disable(dev); |
170 | platform->railgate_delay); | 171 | } else { |
171 | 172 | if (platform->railgate_delay) | |
172 | /* | 173 | pm_runtime_set_autosuspend_delay(dev, |
173 | * Runtime PM for PCI devices is disabled by default, | 174 | platform->railgate_delay); |
174 | * so we need to enable it first | 175 | |
175 | */ | 176 | /* |
176 | pm_runtime_use_autosuspend(dev); | 177 | * Runtime PM for PCI devices is disabled by default, |
177 | pm_runtime_put_noidle(dev); | 178 | * so we need to enable it first |
178 | pm_runtime_allow(dev); | 179 | */ |
180 | pm_runtime_use_autosuspend(dev); | ||
181 | pm_runtime_put_noidle(dev); | ||
182 | pm_runtime_allow(dev); | ||
183 | } | ||
179 | #endif | 184 | #endif |
180 | return 0; | 185 | return 0; |
181 | } | 186 | } |