diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2011-08-14 12:43:47 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2011-12-21 19:01:11 +1000 |
commit | cb9fa62671ace5ac40b9924e9014cebf04b78228 (patch) | |
tree | 4dc19083d28b04a44cc89e6f4b66efe154c6b370 /drivers/gpu/drm/nouveau/nouveau_pm.c | |
parent | 8f27c54342dffbfbafbddd6e43f011e6cb16d285 (diff) |
drm/nv50/pm: add support for pwm fan control
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_pm.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_pm.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_pm.c b/drivers/gpu/drm/nouveau/nouveau_pm.c index 607e4965f4f..ee2872ed60e 100644 --- a/drivers/gpu/drm/nouveau/nouveau_pm.c +++ b/drivers/gpu/drm/nouveau/nouveau_pm.c @@ -167,8 +167,11 @@ nouveau_pm_perflvl_get(struct drm_device *dev, struct nouveau_pm_level *perflvl) } } - if (pm->fanspeed_get) - perflvl->fanspeed = pm->fanspeed_get(dev); + if (pm->fanspeed_get) { + ret = pm->fanspeed_get(dev); + if (ret > 0) + perflvl->fanspeed = ret; + } return 0; } |