Skip to content

Commit

Permalink
[AGPGART] intel_agp: restore graphics device's pci space early in resume
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Wang Zhenyu authored and Dave Jones committed Jan 17, 2007
1 parent 7b37b06 commit 4b95320
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions drivers/char/agp/intel-agp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1955,6 +1955,15 @@ static int agp_intel_resume(struct pci_dev *pdev)

pci_restore_state(pdev);

/* We should restore our graphics device's config space,
* as host bridge (00:00) resumes before graphics device (02:00),
* then our access to its pci space can work right.
*/
if (intel_i810_private.i810_dev)
pci_restore_state(intel_i810_private.i810_dev);
if (intel_i830_private.i830_dev)
pci_restore_state(intel_i830_private.i830_dev);

if (bridge->driver == &intel_generic_driver)
intel_configure();
else if (bridge->driver == &intel_850_driver)
Expand Down

0 comments on commit 4b95320

Please sign in to comment.