diff options
author | Alan Hourihane <alanh@tungstengraphics.com> | 2008-02-21 11:37:07 +0000 |
---|---|---|
committer | Alan Hourihane <alanh@tungstengraphics.com> | 2008-02-21 11:37:07 +0000 |
commit | ea3de6daa4226cdcc4b50c339e0df6130014d2fe (patch) | |
tree | 097d8da67aff49eae70dd86359621e1901c9bc5b /linux-core/i915_drv.c | |
parent | 3f6c8f64aa8c3a9e427d453433e828693fb4e017 (diff) | |
parent | 374b41e5bcdb5c22471c8c16dd794ac54c4f76d2 (diff) |
Merge branch 'master' of git+ssh://git.freedesktop.org/git/mesa/drm into modesetting-101
Conflicts:
linux-core/drm_sysfs.c
Diffstat (limited to 'linux-core/i915_drv.c')
-rw-r--r-- | linux-core/i915_drv.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/linux-core/i915_drv.c b/linux-core/i915_drv.c index 64c805f5..0123d412 100644 --- a/linux-core/i915_drv.c +++ b/linux-core/i915_drv.c @@ -264,7 +264,7 @@ static void i915_restore_vga(struct drm_device *dev) } -static int i915_suspend(struct drm_device *dev) +static int i915_suspend(struct drm_device *dev, pm_message_t state) { struct drm_i915_private *dev_priv = dev->dev_private; int i; @@ -275,6 +275,9 @@ static int i915_suspend(struct drm_device *dev) return -ENODEV; } + if (state.event == PM_EVENT_PRETHAW) + return 0; + pci_save_state(dev->pdev); pci_read_config_byte(dev->pdev, LBB, &dev_priv->saveLBB); @@ -389,9 +392,11 @@ static int i915_suspend(struct drm_device *dev) i915_save_vga(dev); - /* Shut down the device */ - pci_disable_device(dev->pdev); - pci_set_power_state(dev->pdev, PCI_D3hot); + if (state.event == PM_EVENT_SUSPEND) { + /* Shut down the device */ + pci_disable_device(dev->pdev); + pci_set_power_state(dev->pdev, PCI_D3hot); + } return 0; } |