Skip to contentSkip to conversation

ati-agp suspend/resume support

PATCH New Jaco Kroon 1 participant 1 message Dec 27, 2005 Agpgart driver

lore
Share & tools
lore

Jaco Kroon

author
#0 lore raw

PATCH 1/1 ati-agp suspend/resume support

Add suspend/resume support for the ati-agp module

drivers/char/agp/ati-agp.c renamed from drivers/char/agp/ati-agp.c.orig +20 -0
@@ -244,6 +244,22 @@
 }
 
 
+#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 @@
 	.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)