Skip to contentSkip to conversation

intel_agp: restore graphics device's pci space early in resume

PATCH New Wang Zhenyu 1 participant 1 message Jan 17, 2007 Agpgart driver

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 intel_agp: restore graphics device's pci space early in resume

Dave,

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. So here's a patch to restore device's pci space early, which makes resuming ok with X. Patch against 2.6.20-rc5.

---

drivers/char/agp/intel-agp.c +9 -0
index ab0a9c0..7af734b 100644
@@ -1955,6 +1955,15 @@ static int agp_intel_resume(struct pci_d
 
 	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)