aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nouveau_drv.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2010-10-25 15:23:59 +1000
committerBen Skeggs <bskeggs@redhat.com>2010-12-03 15:11:47 +1000
commitdc1e5c0dbff27c2b5147eaea16c578d2337870c3 (patch)
tree82b7bd25bd162d5a9bcc5ee0598e697e1ddbd08e /drivers/gpu/drm/nouveau/nouveau_drv.c
parentfce2bad0ee2666d6a10bfeb634b1021469cc3d79 (diff)
downloadkernel_samsung_smdk4412-dc1e5c0dbff27c2b5147eaea16c578d2337870c3.zip
kernel_samsung_smdk4412-dc1e5c0dbff27c2b5147eaea16c578d2337870c3.tar.gz
kernel_samsung_smdk4412-dc1e5c0dbff27c2b5147eaea16c578d2337870c3.tar.bz2
drm/nouveau: simplify gpuobj suspend/resume
Reviewed-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.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.c b/drivers/gpu/drm/nouveau/nouveau_drv.c
index 52f9307..7ff5b43 100644
--- a/drivers/gpu/drm/nouveau/nouveau_drv.c
+++ b/drivers/gpu/drm/nouveau/nouveau_drv.c
@@ -222,17 +222,17 @@ nouveau_pci_suspend(struct pci_dev *pdev, pm_message_t pm_state)
pfifo->unload_context(dev);
pgraph->unload_context(dev);
- NV_INFO(dev, "Suspending GPU objects...\n");
- ret = nouveau_gpuobj_suspend(dev);
+ ret = pinstmem->suspend(dev);
if (ret) {
NV_ERROR(dev, "... failed: %d\n", ret);
goto out_abort;
}
- ret = pinstmem->suspend(dev);
+ NV_INFO(dev, "Suspending GPU objects...\n");
+ ret = nouveau_gpuobj_suspend(dev);
if (ret) {
NV_ERROR(dev, "... failed: %d\n", ret);
- nouveau_gpuobj_suspend_cleanup(dev);
+ pinstmem->resume(dev);
goto out_abort;
}
@@ -297,6 +297,9 @@ nouveau_pci_resume(struct pci_dev *pdev)
}
}
+ NV_INFO(dev, "Restoring GPU objects...\n");
+ nouveau_gpuobj_resume(dev);
+
NV_INFO(dev, "Reinitialising engines...\n");
engine->instmem.resume(dev);
engine->mc.init(dev);
@@ -306,9 +309,6 @@ nouveau_pci_resume(struct pci_dev *pdev)
engine->crypt.init(dev);
engine->fifo.init(dev);
- NV_INFO(dev, "Restoring GPU objects...\n");
- nouveau_gpuobj_resume(dev);
-
nouveau_irq_postinstall(dev);
/* Re-write SKIPS, they'll have been lost over the suspend */