diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2010-10-25 01:23:59 -0400 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2010-12-03 00:11:47 -0500 |
commit | dc1e5c0dbff27c2b5147eaea16c578d2337870c3 (patch) | |
tree | 82b7bd25bd162d5a9bcc5ee0598e697e1ddbd08e /drivers/gpu/drm/nouveau/nouveau_drv.c | |
parent | fce2bad0ee2666d6a10bfeb634b1021469cc3d79 (diff) |
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.c | 14 |
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 52f9307d7396..7ff5b4369f03 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) | |||
222 | pfifo->unload_context(dev); | 222 | pfifo->unload_context(dev); |
223 | pgraph->unload_context(dev); | 223 | pgraph->unload_context(dev); |
224 | 224 | ||
225 | NV_INFO(dev, "Suspending GPU objects...\n"); | 225 | ret = pinstmem->suspend(dev); |
226 | ret = nouveau_gpuobj_suspend(dev); | ||
227 | if (ret) { | 226 | if (ret) { |
228 | NV_ERROR(dev, "... failed: %d\n", ret); | 227 | NV_ERROR(dev, "... failed: %d\n", ret); |
229 | goto out_abort; | 228 | goto out_abort; |
230 | } | 229 | } |
231 | 230 | ||
232 | ret = pinstmem->suspend(dev); | 231 | NV_INFO(dev, "Suspending GPU objects...\n"); |
232 | ret = nouveau_gpuobj_suspend(dev); | ||
233 | if (ret) { | 233 | if (ret) { |
234 | NV_ERROR(dev, "... failed: %d\n", ret); | 234 | NV_ERROR(dev, "... failed: %d\n", ret); |
235 | nouveau_gpuobj_suspend_cleanup(dev); | 235 | pinstmem->resume(dev); |
236 | goto out_abort; | 236 | goto out_abort; |
237 | } | 237 | } |
238 | 238 | ||
@@ -297,6 +297,9 @@ nouveau_pci_resume(struct pci_dev *pdev) | |||
297 | } | 297 | } |
298 | } | 298 | } |
299 | 299 | ||
300 | NV_INFO(dev, "Restoring GPU objects...\n"); | ||
301 | nouveau_gpuobj_resume(dev); | ||
302 | |||
300 | NV_INFO(dev, "Reinitialising engines...\n"); | 303 | NV_INFO(dev, "Reinitialising engines...\n"); |
301 | engine->instmem.resume(dev); | 304 | engine->instmem.resume(dev); |
302 | engine->mc.init(dev); | 305 | engine->mc.init(dev); |
@@ -306,9 +309,6 @@ nouveau_pci_resume(struct pci_dev *pdev) | |||
306 | engine->crypt.init(dev); | 309 | engine->crypt.init(dev); |
307 | engine->fifo.init(dev); | 310 | engine->fifo.init(dev); |
308 | 311 | ||
309 | NV_INFO(dev, "Restoring GPU objects...\n"); | ||
310 | nouveau_gpuobj_resume(dev); | ||
311 | |||
312 | nouveau_irq_postinstall(dev); | 312 | nouveau_irq_postinstall(dev); |
313 | 313 | ||
314 | /* Re-write SKIPS, they'll have been lost over the suspend */ | 314 | /* Re-write SKIPS, they'll have been lost over the suspend */ |