Commit 771e1035 authored by Ben Skeggs's avatar Ben Skeggs
Browse files

drm/nouveau/pm: hook up fanspeed get/set if they're present


Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent 04de6a04
......@@ -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;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment