Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 30af6aa8 authored by Martin Peres's avatar Martin Peres Committed by Ben Skeggs
Browse files

drm/nouveau/therm/fan/tach: default to 2 pulses per revolution



I spent some time this weekend trying to find in the vbios the number of
pulses per revolutions in the vbios but couldn't find it. It would seem
all my cards have 2 pulses per revolution so let's stick to that until
further notice.

Thermal table's id 0x48 may indicate this information but it would seem
that changing the value results in the blob power or clock gating the
RPM counter... We should ask NVIDIA about that, should be trivial-enough
for them to answer.

Signed-off-by: default avatarMartin Peres <martin.peres@free.fr>
Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent 5edcf1c0
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -36,7 +36,7 @@ nva3_therm_fan_sense(struct nouveau_therm *therm)
	u32 tach = nv_rd32(therm, 0x00e728) & 0x0000ffff;
	u32 tach = nv_rd32(therm, 0x00e728) & 0x0000ffff;
	u32 ctrl = nv_rd32(therm, 0x00e720);
	u32 ctrl = nv_rd32(therm, 0x00e720);
	if (ctrl & 0x00000001)
	if (ctrl & 0x00000001)
		return tach * 60;
		return tach * 60 / 2;
	return -ENODEV;
	return -ENODEV;
}
}