diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2013-05-13 23:33:56 -0400 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2013-05-19 23:24:09 -0400 |
commit | b5096566f6e1ee2b88324772f020ae9bc0cfa9a0 (patch) | |
tree | d59d41001909f622c1e91fb92154f4b30e03ac9f /drivers/gpu/drm/nouveau | |
parent | 9426eedb26cfe646a843295ac7f91bf866323f92 (diff) |
drm/nv50/fifo: prevent races between clients updating playlists
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau')
-rw-r--r-- | drivers/gpu/drm/nouveau/core/engine/fifo/nv50.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/core/engine/fifo/nv50.c b/drivers/gpu/drm/nouveau/core/engine/fifo/nv50.c index ddaeb5572903..89bf459d584b 100644 --- a/drivers/gpu/drm/nouveau/core/engine/fifo/nv50.c +++ b/drivers/gpu/drm/nouveau/core/engine/fifo/nv50.c | |||
@@ -47,6 +47,7 @@ nv50_fifo_playlist_update(struct nv50_fifo_priv *priv) | |||
47 | struct nouveau_gpuobj *cur; | 47 | struct nouveau_gpuobj *cur; |
48 | int i, p; | 48 | int i, p; |
49 | 49 | ||
50 | mutex_lock(&nv_subdev(priv)->mutex); | ||
50 | cur = priv->playlist[priv->cur_playlist]; | 51 | cur = priv->playlist[priv->cur_playlist]; |
51 | priv->cur_playlist = !priv->cur_playlist; | 52 | priv->cur_playlist = !priv->cur_playlist; |
52 | 53 | ||
@@ -60,6 +61,7 @@ nv50_fifo_playlist_update(struct nv50_fifo_priv *priv) | |||
60 | nv_wr32(priv, 0x0032f4, cur->addr >> 12); | 61 | nv_wr32(priv, 0x0032f4, cur->addr >> 12); |
61 | nv_wr32(priv, 0x0032ec, p); | 62 | nv_wr32(priv, 0x0032ec, p); |
62 | nv_wr32(priv, 0x002500, 0x00000101); | 63 | nv_wr32(priv, 0x002500, 0x00000101); |
64 | mutex_unlock(&nv_subdev(priv)->mutex); | ||
63 | } | 65 | } |
64 | 66 | ||
65 | static int | 67 | static int |