summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nouveau_pm.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2011-07-28 11:01:21 +1000
committerBen Skeggs <bskeggs@redhat.com>2011-12-21 19:01:10 +1000
commit771e1035b9bfdb0c3f0e34bd281d73b721a10adb (patch)
tree17aead10071d9a32371a2bf05169bb4f83facc8a /drivers/gpu/drm/nouveau/nouveau_pm.c
parent04de6a046188d86ff60b1ede974dbf580287fc98 (diff)
drm/nouveau/pm: hook up fanspeed get/set if they're present
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.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_pm.c b/drivers/gpu/drm/nouveau/nouveau_pm.c
index a539fd25792..607e4965f4f 100644
--- a/drivers/gpu/drm/nouveau/nouveau_pm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_pm.c
@@ -64,6 +64,12 @@ nouveau_pm_perflvl_set(struct drm_device *dev, struct nouveau_pm_level *perflvl)
if (perflvl == pm->cur)
return 0;
+ if (pm->fanspeed_set && perflvl->fanspeed) {
+ ret = pm->fanspeed_set(dev, perflvl->fanspeed);
+ if (ret)
+ NV_ERROR(dev, "set fanspeed failed: %d\n", ret);
+ }
+
if (pm->voltage.supported && pm->voltage_set && perflvl->volt_min) {
ret = pm->voltage_set(dev, perflvl->volt_min);
if (ret) {
@@ -161,6 +167,9 @@ nouveau_pm_perflvl_get(struct drm_device *dev, struct nouveau_pm_level *perflvl)
}
}
+ if (pm->fanspeed_get)
+ perflvl->fanspeed = pm->fanspeed_get(dev);
+
return 0;
}