drm/nouveau/fan: rewrite the fan tachometer driver to get more precision, faster

The previous driver waited for 250ms to accumulate data. This version times a
complete fan rotation and extrapolates to RPM.

The fan rotational speed should now be read in less than 250ms (worst case)
and usually in less 50ms.

Signed-off-by: Martin Peres <martin.peres@labri.fr>
Reviewed-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
1 file changed