summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nouveau_object.c
diff options
context:
space:
mode:
authorFrancisco Jerez <currojerez@riseup.net>2010-12-08 02:37:12 +0100
committerBen Skeggs <bskeggs@redhat.com>2010-12-08 15:53:04 +1000
commitfd70b6cd780742b97f525415bf5e4fb24a4bb6d8 (patch)
tree1f4dd8e185b53aace76c17b44b9c4bb839fc09d7 /drivers/gpu/drm/nouveau/nouveau_object.c
parent60d2a88ae896ae51c76f8b15c2f4b762d5b00864 (diff)
drm/nv04-nv40: Fix up PCI(E) GART DMA object bus address calculation.
Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_object.c')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_object.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_object.c b/drivers/gpu/drm/nouveau/nouveau_object.c
index d1bed40dc44..55c9fdcfa67 100644
--- a/drivers/gpu/drm/nouveau/nouveau_object.c
+++ b/drivers/gpu/drm/nouveau/nouveau_object.c
@@ -478,7 +478,7 @@ nouveau_gpuobj_dma_new(struct nouveau_channel *chan, int class, u64 base,
struct drm_nouveau_private *dev_priv = chan->dev->dev_private;
struct drm_device *dev = chan->dev;
struct nouveau_gpuobj *obj;
- u32 page_addr, flags0, flags2;
+ u32 flags0, flags2;
int ret;
if (dev_priv->card_type >= NV_50) {
@@ -495,12 +495,8 @@ nouveau_gpuobj_dma_new(struct nouveau_channel *chan, int class, u64 base,
base += dev_priv->gart_info.aper_base;
} else
if (base != 0) {
- ret = nouveau_sgdma_get_page(dev, base, &page_addr);
- if (ret)
- return ret;
-
+ base = nouveau_sgdma_get_physical(dev, base);
target = NV_MEM_TARGET_PCI;
- base = page_addr;
} else {
nouveau_gpuobj_ref(dev_priv->gart_info.sg_ctxdma, pobj);
return 0;