Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 86007
b: refs/heads/master
c: b932ccb
h: refs/heads/master
i:
  86005: d0c6e20
  86003: 1f82916
  85999: 6085d84
v: v3
  • Loading branch information
Dave Airlie committed Feb 20, 2008
1 parent 6942677 commit 8d074f2
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: da636ad6a0d72eb5cb99738056af0bcc3db9ef9d
refs/heads/master: b932ccb5674eb649133b5c33950405c37d17aab3
2 changes: 1 addition & 1 deletion trunk/drivers/char/drm/drmP.h
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ struct drm_driver {
void (*postclose) (struct drm_device *, struct drm_file *);
void (*lastclose) (struct drm_device *);
int (*unload) (struct drm_device *);
int (*suspend) (struct drm_device *);
int (*suspend) (struct drm_device *, pm_message_t state);
int (*resume) (struct drm_device *);
int (*dma_ioctl) (struct drm_device *dev, void *data, struct drm_file *file_priv);
void (*dma_ready) (struct drm_device *);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/char/drm/drm_sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ static int drm_sysfs_suspend(struct device *dev, pm_message_t state)
printk(KERN_ERR "%s\n", __FUNCTION__);

if (drm_dev->driver->suspend)
return drm_dev->driver->suspend(drm_dev);
return drm_dev->driver->suspend(drm_dev, state);

return 0;
}
Expand Down
13 changes: 9 additions & 4 deletions trunk/drivers/char/drm/i915_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,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;
Expand All @@ -249,6 +249,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);

Expand Down Expand Up @@ -363,9 +366,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;
}
Expand Down

0 comments on commit 8d074f2

Please sign in to comment.