summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/dev/pci/agp_i810.c33
1 files changed, 14 insertions, 19 deletions
diff --git a/sys/dev/pci/agp_i810.c b/sys/dev/pci/agp_i810.c
index 2712e2bffe6..e61a93633bb 100644
--- a/sys/dev/pci/agp_i810.c
+++ b/sys/dev/pci/agp_i810.c
@@ -664,29 +664,24 @@ agp_i810_activate(struct device *arg, int act)
void
agp_i810_configure(struct agp_i810_softc *isc)
{
- agp_flush_cache();
+ bus_addr_t tmp;
+
+ tmp = isc->isc_apaddr;
+ if (isc->chiptype == CHIP_I810) {
+ tmp += isc->dcache_size;
+ } else {
+ tmp += isc->stolen << AGP_PAGE_SHIFT;
+ }
+ agp_flush_cache();
/* Install the GATT. */
WRITE4(AGP_I810_PGTBL_CTL, isc->gatt->ag_physical | 1);
- /*
- * First time around, we initialise all GTT entries to point
- * to a scribble page. For suspend/resume, we hope the
- * contents will be preserved by the BIOS. What about
- * hibernate?
- */
- if (isc->agpdev == NULL) {
- bus_addr_t tmp = isc->isc_apaddr;
-
- if (isc->chiptype == CHIP_I810)
- tmp += isc->dcache_size;
- else
- tmp += isc->stolen << AGP_PAGE_SHIFT;
-
- for (; tmp < (isc->isc_apaddr + isc->isc_apsize);
- tmp += AGP_PAGE_SIZE)
- agp_i810_unbind_page(isc, tmp);
- }
+ /* initialise all gtt entries to point to scribble page */
+ for (; tmp < (isc->isc_apaddr + isc->isc_apsize);
+ tmp += AGP_PAGE_SIZE)
+ agp_i810_unbind_page(isc, tmp);
+ /* XXX we'll need to restore the GTT contents when we go kms */
/*
* Make sure the chipset can see everything.