]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[AGPGART] Suspend/Resume support for ATI GART
authorakpm@osdl.org <akpm@osdl.org>
Wed, 4 Jan 2006 07:00:59 +0000 (23:00 -0800)
committerDave Jones <davej@redhat.com>
Tue, 17 Jan 2006 04:53:45 +0000 (20:53 -0800)
Add suspend/resume support for the ati-agp module

Signed-off-by: Jaco Kroon <jaco@kroon.co.za>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Dave Jones <davej@redhat.com>
drivers/char/agp/ati-agp.c

index 53372a83b6758420e7c586cdd20ceb79e412050b..5b74c36c116c7e112c0265ddf147e249586d8981 100644 (file)
@@ -244,6 +244,22 @@ static int ati_configure(void)
 }
 
 
+#ifdef CONFIG_PM
+static int agp_ati_resume(struct pci_dev *dev)
+{
+       pci_restore_state(dev);
+
+       return ati_configure();
+}
+
+static int agp_ati_suspend(struct pci_dev *dev, pm_message_t state)
+{
+       pci_save_state(dev);
+
+       return 0;
+}
+#endif
+
 /*
  *Since we don't need contigious memory we just try
  * to get the gatt table once
@@ -525,6 +541,10 @@ static struct pci_driver agp_ati_pci_driver = {
        .id_table       = agp_ati_pci_table,
        .probe          = agp_ati_probe,
        .remove         = agp_ati_remove,
+#ifdef CONFIG_PM
+       .resume         = agp_ati_resume,
+       .suspend        = agp_ati_suspend,
+#endif
 };
 
 static int __init agp_ati_init(void)