Explorar o código

drm/nouveau: use dma.max rather than pushbuf size for checking GET validity

Some upcoming G80 DMA changes will depend on this, but it's split out for
bisectibility just in case it causes some unexpected issues.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs %!s(int64=15) %!d(string=hai) anos
pai
achega
dff3632149
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      drivers/gpu/drm/nouveau/nouveau_dma.c

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

@@ -130,7 +130,7 @@ READ_GET(struct nouveau_channel *chan, uint32_t *get)
 
 
 	val = nvchan_rd32(chan, chan->user_get);
 	val = nvchan_rd32(chan, chan->user_get);
 	if (val < chan->pushbuf_base ||
 	if (val < chan->pushbuf_base ||
-	    val >= chan->pushbuf_base + chan->pushbuf_bo->bo.mem.size) {
+	    val > chan->pushbuf_base + (chan->dma.max << 2)) {
 		/* meaningless to dma_wait() except to know whether the
 		/* meaningless to dma_wait() except to know whether the
 		 * GPU has stalled or not
 		 * GPU has stalled or not
 		 */
 		 */