From: Lukas Wunner Date: Sun, 19 Apr 2015 15:18:01 +0000 (+0200) Subject: drm/nouveau: Pause between setting gpu to D3hot and cutting the power X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=c5fd936e992dd2829167d2adc63e151675ca6898;p=sagit-ice-cold%2Fkernel_xiaomi_msm8998.git drm/nouveau: Pause between setting gpu to D3hot and cutting the power On the MacBook Pro, power of the gpu is cut by a gmux chip. Sometimes the gpu gets stuck in powersaving mode and refuses to wake up ("Refused to change power state, currently in D3"). Inserting a delay between setting the gpu to D3hot and cutting the power seems to help (most of the time). This issue and its (partial) remediation by the patch was observed with an Nvidia GT650M (NVE7 / GK107). Signed-off-by: Lukas Wunner Signed-off-by: Dave Airlie --- diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c index 89049335b738..649024d4daf1 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drm.c +++ b/drivers/gpu/drm/nouveau/nouveau_drm.c @@ -23,6 +23,7 @@ */ #include +#include #include #include #include @@ -666,6 +667,7 @@ nouveau_pmops_suspend(struct device *dev) pci_save_state(pdev); pci_disable_device(pdev); pci_set_power_state(pdev, PCI_D3hot); + udelay(200); return 0; }