summaryrefslogtreecommitdiffstats
path: root/drivers/char/agp/ati-agp.c
diff options
context:
space:
mode:
authorDave Jones <davej@redhat.com>2006-06-20 00:42:04 -0400
committerDave Jones <davej@redhat.com>2006-06-20 00:42:04 -0400
commita4aec2622340e356e7dcd0e8fd05378dacb71c89 (patch)
tree628d70558f413870fe8407177ce9bae48ea53522 /drivers/char/agp/ati-agp.c
parent89d17b9604ae502392e119dbdbf43f6067745715 (diff)
downloadblackbird-op-linux-a4aec2622340e356e7dcd0e8fd05378dacb71c89.tar.gz
blackbird-op-linux-a4aec2622340e356e7dcd0e8fd05378dacb71c89.zip
[AGPGART] Suspend/Resume improvements for ATI AGP
Based on patches in the Ubuntu kernel. Signed-off-by: Ben Collins <bcollins@ubuntu.com> Signed-off-by: Dave Jones <davej@redhat.com>
Diffstat (limited to 'drivers/char/agp/ati-agp.c')
-rw-r--r--drivers/char/agp/ati-agp.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/char/agp/ati-agp.c b/drivers/char/agp/ati-agp.c
index 6db9b7f436aa..34bbd41f062a 100644
--- a/drivers/char/agp/ati-agp.c
+++ b/drivers/char/agp/ati-agp.c
@@ -245,18 +245,20 @@ static int ati_configure(void)
#ifdef CONFIG_PM
-static int agp_ati_resume(struct pci_dev *dev)
+static int agp_ati_suspend(struct pci_dev *dev, pm_message_t state)
{
- pci_restore_state(dev);
+ pci_save_state(dev);
+ pci_set_power_state (pdev, 3);
- return ati_configure();
+ return 0;
}
-static int agp_ati_suspend(struct pci_dev *dev, pm_message_t state)
+static int agp_ati_resume(struct pci_dev *dev)
{
- pci_save_state(dev);
+ pci_set_power_state (pdev, 0);
+ pci_restore_state(dev);
- return 0;
+ return ati_configure();
}
#endif
@@ -545,8 +547,8 @@ static struct pci_driver agp_ati_pci_driver = {
.probe = agp_ati_probe,
.remove = agp_ati_remove,
#ifdef CONFIG_PM
- .resume = agp_ati_resume,
.suspend = agp_ati_suspend,
+ .resume = agp_ati_resume,
#endif
};
OpenPOWER on IntegriCloud