All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/nouveau/bios/therm: handle vbioses with duplicate entries (mostly nva5)
@ 2013-08-30 23:58 Martin Peres
       [not found] ` <1377907131-15099-1-git-send-email-martin.peres-GANU6spQydw@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Martin Peres @ 2013-08-30 23:58 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Martin Peres, Martin Peres

From: Martin Peres <martin.peres-BktLLJ5BOkI@public.gmane.org>

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-/ze9ptdxDJdQFI55V6+gNQ@public.gmane.org>
Reported-by: Mariusz Bialonczyk <manio-RFXG7K41k5GsTnJN9+BGXg@public.gmane.org>
Tested-by: Mariusz Bialonczyk <manio-RFXG7K41k5GsTnJN9+BGXg@public.gmane.org>
---
 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

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-09-08 22:46 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-30 23:58 [PATCH 1/2] drm/nouveau/bios/therm: handle vbioses with duplicate entries (mostly nva5) Martin Peres
     [not found] ` <1377907131-15099-1-git-send-email-martin.peres-GANU6spQydw@public.gmane.org>
2013-08-30 23:58   ` [PATCH 2/2] drm/nv84/therm: ack any pending IRQ at init Martin Peres
     [not found]     ` <1377907131-15099-2-git-send-email-martin.peres-GANU6spQydw@public.gmane.org>
2013-08-31  0:06       ` [PATCH] drm/nouveau/therm: ack any pending IRQ at init v2 Martin Peres
     [not found]         ` <1377907571-15301-1-git-send-email-martin.peres-GANU6spQydw@public.gmane.org>
2013-09-04  1:52           ` Ben Skeggs
     [not found]             ` <CACAvsv6+9TqeTjMeMPdAwDrxLbbZ1sBJDQFmE7Xum9ryebns7g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-09-08 22:44               ` Martin Peres
2013-08-31  0:08   ` [PATCH 1/2] drm/nouveau/bios/therm: handle vbioses with duplicate entries (mostly nva5) Martin Peres
2013-09-04  1:55   ` Ben Skeggs
     [not found]     ` <CACAvsv5VTQvVcQhB0_=GY4Jjx=3-EAd+QMqzemR7qsDeh7KxzA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-09-08 22:46       ` Martin Peres

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.