From 20a7dbb5a4935e3f37ceeebd72fa5c21b3db0430 Mon Sep 17 00:00:00 2001 From: Eugene Shatokhin Date: Wed, 12 Aug 2015 19:47:25 +0300 Subject: [PATCH] drm/i915: gen3: work around hang during hibernation On ASUS EeePC 1015PE with kernel 3.18 and newer, there is a problem very similar to the one fixed for Lenovo by commit ab3be73fa7b4 ("drm/i915: gen4: work around hang during hibernation"). The laptop has Atom N455 CPU and an integrated graphics controller (PCI ID: 8086-a011-1043-83ac) managed by i915 module. When I try to put the system to hibernation, the hibernation image is created, the screen turns off but the laptop does not turn off after that (the fan continues to work, the leds are on, etc.) and the system seems to hang. This patch fixes the problem. Signed-off-by: Eugene Shatokhin --- drivers/gpu/drm/i915/i915_drv.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index 884b4f9..4de24b6 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -689,11 +689,17 @@ static int i915_drm_suspend_late(struct drm_device *drm_dev, bool hibernation) * power down the device properly. Platforms where this was seen: * Lenovo Thinkpad X301, X61s */ - if (!(hibernation && - drm_dev->pdev->subsystem_vendor == PCI_VENDOR_ID_LENOVO && - INTEL_INFO(dev_priv)->gen == 4)) - pci_set_power_state(drm_dev->pdev, PCI_D3hot); + if (hibernation && + drm_dev->pdev->subsystem_vendor == PCI_VENDOR_ID_LENOVO && + INTEL_INFO(dev_priv)->gen == 4) + return 0; + + /* A similar problem was found on some ASUS systems with GEN3. */ + if (drm_dev->pdev->subsystem_vendor == PCI_VENDOR_ID_ASUSTEK && + INTEL_INFO(dev_priv)->gen == 3) + return 0; + pci_set_power_state(drm_dev->pdev, PCI_D3hot); return 0; } -- 2.3.2