diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2012-01-12 09:34:54 +0400 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2012-03-13 11:14:06 +0400 |
commit | 990449c77cafb77e7468722262c049675ab03e30 (patch) | |
tree | d6ed4aea5b2ce93eb294dfae870be30c7418527a /drivers/gpu/drm/nouveau/nvc0_vm.c | |
parent | 4abb410a13eec3f49863be2e84ad062fef00dac0 (diff) | |
download | linux-990449c77cafb77e7468722262c049675ab03e30.tar.xz |
drm/nv50-nvc0/vm: support unsnooped system memory
v2 (Emil Velikov <emil.l.velikov@gmail.com>):
- Fixed a regression on certain nv50 IGP due to not passing the correct
target type to nv50_vm_addr()
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Tested-by: Johannes Obermayr <johannesobermayr@gmx.de>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvc0_vm.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nvc0_vm.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/nvc0_vm.c b/drivers/gpu/drm/nouveau/nvc0_vm.c index 9e352944a35a..30d2bd58828f 100644 --- a/drivers/gpu/drm/nouveau/nvc0_vm.c +++ b/drivers/gpu/drm/nouveau/nvc0_vm.c @@ -77,9 +77,11 @@ void nvc0_vm_map_sg(struct nouveau_vma *vma, struct nouveau_gpuobj *pgt, struct nouveau_mem *mem, u32 pte, u32 cnt, dma_addr_t *list) { + u32 target = (vma->access & NV_MEM_ACCESS_NOSNOOP) ? 7 : 5; + pte <<= 3; while (cnt--) { - u64 phys = nvc0_vm_addr(vma, *list++, mem->memtype, 5); + u64 phys = nvc0_vm_addr(vma, *list++, mem->memtype, target); nv_wo32(pgt, pte + 0, lower_32_bits(phys)); nv_wo32(pgt, pte + 4, upper_32_bits(phys)); pte += 8; |