summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Courbot <acourbot@nvidia.com>2014-11-12 13:05:08 +0900
committerAlexandre Courbot <acourbot@nvidia.com>2014-11-12 14:57:50 +0900
commitde8edcab3e09e6ed53084b125da08ccae505789f (patch)
tree548645812282b5f44a1ebd095c706d80c0fe371a
parent68b9af38ef272aade929ab43b94a4a9dd42d1c59 (diff)
downloadnouveau-gk20a_vram.tar.gz
[HACK] fix video memory mappingsgk20a_vram
On GK20A video memory is actually system memory. Make sure it is mapped without compressed storage types, and with the L2 cache disabled. This is all the more reason for RAM-less devices to report 0 VRAM and have user-space allocate all their objects in system memory.
-rw-r--r--nvkm/subdev/vm/nvc0.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/nvkm/subdev/vm/nvc0.c b/nvkm/subdev/vm/nvc0.c
index 2d0988755..5e0601634 100644
--- a/nvkm/subdev/vm/nvc0.c
+++ b/nvkm/subdev/vm/nvc0.c
@@ -110,9 +110,11 @@ static void
nvc0_vm_map(struct nouveau_vma *vma, struct nouveau_gpuobj *pgt,
struct nouveau_mem *mem, u32 pte, u32 cnt, u64 phys, u64 delta)
{
+ /* compressed storage types are invalid for system memory */
+ u32 memtype = nvc0_pte_storage_type_map[mem->memtype & 0xff];
u64 next = 1 << (vma->node->type - 8);
- phys = nvc0_vm_addr(vma, phys, mem->memtype, 0);
+ phys = nvc0_vm_addr(vma, phys, memtype, 1);
pte <<= 3;
if (mem->tag) {