drm/nouveau: Don't clear AGPCMD completely on INIT_RESET.
authorFrancisco Jerez <currojerez@riseup.net>
Thu, 17 Jun 2010 10:42:14 +0000 (12:42 +0200)
committerBen Skeggs <bskeggs@redhat.com>
Tue, 13 Jul 2010 00:13:04 +0000 (10:13 +1000)
We just need to clear the SBA and ENABLE bits to reset the AGP
controller: If the AGP bridge was configured to use "fast writes",
clearing the FW bit would break the subsequent MMIO writes and
eventually end with a lockup.

Note that all the BIOSes I've seen do the same as we did (it works for
them because they don't use MMIO), OTOH the blob leaves FW untouched.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nouveau_bios.c

index fc924b64919529cfccc14a85c3eb28ae0ab8f50d..9ab0c83fe9be74c50a1ce7635eb2e1ecc679b9bc 100644 (file)
@@ -2146,7 +2146,8 @@ init_reset(struct nvbios *bios, uint16_t offset, struct init_exec *iexec)
        /* no iexec->execute check by design */
 
        pci_nv_19 = bios_rd32(bios, NV_PBUS_PCI_NV_19);
-       bios_wr32(bios, NV_PBUS_PCI_NV_19, 0);
+       bios_wr32(bios, NV_PBUS_PCI_NV_19, pci_nv_19 & ~0xf00);
+
        bios_wr32(bios, reg, value1);
 
        udelay(10);