diff options
author | Rodrigo Vivi <rodrigo.vivi@intel.com> | 2023-07-26 01:11:55 +0300 |
---|---|---|
committer | Rodrigo Vivi <rodrigo.vivi@intel.com> | 2023-12-21 19:39:15 +0300 |
commit | f026520367be5f7e05531d6e601c822596ebe65f (patch) | |
tree | 9da201bc7125dd5fc810be0f26250079bdf51823 | |
parent | 8f3013e0b22206b27f37dcf1b96ce68df3393040 (diff) | |
download | linux-f026520367be5f7e05531d6e601c822596ebe65f.tar.xz |
drm/xe: Only set PCI d3cold_allowed when we are really allowing.
First of all it was strange to see:
if (allowed) {
...
} else {
D3COLD_ENABLE
}
But besides this misalignment, let's also use the pci
d3cold_allowed useful to us and know that we are not really
allowing d3cold.
Cc: Anshuman Gupta <anshuman.gupta@intel.com>
Reviewed-by: Anshuman Gupta <anshuman.gupta@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
-rw-r--r-- | drivers/gpu/drm/xe/xe_pci.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c index ae6e1394ff31..1a79c6a7dd5e 100644 --- a/drivers/gpu/drm/xe/xe_pci.c +++ b/drivers/gpu/drm/xe/xe_pci.c @@ -766,6 +766,7 @@ static int xe_pci_runtime_suspend(struct device *dev) pci_save_state(pdev); if (xe->d3cold.allowed) { + d3cold_toggle(pdev, D3COLD_ENABLE); pci_disable_device(pdev); pci_ignore_hotplug(pdev); pci_set_power_state(pdev, PCI_D3cold); @@ -795,8 +796,6 @@ static int xe_pci_runtime_resume(struct device *dev) return err; pci_set_master(pdev); - } else { - d3cold_toggle(pdev, D3COLD_ENABLE); } return xe_pm_runtime_resume(xe); |