drm/nouveau/gem: lookup VMAs for buffers referenced by pushbuf ioctl

We previously only did this for push buffers, but an upcoming patch will
need to attach fences to all VMAs to resolve another issue.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Este commit está contenido en:
Ben Skeggs
2018-05-08 20:39:47 +10:00
padre 4b2c71edf0
commit 19ca10d82e
Se han modificado 3 ficheros con 19 adiciones y 15 borrados

Ver fichero

@@ -80,18 +80,10 @@ READ_GET(struct nouveau_channel *chan, uint64_t *prev_get, int *timeout)
}
void
nv50_dma_push(struct nouveau_channel *chan, struct nouveau_bo *bo,
int delta, int length)
nv50_dma_push(struct nouveau_channel *chan, u64 offset, int length)
{
struct nouveau_cli *cli = (void *)chan->user.client;
struct nouveau_bo *pb = chan->push.buffer;
struct nouveau_vma *vma;
int ip = (chan->dma.ib_put * 2) + chan->dma.ib_base;
u64 offset;
vma = nouveau_vma_find(bo, &cli->vmm);
BUG_ON(!vma);
offset = vma->addr + delta;
BUG_ON(chan->dma.ib_free < 1);