drm/nouveau: fix suspend/resume on GPUs that don't have PM support
authorBen Skeggs <bskeggs@redhat.com>
Thu, 17 Feb 2011 01:11:28 +0000 (11:11 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Thu, 17 Feb 2011 02:02:22 +0000 (12:02 +1000)
This has been broken since 2.6.37, and fixes resume on a couple of fermi
boards I have access to.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nouveau_pm.c

index f05c0cddfecab5b96d3ef9eb07ad2ff9c221491e..4399e2f34db41068dd1769a06af1547b6603a263 100644 (file)
@@ -543,7 +543,7 @@ nouveau_pm_resume(struct drm_device *dev)
        struct nouveau_pm_engine *pm = &dev_priv->engine.pm;
        struct nouveau_pm_level *perflvl;
 
-       if (pm->cur == &pm->boot)
+       if (!pm->cur || pm->cur == &pm->boot)
                return;
 
        perflvl = pm->cur;