drm/nouveau/tmr: avoid processing completed alarms when adding a new one
authorBen Skeggs <bskeggs@redhat.com>
Thu, 11 May 2017 07:13:29 +0000 (17:13 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 May 2017 13:44:36 +0000 (15:44 +0200)
commit1ec3c712e231468ac1b1024b9747882c444d4b19
tree022ef91c6fe0eede7bbdbf36721759fe49a4a16c
parent6445a49a8c592f891ea38fa307d2617e15b2d524
drm/nouveau/tmr: avoid processing completed alarms when adding a new one

commit 330bdf62fe6a6c5b99a647f7bf7157107c9348b3 upstream.

The idea here was to avoid having to "manually" program the HW if there's
a new earliest alarm.  This was lazy and bad, as it leads to loads of fun
races between inter-related callers (ie. therm).

Turns out, it's not so difficult after all.  Go figure ;)

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