aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2014-10-27 21:21:44 -0400
committerBen Skeggs <bskeggs@redhat.com>2014-12-02 00:43:58 -0500
commitf9895e6dbe92d38f821864b48b135f63bf115dec (patch)
treec86b98ae07008e502e683a4f078b782e4eb27b41 /drivers/gpu/drm/nouveau
parent2832271d6492f6e2e7441bb49d4a2e0764483b3c (diff)
drm/nouveau/disp: clear notify intr status when enabling, to prevent races
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau')
-rw-r--r--drivers/gpu/drm/nouveau/core/engine/disp/nv50.c2
-rw-r--r--drivers/gpu/drm/nouveau/core/engine/disp/nvd0.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/core/engine/disp/nv50.c b/drivers/gpu/drm/nouveau/core/engine/disp/nv50.c
index 6e7deeababd2..44a8290aaea5 100644
--- a/drivers/gpu/drm/nouveau/core/engine/disp/nv50.c
+++ b/drivers/gpu/drm/nouveau/core/engine/disp/nv50.c
@@ -88,12 +88,14 @@ nv50_disp_chan_uevent_fini(struct nvkm_event *event, int type, int index)
88{ 88{
89 struct nv50_disp_priv *priv = container_of(event, typeof(*priv), uevent); 89 struct nv50_disp_priv *priv = container_of(event, typeof(*priv), uevent);
90 nv_mask(priv, 0x610028, 0x00000001 << index, 0x00000000 << index); 90 nv_mask(priv, 0x610028, 0x00000001 << index, 0x00000000 << index);
91 nv_wr32(priv, 0x610020, 0x00000001 << index);
91} 92}
92 93
93static void 94static void
94nv50_disp_chan_uevent_init(struct nvkm_event *event, int types, int index) 95nv50_disp_chan_uevent_init(struct nvkm_event *event, int types, int index)
95{ 96{
96 struct nv50_disp_priv *priv = container_of(event, typeof(*priv), uevent); 97 struct nv50_disp_priv *priv = container_of(event, typeof(*priv), uevent);
98 nv_wr32(priv, 0x610020, 0x00000001 << index);
97 nv_mask(priv, 0x610028, 0x00000001 << index, 0x00000001 << index); 99 nv_mask(priv, 0x610028, 0x00000001 << index, 0x00000001 << index);
98} 100}
99 101
diff --git a/drivers/gpu/drm/nouveau/core/engine/disp/nvd0.c b/drivers/gpu/drm/nouveau/core/engine/disp/nvd0.c
index f3120b70b681..181a2d57e356 100644
--- a/drivers/gpu/drm/nouveau/core/engine/disp/nvd0.c
+++ b/drivers/gpu/drm/nouveau/core/engine/disp/nvd0.c
@@ -51,12 +51,14 @@ nvd0_disp_chan_uevent_fini(struct nvkm_event *event, int type, int index)
51{ 51{
52 struct nv50_disp_priv *priv = container_of(event, typeof(*priv), uevent); 52 struct nv50_disp_priv *priv = container_of(event, typeof(*priv), uevent);
53 nv_mask(priv, 0x610090, 0x00000001 << index, 0x00000000 << index); 53 nv_mask(priv, 0x610090, 0x00000001 << index, 0x00000000 << index);
54 nv_wr32(priv, 0x61008c, 0x00000001 << index);
54} 55}
55 56
56static void 57static void
57nvd0_disp_chan_uevent_init(struct nvkm_event *event, int types, int index) 58nvd0_disp_chan_uevent_init(struct nvkm_event *event, int types, int index)
58{ 59{
59 struct nv50_disp_priv *priv = container_of(event, typeof(*priv), uevent); 60 struct nv50_disp_priv *priv = container_of(event, typeof(*priv), uevent);
61 nv_wr32(priv, 0x61008c, 0x00000001 << index);
60 nv_mask(priv, 0x610090, 0x00000001 << index, 0x00000001 << index); 62 nv_mask(priv, 0x610090, 0x00000001 << index, 0x00000001 << index);
61} 63}
62 64