diff --git a/[refs] b/[refs] index 7bec4adc3b36..bbbb3c675143 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 93260d3c026b539931d909a4d68490c32b6d73ce +refs/heads/master: a624bafbf11c098a859dba4118a33605bfd25788 diff --git a/trunk/drivers/gpu/drm/nouveau/core/subdev/therm/base.c b/trunk/drivers/gpu/drm/nouveau/core/subdev/therm/base.c index b35b4a249c5f..25b7f6a907c8 100644 --- a/trunk/drivers/gpu/drm/nouveau/core/subdev/therm/base.c +++ b/trunk/drivers/gpu/drm/nouveau/core/subdev/therm/base.c @@ -71,6 +71,13 @@ nouveau_therm_update_linear(struct nouveau_therm *therm) u8 temp = therm->temp_get(therm); u16 duty; + /* handle the non-linear part first */ + if (temp < linear_min_temp) + return priv->fan->bios.min_duty; + else if (temp > linear_max_temp) + return priv->fan->bios.max_duty; + + /* we are in the linear zone */ duty = (temp - linear_min_temp); duty *= (priv->fan->bios.max_duty - priv->fan->bios.min_duty); duty /= (linear_max_temp - linear_min_temp);