drm/nouveau/disp: clear notify intr status when enabling, to prevent races
authorBen Skeggs <bskeggs@redhat.com>
Tue, 28 Oct 2014 01:21:44 +0000 (11:21 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Tue, 2 Dec 2014 05:43:58 +0000 (15:43 +1000)
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/core/engine/disp/nv50.c
drivers/gpu/drm/nouveau/core/engine/disp/nvd0.c

index 6e7deeababd23571ad982fa2361981cc2a750c52..44a8290aaea5cf2a0e7358cfa48cb9e7ad11dc27 100644 (file)
@@ -88,12 +88,14 @@ nv50_disp_chan_uevent_fini(struct nvkm_event *event, int type, int index)
 {
        struct nv50_disp_priv *priv = container_of(event, typeof(*priv), uevent);
        nv_mask(priv, 0x610028, 0x00000001 << index, 0x00000000 << index);
+       nv_wr32(priv, 0x610020, 0x00000001 << index);
 }
 
 static void
 nv50_disp_chan_uevent_init(struct nvkm_event *event, int types, int index)
 {
        struct nv50_disp_priv *priv = container_of(event, typeof(*priv), uevent);
+       nv_wr32(priv, 0x610020, 0x00000001 << index);
        nv_mask(priv, 0x610028, 0x00000001 << index, 0x00000001 << index);
 }
 
index f3120b70b681da575a4388e07359241c1865665d..181a2d57e356c8570ec854ac5bd7b87d6cf506e4 100644 (file)
@@ -51,12 +51,14 @@ nvd0_disp_chan_uevent_fini(struct nvkm_event *event, int type, int index)
 {
        struct nv50_disp_priv *priv = container_of(event, typeof(*priv), uevent);
        nv_mask(priv, 0x610090, 0x00000001 << index, 0x00000000 << index);
+       nv_wr32(priv, 0x61008c, 0x00000001 << index);
 }
 
 static void
 nvd0_disp_chan_uevent_init(struct nvkm_event *event, int types, int index)
 {
        struct nv50_disp_priv *priv = container_of(event, typeof(*priv), uevent);
+       nv_wr32(priv, 0x61008c, 0x00000001 << index);
        nv_mask(priv, 0x610090, 0x00000001 << index, 0x00000001 << index);
 }