diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2011-06-06 23:23:47 -0400 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2011-06-23 02:00:22 -0400 |
commit | 9f9f51fcb92ba3c1f395e0908407c8c1f5305a31 (patch) | |
tree | 2b6dd3826a9a279e4dfd1943c38c7e4bc3da079e | |
parent | d02836b4f5c24d2a38b3bdc10f05251e1f6e111d (diff) |
drm/nv50-nvc0: lookup pushbuf virtual address on dma_push
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-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 4b294295f5e0..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->vma.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)); |