diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2017-10-31 20:56:19 +0300 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2017-11-02 06:32:30 +0300 |
commit | 6f4dc18c166cd36d8e9dfd130874060065bedd1c (patch) | |
tree | a902d8fbbc9762c43166ba97d57b7ec221246d27 /drivers/gpu/drm/nouveau | |
parent | f66c57d9229c313de3adf340c604b1c7a40e5306 (diff) | |
download | linux-6f4dc18c166cd36d8e9dfd130874060065bedd1c.tar.xz |
drm/nouveau/fb/ram: use new interfaces for vmm operations
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau')
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/subdev/fb/ram.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ram.c b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ram.c index 03a860ae75b1..5305078f730e 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ram.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ram.c @@ -39,12 +39,22 @@ nvkm_vram_map(struct nvkm_memory *memory, u64 offset, struct nvkm_vmm *vmm, 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 |