summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/pci.c
diff options
context:
space:
mode:
authorLakshmanan M <lm@nvidia.com>2016-08-11 07:26:01 -0400
committerTerje Bergstrom <tbergstrom@nvidia.com>2016-08-12 11:13:34 -0400
commit1b216d778a7938072aa2a68ebef38bb954418257 (patch)
tree81694f71ca3d27aa94521545c8948e717d1fed9d /drivers/gpu/nvgpu/pci.c
parent6effe31755c3fc7578b10f39012983e33d80a9bf (diff)
gpu: nvgpu: Disable rail gating for dGPU
Bug 200224907 Change-Id: I515bba1987e54fb5ab78efda85916b6f0d3a4297 Signed-off-by: Lakshmanan M <lm@nvidia.com> Reviewed-on: http://git-master/r/1201233 (cherry picked from commit aa45908e77d451376728860cebe3938e765c4388) Reviewed-on: http://git-master/r/1201654 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/pci.c')
-rw-r--r--drivers/gpu/nvgpu/pci.c27
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}