diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2010-09-29 19:09:42 -0400 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2010-10-04 19:58:47 -0400 |
commit | 62841ab726def838472dfaaee571a0d30a2ce1e0 (patch) | |
tree | 85bf5324d0235c96f1bb65db68a79217dae305ad /drivers | |
parent | cd2fb2e9e0a6a3273d353b18e4bdd21cc0482724 (diff) |
drm/nv50: prevent (IB_PUT == IB_GET) for occurring unless idle
Should fix a DMA race condition I've never seen myself, but could be
the culprit in some random hangs that have been reported.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_dma.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_dma.c b/drivers/gpu/drm/nouveau/nouveau_dma.c index 9d27acda87e2..eb24e2b05193 100644 --- a/drivers/gpu/drm/nouveau/nouveau_dma.c +++ b/drivers/gpu/drm/nouveau/nouveau_dma.c | |||
@@ -214,7 +214,7 @@ nv50_dma_push_wait(struct nouveau_channel *chan, int count) | |||
214 | 214 | ||
215 | chan->dma.ib_free = get - chan->dma.ib_put; | 215 | chan->dma.ib_free = get - chan->dma.ib_put; |
216 | if (chan->dma.ib_free <= 0) | 216 | if (chan->dma.ib_free <= 0) |
217 | chan->dma.ib_free += chan->dma.ib_max + 1; | 217 | chan->dma.ib_free += chan->dma.ib_max; |
218 | } | 218 | } |
219 | 219 | ||
220 | return 0; | 220 | return 0; |