aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWang Zhenyu <zhenyu.z.wang@intel.com>2007-01-16 22:07:54 -0500
committerDave Jones <davej@redhat.com>2007-01-17 00:26:30 -0500
commit4b95320fc4d21b0ff2f8604305dd6c851aff6096 (patch)
treee19b8e1c8177ed8a2715f723e278fcd19381807e
parent7b37b064c294af350c462f77d7a9a44485a93684 (diff)
[AGPGART] intel_agp: restore graphics device's pci space early in resume
Currently in resuming path graphics device's pci space restore is behind host bridge, so resume function wrongly accesses graphics device's space. This makes resuming failure which crashed X. here's a patch to restore device's pci space early, which makes resuming ok with X. Signed-off-by: Wang Zhenyu <zhenyu.z.wang@intel.com> Signed-off-by: Dave Jones <davej@redhat.com>
-rw-r--r--drivers/char/agp/intel-agp.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/char/agp/intel-agp.c b/drivers/char/agp/intel-agp.c
index ab0a9c0ad7c0..a3011de51f7c 100644
--- a/drivers/char/agp/intel-agp.c
+++ b/drivers/char/agp/intel-agp.c
@@ -1955,6 +1955,15 @@ static int agp_intel_resume(struct pci_dev *pdev)
1955 1955
1956 pci_restore_state(pdev); 1956 pci_restore_state(pdev);
1957 1957
1958 /* We should restore our graphics device's config space,
1959 * as host bridge (00:00) resumes before graphics device (02:00),
1960 * then our access to its pci space can work right.
1961 */
1962 if (intel_i810_private.i810_dev)
1963 pci_restore_state(intel_i810_private.i810_dev);
1964 if (intel_i830_private.i830_dev)
1965 pci_restore_state(intel_i830_private.i830_dev);
1966
1958 if (bridge->driver == &intel_generic_driver) 1967 if (bridge->driver == &intel_generic_driver)
1959 intel_configure(); 1968 intel_configure();
1960 else if (bridge->driver == &intel_850_driver) 1969 else if (bridge->driver == &intel_850_driver)