diff options
author | Mark Kettenis <kettenis@openbsd.org> | 2013-03-10 12:35:49 +0100 |
---|---|---|
committer | Mark Kettenis <kettenis@openbsd.org> | 2013-03-10 12:35:49 +0100 |
commit | 098330ce3b0d632c91d1090795a9bdd550ba533e (patch) | |
tree | f8513c21b994ac0f7202e3b21fc6970c21202705 | |
parent | b1361be904ba4bf7b96302b9b1b42a4fd45fc551 (diff) |
Revert f7940bd8bd7da9bbfd38e41d99edb378dd9b4df7. Now that we we rebind
objects after resume we can reinitialize the GATT again.
-rw-r--r-- | sys/dev/pci/agp_i810.c | 33 |
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. |