drm/nouveau/timer: restore the time on resume
authorMartin Peres <martin.peres@labri.fr>
Mon, 12 Aug 2013 02:48:50 +0000 (22:48 -0400)
committerBen Skeggs <bskeggs@redhat.com>
Wed, 4 Sep 2013 03:46:42 +0000 (13:46 +1000)
commit7fabd25393c7b5cb749d358772ccea2a570f4b49
tree77ef02640979f17f8375e7886889f6f4f8bf0761
parent4cc00ad1373674cdd1bce387bd1d4e3f5c42a99c
drm/nouveau/timer: restore the time on resume

This can be useful if some parts of Nouveau try to calculate the time
between two events.  Without this patch, the time difference would be
negative in the case where the computer is suspended/resumed between
two events.

This patch should fix fan speed probing when done while suspending/resuming.

Solve this by saving the current time before suspending and by restoring it
on resume.

Signed-off-by: Martin Peres <martin.peres@labri.fr>
Tested-by: Martin Peres <martin.peres@labri.fr>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/core/subdev/timer/nv04.c