drm/nvc0/therm: allow fan control if we've killed the vbios ppwr ucode
authorBen Skeggs <bskeggs@redhat.com>
Tue, 15 Oct 2013 00:31:05 +0000 (10:31 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Fri, 8 Nov 2013 05:40:02 +0000 (15:40 +1000)
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/core/subdev/therm/base.c

index 836943f70f54da4569b04a99d907ec86a34675c7..d1b781c5a66332f6f14cb8babb94cae71a938a4d 100644 (file)
@@ -168,14 +168,15 @@ nouveau_therm_fan_mode(struct nouveau_therm *therm, int mode)
                "automatic"
        };
 
-       /* The default PDAEMON ucode interferes with fan management */
+       /* The default PPWR ucode on fermi interferes with fan management */
        if ((mode >= ARRAY_SIZE(name)) ||
-           (mode != NOUVEAU_THERM_CTRL_NONE && device->card_type >= NV_C0))
+           (mode != NOUVEAU_THERM_CTRL_NONE && device->card_type >= NV_C0 &&
+            !nouveau_subdev(device, NVDEV_SUBDEV_PWR)))
                return -EINVAL;
 
        /* do not allow automatic fan management if the thermal sensor is
         * not available */
-       if (priv->mode == 2 && therm->temp_get(therm) < 0)
+       if (priv->mode == NOUVEAU_THERM_CTRL_AUTO && therm->temp_get(therm) < 0)
                return -EINVAL;
 
        if (priv->mode == mode)