Messages in this thread | | | Date | Fri, 25 Nov 2005 22:01:56 +0100 | From | Pavel Machek <> | Subject | Re: [PATCH] Add basic PM support for Nvidia and ATI AGP bridges |
| |
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! - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |