Commit 6eecba33 authored by Chris Wilson's avatar Chris Wilson

drm/i915: Disable output polling across suspend & resume

Suspending (especially hibernating) may take a finite amount of time,
during which a hotplug event may trigger and we will attempt to handle
it with inconsistent state. Disable hotplug polling around suspend and
resume.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=30070Reported-by: default avatarRui Tiago Matos <tiagomatos@gmail.com>
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
parent ae83dd5c
...@@ -1172,10 +1172,8 @@ static void i915_switcheroo_set_state(struct pci_dev *pdev, enum vga_switcheroo_ ...@@ -1172,10 +1172,8 @@ static void i915_switcheroo_set_state(struct pci_dev *pdev, enum vga_switcheroo_
/* i915 resume handler doesn't set to D0 */ /* i915 resume handler doesn't set to D0 */
pci_set_power_state(dev->pdev, PCI_D0); pci_set_power_state(dev->pdev, PCI_D0);
i915_resume(dev); i915_resume(dev);
drm_kms_helper_poll_enable(dev);
} else { } else {
printk(KERN_ERR "i915: switched off\n"); printk(KERN_ERR "i915: switched off\n");
drm_kms_helper_poll_disable(dev);
i915_suspend(dev, pmm); i915_suspend(dev, pmm);
} }
} }
......
...@@ -281,6 +281,8 @@ int i915_suspend(struct drm_device *dev, pm_message_t state) ...@@ -281,6 +281,8 @@ int i915_suspend(struct drm_device *dev, pm_message_t state)
if (state.event == PM_EVENT_PRETHAW) if (state.event == PM_EVENT_PRETHAW)
return 0; return 0;
drm_kms_helper_poll_disable(dev);
error = i915_drm_freeze(dev); error = i915_drm_freeze(dev);
if (error) if (error)
return error; return error;
...@@ -325,12 +327,19 @@ static int i915_drm_thaw(struct drm_device *dev) ...@@ -325,12 +327,19 @@ static int i915_drm_thaw(struct drm_device *dev)
int i915_resume(struct drm_device *dev) int i915_resume(struct drm_device *dev)
{ {
int ret;
if (pci_enable_device(dev->pdev)) if (pci_enable_device(dev->pdev))
return -EIO; return -EIO;
pci_set_master(dev->pdev); pci_set_master(dev->pdev);
return i915_drm_thaw(dev); ret = i915_drm_thaw(dev);
if (ret)
return ret;
drm_kms_helper_poll_enable(dev);
return 0;
} }
static int i965_reset_complete(struct drm_device *dev) static int i965_reset_complete(struct drm_device *dev)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment