mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
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>
This commit is contained in:
committed by
Terje Bergstrom
parent
6effe31755
commit
1b216d778a
@@ -47,6 +47,7 @@ static struct gk20a_platform nvgpu_pci_device = {
|
||||
|
||||
/* power management configuration */
|
||||
.railgate_delay = 500,
|
||||
.can_railgate = false,
|
||||
.can_elpg = false,
|
||||
|
||||
/* power management callbacks */
|
||||
@@ -165,17 +166,21 @@ static int nvgpu_pci_pm_init(struct device *dev)
|
||||
#ifdef CONFIG_PM
|
||||
struct gk20a_platform *platform = gk20a_get_platform(dev);
|
||||
|
||||
if (platform->railgate_delay)
|
||||
pm_runtime_set_autosuspend_delay(dev,
|
||||
platform->railgate_delay);
|
||||
if (!platform->can_railgate) {
|
||||
pm_runtime_disable(dev);
|
||||
} else {
|
||||
if (platform->railgate_delay)
|
||||
pm_runtime_set_autosuspend_delay(dev,
|
||||
platform->railgate_delay);
|
||||
|
||||
/*
|
||||
* Runtime PM for PCI devices is disabled by default,
|
||||
* so we need to enable it first
|
||||
*/
|
||||
pm_runtime_use_autosuspend(dev);
|
||||
pm_runtime_put_noidle(dev);
|
||||
pm_runtime_allow(dev);
|
||||
/*
|
||||
* Runtime PM for PCI devices is disabled by default,
|
||||
* so we need to enable it first
|
||||
*/
|
||||
pm_runtime_use_autosuspend(dev);
|
||||
pm_runtime_put_noidle(dev);
|
||||
pm_runtime_allow(dev);
|
||||
}
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user