diff options
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_dma.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_dma.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_dma.c b/drivers/gpu/drm/nouveau/nouveau_dma.c index 568caedd7216..00bc6eaad558 100644 --- a/drivers/gpu/drm/nouveau/nouveau_dma.c +++ b/drivers/gpu/drm/nouveau/nouveau_dma.c | |||
@@ -167,8 +167,13 @@ nv50_dma_push(struct nouveau_channel *chan, struct nouveau_bo *bo, | |||
167 | int delta, int length) | 167 | int delta, int length) |
168 | { | 168 | { |
169 | struct nouveau_bo *pb = chan->pushbuf_bo; | 169 | struct nouveau_bo *pb = chan->pushbuf_bo; |
170 | uint64_t offset = bo->bo.offset + delta; | 170 | struct nouveau_vma *vma; |
171 | int ip = (chan->dma.ib_put * 2) + chan->dma.ib_base; | 171 | int ip = (chan->dma.ib_put * 2) + chan->dma.ib_base; |
172 | u64 offset; | ||
173 | |||
174 | vma = nouveau_bo_vma_find(bo, chan->vm); | ||
175 | BUG_ON(!vma); | ||
176 | offset = vma->offset + delta; | ||
172 | 177 | ||
173 | BUG_ON(chan->dma.ib_free < 1); | 178 | BUG_ON(chan->dma.ib_free < 1); |
174 | nouveau_bo_wr32(pb, ip++, lower_32_bits(offset)); | 179 | nouveau_bo_wr32(pb, ip++, lower_32_bits(offset)); |