Skip to content

Commit c072470

Browse files
mupufBen Skeggs
authored andcommitted
drm/nouveau/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 <[email protected]> Reported-by: Mariusz Bialonczyk <[email protected]> Tested-by: Mariusz Bialonczyk <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
1 parent a27e569 commit c072470

File tree

1 file changed

+2
-1
lines changed
  • drivers/gpu/drm/nouveau/core/subdev/bios

1 file changed

+2
-1
lines changed

drivers/gpu/drm/nouveau/core/subdev/bios/therm.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,8 @@ nvbios_therm_fan_parse(struct nouveau_bios *bios,
184184
cur_trip->fan_duty = value;
185185
break;
186186
case 0x26:
187-
fan->pwm_freq = value;
187+
if (!fan->pwm_freq)
188+
fan->pwm_freq = value;
188189
break;
189190
case 0x3b:
190191
fan->bump_period = value;

0 commit comments

Comments
 (0)