aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nouveau_mem.c
diff options
context:
space:
mode:
authorFrancisco Jerez <currojerez@riseup.net>2010-08-26 10:13:49 -0400
committerBen Skeggs <bskeggs@redhat.com>2010-09-24 02:17:52 -0400
commit316f60a120a8f1dacb574f705d5faf7eac3e6e2a (patch)
tree19a50e89792e5214a22d77ade945790b19370b49 /drivers/gpu/drm/nouveau/nouveau_mem.c
parent4a445f291ac3faa08f56eaeb6e44856b6b72b74c (diff)
drm/nouveau: Fix suspend on some nv4x AGP cards.
On some nv4x cards (specifically, the ones that use an internal PCIE->AGP bridge) the AGP controller state isn't preserved after a suspend/resume cycle, and the AGP control registers have moved from 0x18xx to 0x100xx, so the FW check in nouveau_mem_reset_agp() doesn't quite work. Check "dev->agp->mode" instead. Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_mem.c')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_mem.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_mem.c b/drivers/gpu/drm/nouveau/nouveau_mem.c
index 9689d4147686..c14466ba69ba 100644
--- a/drivers/gpu/drm/nouveau/nouveau_mem.c
+++ b/drivers/gpu/drm/nouveau/nouveau_mem.c
@@ -355,7 +355,8 @@ nouveau_mem_reset_agp(struct drm_device *dev)
355 /* First of all, disable fast writes, otherwise if it's 355 /* First of all, disable fast writes, otherwise if it's
356 * already enabled in the AGP bridge and we disable the card's 356 * already enabled in the AGP bridge and we disable the card's
357 * AGP controller we might be locking ourselves out of it. */ 357 * AGP controller we might be locking ourselves out of it. */
358 if (nv_rd32(dev, NV04_PBUS_PCI_NV_19) & PCI_AGP_COMMAND_FW) { 358 if ((nv_rd32(dev, NV04_PBUS_PCI_NV_19) |
359 dev->agp->mode) & PCI_AGP_COMMAND_FW) {
359 struct drm_agp_info info; 360 struct drm_agp_info info;
360 struct drm_agp_mode mode; 361 struct drm_agp_mode mode;
361 362