diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2018-05-08 13:39:46 +0300 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2018-05-18 08:01:21 +0300 |
commit | f5650478ab07c0921127a6a0735253b64073e978 (patch) | |
tree | fc7ae9af67f2c843d6efe005e4745b81768af0f3 /drivers/gpu/drm/nouveau/nvif/mem.c | |
parent | a9c44a88ca2f957c755bcb2ce8b9d2e031d65f64 (diff) | |
download | linux-f5650478ab07c0921127a6a0735253b64073e978.tar.xz |
drm/nouveau/disp/nv50-: pass nvkm_memory objects for channel push buffers
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvif/mem.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nvif/mem.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nvif/mem.c b/drivers/gpu/drm/nouveau/nvif/mem.c index 0f9382c60145..b6ebb3b58673 100644 --- a/drivers/gpu/drm/nouveau/nvif/mem.c +++ b/drivers/gpu/drm/nouveau/nvif/mem.c @@ -24,6 +24,19 @@ #include <nvif/if000a.h> +int +nvif_mem_init_map(struct nvif_mmu *mmu, u8 type, u64 size, struct nvif_mem *mem) +{ + int ret = nvif_mem_init(mmu, mmu->mem, NVIF_MEM_MAPPABLE | type, 0, + size, NULL, 0, mem); + if (ret == 0) { + ret = nvif_object_map(&mem->object, NULL, 0); + if (ret) + nvif_mem_fini(mem); + } + return ret; +} + void nvif_mem_fini(struct nvif_mem *mem) { |