drm/nv50: fix vram ptes on IGPs to point at stolen system memory
Ben Skeggs [Fri, 19 Feb 2010 22:10:11 +0000 (08:10 +1000)]
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>

drivers/gpu/drm/nouveau/nouveau_mem.c

index 134fedb..2dc09db 100644 (file)
@@ -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) {