Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 31262
b: refs/heads/master
c: c5f2f26
h: refs/heads/master
v: v3
  • Loading branch information
Dave Jones committed Jun 20, 2006
1 parent a78fbf0 commit 553570d
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a4aec2622340e356e7dcd0e8fd05378dacb71c89
refs/heads/master: c5f2f261e7a47e4c72723cdcbe99e1bd771a81ea
29 changes: 29 additions & 0 deletions trunk/drivers/char/agp/nvidia-agp.c
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,31 @@ static void __devexit agp_nvidia_remove(struct pci_dev *pdev)
agp_put_bridge(bridge);
}

#ifdef CONFIG_PM
static int agp_nvidia_suspend(struct pci_dev *pdev, pm_message_t state)
{
pci_save_state (pdev);
pci_set_power_state (pdev, 3);

return 0;
}

static int agp_nvidia_resume(struct pci_dev *pdev)
{
struct agp_bridge_data *bridge = pci_get_drvdata(pdev);

/* set power state 0 and restore PCI space */
pci_set_power_state (pdev, 0);
pci_restore_state(pdev);

/* reconfigure AGP hardware again */
nvidia_configure();

return 0;
}
#endif


static struct pci_device_id agp_nvidia_pci_table[] = {
{
.class = (PCI_CLASS_BRIDGE_HOST << 8),
Expand Down Expand Up @@ -403,6 +428,10 @@ static struct pci_driver agp_nvidia_pci_driver = {
.id_table = agp_nvidia_pci_table,
.probe = agp_nvidia_probe,
.remove = agp_nvidia_remove,
#ifdef CONFIG_PM
.suspend = agp_nvidia_suspend,
.resume = agp_nvidia_resume,
#endif
};

static int __init agp_nvidia_init(void)
Expand Down

0 comments on commit 553570d

Please sign in to comment.