Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 358261
b: refs/heads/master
c: a624baf
h: refs/heads/master
i:
  358259: 619c029
v: v3
  • Loading branch information
Martin Peres authored and Ben Skeggs committed Feb 20, 2013
1 parent cd4e3fc commit 1a4bf23
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 93260d3c026b539931d909a4d68490c32b6d73ce
refs/heads/master: a624bafbf11c098a859dba4118a33605bfd25788
7 changes: 7 additions & 0 deletions trunk/drivers/gpu/drm/nouveau/core/subdev/therm/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 1a4bf23

Please sign in to comment.