Skip to content

Commit

Permalink
[AGPGART] Suspend/Resume improvements for ATI AGP
Browse files Browse the repository at this point in the history
Based on patches in the Ubuntu kernel.

Signed-off-by: Ben Collins <bcollins@ubuntu.com>
Signed-off-by: Dave Jones <davej@redhat.com>
  • Loading branch information
Dave Jones committed Jun 20, 2006
1 parent 89d17b9 commit a4aec26
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions drivers/char/agp/ati-agp.c
Original file line number Diff line number Diff line change
Expand Up @@ -245,18 +245,20 @@ static int ati_configure(void)


#ifdef CONFIG_PM
static int agp_ati_resume(struct pci_dev *dev)
static int agp_ati_suspend(struct pci_dev *dev, pm_message_t state)
{
pci_restore_state(dev);
pci_save_state(dev);
pci_set_power_state (pdev, 3);

return ati_configure();
return 0;
}

static int agp_ati_suspend(struct pci_dev *dev, pm_message_t state)
static int agp_ati_resume(struct pci_dev *dev)
{
pci_save_state(dev);
pci_set_power_state (pdev, 0);
pci_restore_state(dev);

return 0;
return ati_configure();
}
#endif

Expand Down Expand Up @@ -545,8 +547,8 @@ static struct pci_driver agp_ati_pci_driver = {
.probe = agp_ati_probe,
.remove = agp_ati_remove,
#ifdef CONFIG_PM
.resume = agp_ati_resume,
.suspend = agp_ati_suspend,
.resume = agp_ati_resume,
#endif
};

Expand Down

0 comments on commit a4aec26

Please sign in to comment.