- this protected the drm.master object rb, which no longer exists Signed-off-by: Ben Skeggs <bskeggs@xxxxxxxxxx> --- drivers/gpu/drm/nouveau/nouveau_drm.c | 7 ------- drivers/gpu/drm/nouveau/nouveau_drv.h | 1 - drivers/gpu/drm/nouveau/nouveau_mem.c | 6 ------ 3 files changed, 14 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c index ae6b992c32f9..aac9e57d0204 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drm.c +++ b/drivers/gpu/drm/nouveau/nouveau_drm.c @@ -185,9 +185,7 @@ nouveau_cli_fini(struct nouveau_cli *cli) nvif_mmu_dtor(&cli->mmu); cli->device.object.map.ptr = NULL; nvif_device_dtor(&cli->device); - mutex_lock(&cli->drm->client_mutex); nvif_client_dtor(&cli->base); - mutex_unlock(&cli->drm->client_mutex); } static int @@ -204,9 +202,7 @@ nouveau_cli_init(struct nouveau_drm *drm, const char *sname, INIT_LIST_HEAD(&cli->worker); mutex_init(&cli->lock); - mutex_lock(&drm->client_mutex); ret = nvif_client_ctor(&drm->_client, cli->name, &cli->base); - mutex_unlock(&drm->client_mutex); if (ret) { NV_PRINTK(err, cli, "Client allocation failed: %d\n", ret); goto done; @@ -505,7 +501,6 @@ nouveau_drm_device_init(struct drm_device *dev, struct nvkm_device *nvkm) nvif_parent_ctor(&nouveau_parent, &drm->parent); - mutex_init(&drm->client_mutex); drm->_client.object.parent = &drm->parent; ret = nvkm_driver_ctor(drm->nvkm, &driver, &impl, &priv); @@ -641,7 +636,6 @@ nouveau_drm_device_init(struct drm_device *dev, struct nvkm_device *nvkm) nvif_device_dtor(&drm->device); nvif_client_dtor(&drm->_client); fail_alloc: - mutex_destroy(&drm->client_mutex); nvif_parent_dtor(&drm->parent); kfree(drm); return ret; @@ -696,7 +690,6 @@ nouveau_drm_device_fini(struct drm_device *dev) destroy_workqueue(drm->sched_wq); nvif_mmu_dtor(&drm->mmu); nvif_device_dtor(&drm->device); - mutex_destroy(&drm->client_mutex); nvif_parent_dtor(&drm->parent); mutex_destroy(&drm->clients_lock); kfree(drm); diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.h b/drivers/gpu/drm/nouveau/nouveau_drv.h index e40416c884a8..046f219328bc 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drv.h +++ b/drivers/gpu/drm/nouveau/nouveau_drv.h @@ -203,7 +203,6 @@ u_memcpya(uint64_t user, unsigned int nmemb, unsigned int size) struct nouveau_drm { struct nvkm_device *nvkm; struct nvif_parent parent; - struct mutex client_mutex; struct nvif_client _client; struct nvif_device device; struct nvif_mmu mmu; diff --git a/drivers/gpu/drm/nouveau/nouveau_mem.c b/drivers/gpu/drm/nouveau/nouveau_mem.c index ff67f00c93c5..aa0503d13cbe 100644 --- a/drivers/gpu/drm/nouveau/nouveau_mem.c +++ b/drivers/gpu/drm/nouveau/nouveau_mem.c @@ -80,9 +80,7 @@ nouveau_mem_fini(struct nouveau_mem *mem) { nvif_vmm_put(&mem->drm->cli.vmm.vmm, &mem->vma[1]); nvif_vmm_put(&mem->drm->cli.vmm.vmm, &mem->vma[0]); - mutex_lock(&mem->drm->client_mutex); nvif_mem_dtor(&mem->mem); - mutex_unlock(&mem->drm->client_mutex); } int @@ -113,11 +111,9 @@ nouveau_mem_host(struct ttm_resource *reg, struct ttm_tt *tt) else args.dma = tt->dma_address; - mutex_lock(&drm->client_mutex); ret = nvif_mem_ctor_type(mmu, "ttmHostMem", type, PAGE_SHIFT, reg->size, &args, sizeof(args), &mem->mem); - mutex_unlock(&drm->client_mutex); return ret; } @@ -130,7 +126,6 @@ nouveau_mem_vram(struct ttm_resource *reg, bool contig, u8 page) u64 size = ALIGN(reg->size, 1 << page); int ret; - mutex_lock(&drm->client_mutex); switch (drm->mmu.impl->mem.oclass) { case NVIF_CLASS_MEM_GF100: ret = nvif_mem_ctor_type(mmu, "ttmVram", @@ -154,7 +149,6 @@ nouveau_mem_vram(struct ttm_resource *reg, bool contig, u8 page) WARN_ON(1); break; } - mutex_unlock(&drm->client_mutex); reg->start = mem->mem.impl->addr >> PAGE_SHIFT; return ret; -- 2.41.0