summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Peres <martin.peres@labri.fr>2013-08-31 01:58:50 +0200
committerBen Skeggs <bskeggs@redhat.com>2013-09-17 08:18:04 +1000
commit0d3fd4addc5f73f8430d113c79dcc743f871a240 (patch)
tree29c69ca443f979c620e89ae84df1549110d1ece0
parent9f4306bda87496b50fbd610a213280380d0bb190 (diff)
bios/therm: handle vbioses with duplicate entries (mostly nva5)
Some vbioses have extra useless entries after "the end" of the table. This is problematic since all of the vbios I found with this issue redefine the pwm freq divider to insane levels (52750 Hz instead of 2500), thus breaking fan management. The first solution to solve this mess would be to change the length of the table. The solution I choose was simply to avoid setting the pwm freq twice as the other redefinitions are harmless with our current parser. Signed-off-by: Martin Peres <martin.peres@labri.fr> Reported-by: Mariusz Bialonczyk <manio@skyboo.net> Tested-by: Mariusz Bialonczyk <manio@skyboo.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-rw-r--r--nvkm/subdev/bios/therm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/nvkm/subdev/bios/therm.c b/nvkm/subdev/bios/therm.c
index 22a20573..22ac6dbd 100644
--- a/nvkm/subdev/bios/therm.c
+++ b/nvkm/subdev/bios/therm.c
@@ -184,7 +184,8 @@ nvbios_therm_fan_parse(struct nouveau_bios *bios,
cur_trip->fan_duty = value;
break;
case 0x26:
- fan->pwm_freq = value;
+ if (!fan->pwm_freq)
+ fan->pwm_freq = value;
break;
case 0x3b:
fan->bump_period = value;