aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_gem.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_gem.c b/drivers/gpu/drm/nouveau/nouveau_gem.c
index af7cfb82571..0c9399bb9bf 100644
--- a/drivers/gpu/drm/nouveau/nouveau_gem.c
+++ b/drivers/gpu/drm/nouveau/nouveau_gem.c
@@ -733,10 +733,8 @@ nouveau_gem_ioctl_pushbuf(struct drm_device *dev, void *data,
733 for (i = 0; i < req->nr_push; i++) { 733 for (i = 0; i < req->nr_push; i++) {
734 struct nouveau_bo *nvbo = (void *)(unsigned long) 734 struct nouveau_bo *nvbo = (void *)(unsigned long)
735 bo[push[i].bo_index].user_priv; 735 bo[push[i].bo_index].user_priv;
736 struct drm_mm_node *mem = nvbo->bo.mem.mm_node;
737 736
738 OUT_RING(chan, ((mem->start << PAGE_SHIFT) + 737 OUT_RING(chan, (nvbo->bo.offset + push[i].offset) | 2);
739 push[i].offset) | 2);
740 OUT_RING(chan, 0); 738 OUT_RING(chan, 0);
741 } 739 }
742 } else { 740 } else {
@@ -749,7 +747,6 @@ nouveau_gem_ioctl_pushbuf(struct drm_device *dev, void *data,
749 for (i = 0; i < req->nr_push; i++) { 747 for (i = 0; i < req->nr_push; i++) {
750 struct nouveau_bo *nvbo = (void *)(unsigned long) 748 struct nouveau_bo *nvbo = (void *)(unsigned long)
751 bo[push[i].bo_index].user_priv; 749 bo[push[i].bo_index].user_priv;
752 struct drm_mm_node *mem = nvbo->bo.mem.mm_node;
753 uint32_t cmd; 750 uint32_t cmd;
754 751
755 cmd = chan->pushbuf_base + ((chan->dma.cur + 2) << 2); 752 cmd = chan->pushbuf_base + ((chan->dma.cur + 2) << 2);
@@ -771,8 +768,8 @@ nouveau_gem_ioctl_pushbuf(struct drm_device *dev, void *data,
771 push[i].length - 8) / 4, cmd); 768 push[i].length - 8) / 4, cmd);
772 } 769 }
773 770
774 OUT_RING(chan, ((mem->start << PAGE_SHIFT) + 771 OUT_RING(chan, 0x20000000 |
775 push[i].offset) | 0x20000000); 772 (nvbo->bo.offset + push[i].offset));
776 OUT_RING(chan, 0); 773 OUT_RING(chan, 0);
777 for (j = 0; j < NOUVEAU_DMA_SKIPS; j++) 774 for (j = 0; j < NOUVEAU_DMA_SKIPS; j++)
778 OUT_RING(chan, 0); 775 OUT_RING(chan, 0);