drm/nouveau/tmr: handle races with hw when updating the next alarm time
authorBen Skeggs <bskeggs@redhat.com>
Thu, 11 May 2017 07:19:48 +0000 (17:19 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 May 2017 12:30:10 +0000 (14:30 +0200)
commite4add1cf6b4154804350c3385c6d447cff3570de
tree2408f010589490f78bae070080c89d6d4ef0ab47
parent9d78e40f5f41ad1db1849f8d15acbda99d0871b4
drm/nouveau/tmr: handle races with hw when updating the next alarm time

commit 1b0f84380b10ee97f7d2dd191294de9017e94d1d upstream.

If the time to the next alarm is short enough, we could race with HW and
end up with an ~4 second delay until it triggers.

Fix this by checking again after we update HW.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/nouveau/nvkm/subdev/timer/base.c