struct nvkm_vma *vma, void *argv, u32 argc)
{
struct nvkm_vram *vram = nvkm_vram(memory);
- struct nvkm_mem mem = {
- .mem = vram->mn,
+ struct nvkm_vmm_map map = {
.memory = &vram->memory,
+ .offset = offset,
+ .mem = vram->mn,
};
- nvkm_vm_map_at(vma, offset, &mem);
- return 0;
+
+ if (vma->vm) {
+ struct nvkm_mem mem = {
+ .mem = vram->mn,
+ .memory = &vram->memory,
+ };
+ nvkm_vm_map_at(vma, offset, &mem);
+ return 0;
+ }
+
+ return nvkm_vmm_map(vmm, vma, argv, argc, &map);
}
static u64