diff options
author | Dave Jones <davej@redhat.com> | 2006-06-20 00:42:04 -0400 |
---|---|---|
committer | Dave Jones <davej@redhat.com> | 2006-06-20 00:42:04 -0400 |
commit | a4aec2622340e356e7dcd0e8fd05378dacb71c89 (patch) | |
tree | 628d70558f413870fe8407177ce9bae48ea53522 /drivers/char/agp | |
parent | 89d17b9604ae502392e119dbdbf43f6067745715 (diff) |
[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')
-rw-r--r-- | drivers/char/agp/ati-agp.c | 16 |
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) | |||
245 | 245 | ||
246 | 246 | ||
247 | #ifdef CONFIG_PM | 247 | #ifdef CONFIG_PM |
248 | static int agp_ati_resume(struct pci_dev *dev) | 248 | static int agp_ati_suspend(struct pci_dev *dev, pm_message_t state) |
249 | { | 249 | { |
250 | pci_restore_state(dev); | 250 | pci_save_state(dev); |
251 | pci_set_power_state (pdev, 3); | ||
251 | 252 | ||
252 | return ati_configure(); | 253 | return 0; |
253 | } | 254 | } |
254 | 255 | ||
255 | static int agp_ati_suspend(struct pci_dev *dev, pm_message_t state) | 256 | static int agp_ati_resume(struct pci_dev *dev) |
256 | { | 257 | { |
257 | pci_save_state(dev); | 258 | pci_set_power_state (pdev, 0); |
259 | pci_restore_state(dev); | ||
258 | 260 | ||
259 | return 0; | 261 | return ati_configure(); |
260 | } | 262 | } |
261 | #endif | 263 | #endif |
262 | 264 | ||
@@ -545,8 +547,8 @@ static struct pci_driver agp_ati_pci_driver = { | |||
545 | .probe = agp_ati_probe, | 547 | .probe = agp_ati_probe, |
546 | .remove = agp_ati_remove, | 548 | .remove = agp_ati_remove, |
547 | #ifdef CONFIG_PM | 549 | #ifdef CONFIG_PM |
548 | .resume = agp_ati_resume, | ||
549 | .suspend = agp_ati_suspend, | 550 | .suspend = agp_ati_suspend, |
551 | .resume = agp_ati_resume, | ||
550 | #endif | 552 | #endif |
551 | }; | 553 | }; |
552 | 554 | ||