Re: [PATCH] Add basic PM support for Nvidia and ATI AGP bridges

Pavel Machek
2005-11-25T21:02:07Z

Hi!

> I retrieved these from the swsusp2 patchset, but they seem to be
> independently useful. As a result, I'm not sure who the original author
> is - however, they seem to be pretty obvious.
>
> ## All lines beginning with `## DP:' are a description of the patch.
> ## DP: Description: Add suspend/resume support to ATI and Nvidia AGP bridges
> ## DP: Patch author: Unknown
> ## DP: Upstream status: Not submitted
>
> . $(dirname $0)/DPATCH

> @@ -507,6 +507,33 @@ static void __devexit agp_ati_remove(str
> agp_put_bridge(bridge);
> }
>
> +#ifdef CONFIG_PM
> +
> +static int agp_ati_suspend(struct pci_dev *pdev, pm_message_t state)
> +{
> + pci_save_state (pdev);
> + pci_set_power_state (pdev, 3);

PCI_D3hot, please.

> +static int agp_ati_resume(struct pci_dev *pdev)
> +{
> + struct agp_bridge_data *bridge = pci_get_drvdata(pdev);
> +
> + /* set power state 0 and restore PCI space */
> + pci_set_power_state (pdev, 0);

PCI_D0... ....and same in other two functions. Otherwise it looks ok.

Pavel
--
Thanks, Sharp!