Re: [Nouveau] [PATCH 1/2] drm/nouveau/bios/therm: handle vbioses with duplicate entries (mostly nva5)
On 04/09/2013 03:55, Ben Skeggs wrote: On Sat, Aug 31, 2013 at 9:58 AM, Martin Peres martin.pe...@free.fr wrote: From: Martin Peres martin.pe...@labri.fr 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. I'm still *really* not convinced we're using the thermal table correctly However, this makes sense for our current handling, so, merged. Thanks, Ben. Well, I do agree that the first versions of the vbios table really felt like a script but this isn't the case anymore (not sure how I tested this though as it was more than a year ago). ___ Nouveau mailing list Nouveau@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/nouveau
Re: [Nouveau] [PATCH 1/2] drm/nouveau/bios/therm: handle vbioses with duplicate entries (mostly nva5)
On Sat, Aug 31, 2013 at 9:58 AM, Martin Peres martin.pe...@free.fr wrote: From: Martin Peres martin.pe...@labri.fr 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. I'm still *really* not convinced we're using the thermal table correctly However, this makes sense for our current handling, so, merged. Thanks, Ben. Signed-off-by: Martin Peres martin.pe...@labbri.fr Reported-by: Mariusz Bialonczyk ma...@skyboo.net Tested-by: Mariusz Bialonczyk ma...@skyboo.net --- drivers/gpu/drm/nouveau/core/subdev/bios/therm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/core/subdev/bios/therm.c b/drivers/gpu/drm/nouveau/core/subdev/bios/therm.c index 22a2057..22ac6db 100644 --- a/drivers/gpu/drm/nouveau/core/subdev/bios/therm.c +++ b/drivers/gpu/drm/nouveau/core/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; -- 1.8.4 ___ Nouveau mailing list Nouveau@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/nouveau ___ Nouveau mailing list Nouveau@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/nouveau
[Nouveau] [PATCH 1/2] drm/nouveau/bios/therm: handle vbioses with duplicate entries (mostly nva5)
From: Martin Peres martin.pe...@labri.fr 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.pe...@labbri.fr Reported-by: Mariusz Bialonczyk ma...@skyboo.net Tested-by: Mariusz Bialonczyk ma...@skyboo.net --- drivers/gpu/drm/nouveau/core/subdev/bios/therm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/core/subdev/bios/therm.c b/drivers/gpu/drm/nouveau/core/subdev/bios/therm.c index 22a2057..22ac6db 100644 --- a/drivers/gpu/drm/nouveau/core/subdev/bios/therm.c +++ b/drivers/gpu/drm/nouveau/core/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; -- 1.8.4 ___ Nouveau mailing list Nouveau@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/nouveau