summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2010-02-20 01:10:11 +0300
committerBen Skeggs <bskeggs@redhat.com>2010-02-23 06:50:24 +0300
commit6c42966768b0254f465a8f451333795283f53d22 (patch)
treeb35447b2068e30a30579e081ae387276a13094f9
parent76befb8c30cebe2af83fa346bdaf75b430893511 (diff)
downloadlinux-6c42966768b0254f465a8f451333795283f53d22.tar.xz
drm/nv50: fix vram ptes on IGPs to point at stolen system memory
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_mem.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_mem.c b/drivers/gpu/drm/nouveau/nouveau_mem.c
index 134fedbb7669..2dc09dbd817d 100644
--- a/drivers/gpu/drm/nouveau/nouveau_mem.c
+++ b/drivers/gpu/drm/nouveau/nouveau_mem.c
@@ -291,7 +291,13 @@ nv50_mem_vm_bind_linear(struct drm_device *dev, uint64_t virt, uint32_t size,
virt = ((virt - dev_priv->vm_vram_base) >> 16) << 1;
size = (size >> 16) << 1;
- phys |= ((uint64_t)flags << 32) | 1;
+
+ phys |= ((uint64_t)flags << 32);
+ phys |= 1;
+ if (dev_priv->vram_sys_base) {
+ phys += dev_priv->vram_sys_base;
+ phys |= 0x30;
+ }
dev_priv->engine.instmem.prepare_access(dev, true);
while (size) {