public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ati-agp suspend/resume support
@ 2005-12-25 20:29 Jaco Kroon
  2005-12-25 21:14 ` Pavel Machek
  0 siblings, 1 reply; 4+ messages in thread
From: Jaco Kroon @ 2005-12-25 20:29 UTC (permalink / raw)
  To: davej; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 941 bytes --]

Based on the patch at
http://unixhead.org/docs/thinkpad/ati-agp/ati-agp.diff, add support for
suspend/resume in the ati-agp module.

Signed-of-by: Jaco Kroon <jaco@kroon.co.za>

--- linux-2.6.15-rc6/drivers/char/agp/ati-agp.c.orig	2005-12-25
22:21:32.000000000 +0200
+++ linux-2.6.15-rc6/drivers/char/agp/ati-agp.c	2005-12-25
22:23:33.000000000 +0200
@@ -243,6 +243,15 @@
 	return 0;
 }

+static int ati_resume(struct pci_dev *dev)
+{
+	return ati_configure();
+}
+
+static int ati_suspend(struct pci_dev *dev, pm_message_t state)
+{
+	return 0;
+}

 /*
  *Since we don't need contigious memory we just try
@@ -525,6 +534,8 @@
 	.id_table	= agp_ati_pci_table,
 	.probe		= agp_ati_probe,
 	.remove		= agp_ati_remove,
+	.resume		= ati_resume,
+	.suspend	= ati_suspend,
 };

 static int __init agp_ati_init(void)

-- 
There are only 10 kinds of people in this world,
  those that understand binary and those that don't.
http://www.kroon.co.za/

[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/x-pkcs7-signature, Size: 3166 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread
* [PATCH] ati-agp suspend/resume support
@ 2005-12-27 19:39 Jaco Kroon
  0 siblings, 0 replies; 4+ messages in thread
From: Jaco Kroon @ 2005-12-27 19:39 UTC (permalink / raw)
  To: davej; +Cc: akpm, linux-kernel, Pavel Machek

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>

--- linux-2.6.15-rc6/drivers/char/agp/ati-agp.c.orig	2005-12-27 21:14:10.000000000 +0200
+++ linux-2.6.15-rc6/drivers/char/agp/ati-agp.c	2005-12-27 21:14:58.000000000 +0200
@@ -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)

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-12-27 19:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-25 20:29 [PATCH] ati-agp suspend/resume support Jaco Kroon
2005-12-25 21:14 ` Pavel Machek
2005-12-26  4:52   ` Jaco Kroon
  -- strict thread matches above, loose matches on Subject: below --
2005-12-27 19:39 Jaco Kroon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox