summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nouveau_drv.c
diff options
context:
space:
mode:
authorFrancisco Jerez2010-07-23 20:29:13 +0200
committerBen Skeggs2010-07-26 03:43:25 +0200
commite04d8e829d7807e132d8c82c3554b164a803c617 (patch)
tree59a48dcafc2791869ec79b57616d2d83b71754f5 /drivers/gpu/drm/nouveau/nouveau_drv.c
parentdrm/nv30: Init the PFB+0x3xx memory timing regs. (diff)
downloadkernel-qcow2-linux-e04d8e829d7807e132d8c82c3554b164a803c617.tar.gz
kernel-qcow2-linux-e04d8e829d7807e132d8c82c3554b164a803c617.tar.xz
kernel-qcow2-linux-e04d8e829d7807e132d8c82c3554b164a803c617.zip
drm/nouveau: Reset AGP before running the init scripts.
BIOS scripts usually make an attempt to reset the AGP controller, however on some nv4x cards doing it properly involves switching FW off and on: if we do that without updating the AGP bridge settings accordingly (e.g. with the corresponding calls to agp_enable()) we will be locking ourselves out of the card MMIO space. Do it from nouveau_mem_reset_agp() before the init scripts are executed. Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_drv.c')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_drv.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.c b/drivers/gpu/drm/nouveau/nouveau_drv.c
index e93fbcc56da5..eeaf1f15a428 100644
--- a/drivers/gpu/drm/nouveau/nouveau_drv.c
+++ b/drivers/gpu/drm/nouveau/nouveau_drv.c
@@ -259,6 +259,10 @@ nouveau_pci_resume(struct pci_dev *pdev)
return -1;
pci_set_master(dev->pdev);
+ /* Make sure the AGP controller is in a consistent state */
+ if (dev_priv->gart_info.type == NOUVEAU_GART_AGP)
+ nouveau_mem_reset_agp(dev);
+
NV_INFO(dev, "POSTing device...\n");
ret = nouveau_run_vbios_init(dev);
if (ret)