summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nvkm/subdev
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2017-05-11 08:53:42 +0200
committerBen Skeggs <bskeggs@redhat.com>2017-05-12 00:32:57 +0200
commit3733bd8b407211739e72d051e5f30ad82a52c4bc (patch)
tree24746d3f59ec93224dec605bc9f4b4f6619c5714 /drivers/gpu/drm/nouveau/nvkm/subdev
parentdrm/nouveau/core: fix static checker warning (diff)
downloadlinux-3733bd8b407211739e72d051e5f30ad82a52c4bc.tar.xz
linux-3733bd8b407211739e72d051e5f30ad82a52c4bc.zip
drm/nouveau/tmr: ack interrupt before processing alarms
Fixes a race where we can miss an alarm that triggers while we're already processing previous alarms. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Cc: stable@vger.kernel.org
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvkm/subdev')
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/timer/nv04.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/timer/nv04.c b/drivers/gpu/drm/nouveau/nvkm/subdev/timer/nv04.c
index 7b9ce87f0617..7f48249f41de 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/timer/nv04.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/timer/nv04.c
@@ -76,8 +76,8 @@ nv04_timer_intr(struct nvkm_timer *tmr)
u32 stat = nvkm_rd32(device, NV04_PTIMER_INTR_0);
if (stat & 0x00000001) {
- nvkm_timer_alarm_trigger(tmr);
nvkm_wr32(device, NV04_PTIMER_INTR_0, 0x00000001);
+ nvkm_timer_alarm_trigger(tmr);
stat &= ~0x00000001;
}