summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/nouveau/nvif/mem.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2018-05-08 13:39:46 +0300
committerBen Skeggs <bskeggs@redhat.com>2018-05-18 08:01:21 +0300
commitf5650478ab07c0921127a6a0735253b64073e978 (patch)
treefc7ae9af67f2c843d6efe005e4745b81768af0f3 /drivers/gpu/drm/nouveau/nvif/mem.c
parenta9c44a88ca2f957c755bcb2ce8b9d2e031d65f64 (diff)
downloadlinux-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.c13
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)
{