Skip to contentSkip to conversation

drm/nouveau: suspend to D3hot, not to D3cold

PATCH NAK Maarten Lankhorst 2 participants 2 messages Oct 8, 2013 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/nouveau: suspend to D3hot, not to D3cold

In the autumn and winter it's considered bad form to set power state to D3cold, it might cause the device to freeze to death. This is also the case in the other seasons, so any device in the southern hemisphere is affected too.

D3cold is not a valid state in a call to pci_set_power_state, only up to D3hot is allowed.

---

drivers/gpu/drm/nouveau/nouveau_drm.c +1 -1
index 89efeff..566e544 100644
@@ -945,7 +945,7 @@ static int nouveau_pmops_runtime_suspend(struct device *dev)
 	ret = nouveau_do_suspend(drm_dev);
 	pci_save_state(pdev);
 	pci_disable_device(pdev);
-	pci_set_power_state(pdev, PCI_D3cold);
+	pci_set_power_state(pdev, PCI_D3hot);
 	drm_dev->switch_power_state = DRM_SWITCH_POWER_DYNAMIC_OFF;
 	return ret;
 }
#2 lore raw
In reply to a message not in the archive
Quoted 5 lines · Maarten Lankhorst

In the autumn and winter it's considered bad form to set power state to D3cold, it might cause the device to freeze to death. This is also the case in the other seasons, so any device in the southern hemisphere is affected too.

D3cold is not a valid state in a call to pci_set_power_state, only up to D3hot is allowed.

NAK,

pci_set_power_state calls pci_platform_pm->set_state, which should be acpi_pci_set_power_state, which clearly accepts D3cold as a parameter.

The only reason the HDMI audio driver doesn't use D3cold is because it has no acpi handle for the device.

Dave.