diff options
| author | Stuart Bennett <sb476@cam.ac.uk> | 2008-01-08 08:14:07 -0500 |
|---|---|---|
| committer | Dave Airlie <airlied@linux.ie> | 2008-02-18 23:44:40 -0500 |
| commit | 16469a0ea0f6b7562eac98ebb8a7c41ce902d0b1 (patch) | |
| tree | 7164bb8c984b99d3edea1411d24d472d8c61bb39 /drivers/char/agp | |
| parent | b7d0640f9229a9426ba9223796329c4f0cc4acb9 (diff) | |
agp/sis: Suspend support for SiS AGP
Tested on M650 chipset
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/char/agp')
| -rw-r--r-- | drivers/char/agp/sis-agp.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/drivers/char/agp/sis-agp.c b/drivers/char/agp/sis-agp.c index aaa1883f076c..6cf54fe60207 100644 --- a/drivers/char/agp/sis-agp.c +++ b/drivers/char/agp/sis-agp.c | |||
| @@ -214,6 +214,26 @@ static void __devexit agp_sis_remove(struct pci_dev *pdev) | |||
| 214 | agp_put_bridge(bridge); | 214 | agp_put_bridge(bridge); |
| 215 | } | 215 | } |
| 216 | 216 | ||
| 217 | #ifdef CONFIG_PM | ||
| 218 | |||
| 219 | static int agp_sis_suspend(struct pci_dev *pdev, pm_message_t state) | ||
| 220 | { | ||
| 221 | pci_save_state(pdev); | ||
| 222 | pci_set_power_state(pdev, pci_choose_state(pdev, state)); | ||
| 223 | |||
| 224 | return 0; | ||
| 225 | } | ||
| 226 | |||
| 227 | static int agp_sis_resume(struct pci_dev *pdev) | ||
| 228 | { | ||
| 229 | pci_set_power_state(pdev, PCI_D0); | ||
| 230 | pci_restore_state(pdev); | ||
| 231 | |||
| 232 | return sis_driver.configure(); | ||
| 233 | } | ||
| 234 | |||
| 235 | #endif /* CONFIG_PM */ | ||
| 236 | |||
| 217 | static struct pci_device_id agp_sis_pci_table[] = { | 237 | static struct pci_device_id agp_sis_pci_table[] = { |
| 218 | { | 238 | { |
| 219 | .class = (PCI_CLASS_BRIDGE_HOST << 8), | 239 | .class = (PCI_CLASS_BRIDGE_HOST << 8), |
| @@ -393,6 +413,10 @@ static struct pci_driver agp_sis_pci_driver = { | |||
| 393 | .id_table = agp_sis_pci_table, | 413 | .id_table = agp_sis_pci_table, |
| 394 | .probe = agp_sis_probe, | 414 | .probe = agp_sis_probe, |
| 395 | .remove = agp_sis_remove, | 415 | .remove = agp_sis_remove, |
| 416 | #ifdef CONFIG_PM | ||
| 417 | .suspend = agp_sis_suspend, | ||
| 418 | .resume = agp_sis_resume, | ||
| 419 | #endif | ||
| 396 | }; | 420 | }; |
| 397 | 421 | ||
| 398 | static int __init agp_sis_init(void) | 422 | static int __init agp_sis_init(void) |
