Browse Source

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>
Ben Skeggs 15 years ago
parent
commit
62841ab726
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/gpu/drm/nouveau/nouveau_dma.c

+ 1 - 1
drivers/gpu/drm/nouveau/nouveau_dma.c

@@ -214,7 +214,7 @@ nv50_dma_push_wait(struct nouveau_channel *chan, int count)
 
 		chan->dma.ib_free = get - chan->dma.ib_put;
 		if (chan->dma.ib_free <= 0)
-			chan->dma.ib_free += chan->dma.ib_max + 1;
+			chan->dma.ib_free += chan->dma.ib_max;
 	}
 
 	return 0;