- no more users Signed-off-by: Ben Skeggs <bskeggs@xxxxxxxxxx> --- drivers/gpu/drm/nouveau/include/nvif/driverif.h | 3 +-- drivers/gpu/drm/nouveau/include/nvkm/subdev/mmu.h | 2 -- drivers/gpu/drm/nouveau/nvif/vmm.c | 3 +-- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/ummu.c | 5 +++-- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/uvmm.c | 13 ------------- 5 files changed, 5 insertions(+), 21 deletions(-) diff --git a/drivers/gpu/drm/nouveau/include/nvif/driverif.h b/drivers/gpu/drm/nouveau/include/nvif/driverif.h index 0a460eaaf76b..de9c55dea9bf 100644 --- a/drivers/gpu/drm/nouveau/include/nvif/driverif.h +++ b/drivers/gpu/drm/nouveau/include/nvif/driverif.h @@ -208,8 +208,7 @@ struct nvif_mmu_impl { struct { s32 oclass; int (*new)(struct nvif_mmu_priv *, enum nvif_vmm_type type, u64 addr, u64 size, - void *, u32, const struct nvif_vmm_impl **, struct nvif_vmm_priv **, - u64 handle); + void *, u32, const struct nvif_vmm_impl **, struct nvif_vmm_priv **); } vmm; }; diff --git a/drivers/gpu/drm/nouveau/include/nvkm/subdev/mmu.h b/drivers/gpu/drm/nouveau/include/nvkm/subdev/mmu.h index 6a1472b9499f..4e68fb5b2d2e 100644 --- a/drivers/gpu/drm/nouveau/include/nvkm/subdev/mmu.h +++ b/drivers/gpu/drm/nouveau/include/nvkm/subdev/mmu.h @@ -109,8 +109,6 @@ int nvkm_vmm_map(struct nvkm_vmm *, struct nvkm_vma *, void *argv, u32 argc, struct nvkm_vmm_map *); void nvkm_vmm_unmap(struct nvkm_vmm *, struct nvkm_vma *); -struct nvkm_vmm *nvkm_uvmm_search(struct nvkm_client *, u64 handle); - struct nvkm_mmu { const struct nvkm_mmu_func *func; struct nvkm_subdev subdev; diff --git a/drivers/gpu/drm/nouveau/nvif/vmm.c b/drivers/gpu/drm/nouveau/nvif/vmm.c index fe342828ce8c..c12c79e7d9bd 100644 --- a/drivers/gpu/drm/nouveau/nvif/vmm.c +++ b/drivers/gpu/drm/nouveau/nvif/vmm.c @@ -113,8 +113,7 @@ nvif_vmm_ctor(struct nvif_mmu *mmu, const char *name, const u32 oclass = mmu->impl->vmm.oclass; int ret; - ret = mmu->impl->vmm.new(mmu->priv, type, addr, size, argv, argc, &vmm->impl, &vmm->priv, - nvif_handle(&vmm->object)); + ret = mmu->impl->vmm.new(mmu->priv, type, addr, size, argv, argc, &vmm->impl, &vmm->priv); NVIF_ERRON(ret, &mmu->object, "[NEW vmm%08x]", oclass); if (ret) return ret; diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/ummu.c b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/ummu.c index b3883758828d..2734b75b34f3 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/ummu.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/ummu.c @@ -28,7 +28,7 @@ static int nvkm_ummu_vmm_new(struct nvif_mmu_priv *ummu, enum nvif_vmm_type type, u64 addr, u64 size, void *argv, u32 argc, const struct nvif_vmm_impl **pimpl, - struct nvif_vmm_priv **ppriv, u64 handle) + struct nvif_vmm_priv **ppriv) { struct nvkm_object *object; int ret; @@ -37,7 +37,8 @@ nvkm_ummu_vmm_new(struct nvif_mmu_priv *ummu, enum nvif_vmm_type type, u64 addr, if (ret) return ret; - return nvkm_object_link_rb(ummu->object.client, &ummu->object, handle, object); + nvkm_object_link(&ummu->object, object); + return 0; } static int diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/uvmm.c b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/uvmm.c index 5fac19738815..571f79b90fd3 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/uvmm.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/uvmm.c @@ -42,19 +42,6 @@ nvkm_uvmm_ref(struct nvif_vmm_priv *uvmm) return NULL; } -static const struct nvkm_object_func nvkm_uvmm; -struct nvkm_vmm * -nvkm_uvmm_search(struct nvkm_client *client, u64 handle) -{ - struct nvkm_object *object; - - object = nvkm_object_search(client, handle, &nvkm_uvmm); - if (IS_ERR(object)) - return (void *)object; - - return nvkm_vmm_ref(container_of(object, struct nvif_vmm_priv, object)->vmm); -} - static void nvkm_uvmm_fault_cancel(struct nvif_vmm_priv *uvmm, u64 inst, u8 hub, u8 gpc, u8 client) { -- 2.41.0