drm/nouveau/pm: fix missing volt changes when boot voltage is undefined
authorBen Skeggs <bskeggs@redhat.com>
Thu, 10 Nov 2011 03:20:14 +0000 (13:20 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Wed, 21 Dec 2011 09:01:33 +0000 (19:01 +1000)
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nouveau_pm.c

index c6ebf693ffb8f6edafe8e70fb0ab1e1974b897c3..1442d067367117ee45661588395021107c41f9bc 100644 (file)
@@ -117,7 +117,7 @@ nouveau_pm_perflvl_aux(struct drm_device *dev, struct nouveau_pm_level *perflvl,
        }
 
        if (pm->voltage.supported && pm->voltage_set) {
-               if (a->volt_min && b->volt_min && b->volt_min > a->volt_min) {
+               if (perflvl->volt_min && b->volt_min > a->volt_min) {
                        ret = pm->voltage_set(dev, perflvl->volt_min);
                        if (ret) {
                                NV_ERROR(dev, "voltage set failed: %d\n", ret);