diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2020-03-30 06:59:39 +0300 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2020-07-24 11:50:51 +0300 |
commit | 45faf3d7b64ff0abfce735d4b2cd2f2edd357485 (patch) | |
tree | 05a3a19a193306971a64e87147c9fc2d691df5f9 /drivers/gpu/drm/nouveau/nvif | |
parent | e79c9a0ba5e7e0905d191f5d75e5ead50776c64a (diff) | |
download | linux-45faf3d7b64ff0abfce735d4b2cd2f2edd357485.tar.xz |
drm/nouveau/nvif: give every vmm object a human-readable identifier
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvif')
-rw-r--r-- | drivers/gpu/drm/nouveau/nvif/vmm.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/gpu/drm/nouveau/nvif/vmm.c b/drivers/gpu/drm/nouveau/nvif/vmm.c index dc82e5515fc5..6053d6dc2184 100644 --- a/drivers/gpu/drm/nouveau/nvif/vmm.c +++ b/drivers/gpu/drm/nouveau/nvif/vmm.c @@ -105,15 +105,15 @@ nvif_vmm_get(struct nvif_vmm *vmm, enum nvif_vmm_get type, bool sparse, } void -nvif_vmm_fini(struct nvif_vmm *vmm) +nvif_vmm_dtor(struct nvif_vmm *vmm) { kfree(vmm->page); nvif_object_dtor(&vmm->object); } int -nvif_vmm_init(struct nvif_mmu *mmu, s32 oclass, bool managed, u64 addr, - u64 size, void *argv, u32 argc, struct nvif_vmm *vmm) +nvif_vmm_ctor(struct nvif_mmu *mmu, const char *name, s32 oclass, bool managed, + u64 addr, u64 size, void *argv, u32 argc, struct nvif_vmm *vmm) { struct nvif_vmm_v0 *args; u32 argn = sizeof(*args) + argc; @@ -130,8 +130,8 @@ nvif_vmm_init(struct nvif_mmu *mmu, s32 oclass, bool managed, u64 addr, args->size = size; memcpy(args->data, argv, argc); - ret = nvif_object_ctor(&mmu->object, "nvifVmm", 0, oclass, args, argn, - &vmm->object); + ret = nvif_object_ctor(&mmu->object, name ? name : "nvifVmm", 0, + oclass, args, argn, &vmm->object); if (ret) goto done; @@ -163,7 +163,7 @@ nvif_vmm_init(struct nvif_mmu *mmu, s32 oclass, bool managed, u64 addr, done: if (ret) - nvif_vmm_fini(vmm); + nvif_vmm_dtor(vmm); kfree(args); return ret; } |