[PATCH 2/2] nouveau/umem: rename nvkm client lock to umem_lock

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Dave Airlie <airlied@xxxxxxxxxx>

This lock is just protecting the umem list so name it as such.

Signed-off-by: Dave Airlie <airlied@xxxxxxxxxx>
---
 drivers/gpu/drm/nouveau/include/nvkm/core/client.h |  2 +-
 drivers/gpu/drm/nouveau/nvkm/core/client.c         |  2 +-
 drivers/gpu/drm/nouveau/nvkm/subdev/mmu/umem.c     | 12 ++++++------
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/include/nvkm/core/client.h b/drivers/gpu/drm/nouveau/include/nvkm/core/client.h
index 932c9fd0b2d8..6ca50e864e86 100644
--- a/drivers/gpu/drm/nouveau/include/nvkm/core/client.h
+++ b/drivers/gpu/drm/nouveau/include/nvkm/core/client.h
@@ -17,7 +17,7 @@ struct nvkm_client {
 	int (*event)(u64 token, void *argv, u32 argc);
 
 	struct list_head umem;
-	spinlock_t lock;
+	spinlock_t umem_lock;
 };
 
 int  nvkm_client_new(const char *name, u64 device, const char *cfg, const char *dbg,
diff --git a/drivers/gpu/drm/nouveau/nvkm/core/client.c b/drivers/gpu/drm/nouveau/nvkm/core/client.c
index c55662937ab2..2885795f71d4 100644
--- a/drivers/gpu/drm/nouveau/nvkm/core/client.c
+++ b/drivers/gpu/drm/nouveau/nvkm/core/client.c
@@ -183,6 +183,6 @@ nvkm_client_new(const char *name, u64 device, const char *cfg, const char *dbg,
 	spin_lock_init(&client->obj_lock);
 	client->event = event;
 	INIT_LIST_HEAD(&client->umem);
-	spin_lock_init(&client->lock);
+	spin_lock_init(&client->umem_lock);
 	return 0;
 }
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/umem.c b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/umem.c
index e530bb8b3b17..a16cc20b835f 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/umem.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/umem.c
@@ -42,14 +42,14 @@ nvkm_umem_search(struct nvkm_client *client, u64 handle)
 	object = nvkm_object_search(client, handle, &nvkm_umem);
 	if (IS_ERR(object)) {
 		if (client != master) {
-			spin_lock(&master->lock);
+			spin_lock(&master->umem_lock);
 			list_for_each_entry(umem, &master->umem, head) {
 				if (umem->object.object == handle) {
 					memory = nvkm_memory_ref(umem->memory);
 					break;
 				}
 			}
-			spin_unlock(&master->lock);
+			spin_unlock(&master->umem_lock);
 		}
 	} else {
 		umem = nvkm_umem(object);
@@ -124,9 +124,9 @@ static void *
 nvkm_umem_dtor(struct nvkm_object *object)
 {
 	struct nvkm_umem *umem = nvkm_umem(object);
-	spin_lock(&umem->object.client->lock);
+	spin_lock(&umem->object.client->umem_lock);
 	list_del_init(&umem->head);
-	spin_unlock(&umem->object.client->lock);
+	spin_unlock(&umem->object.client->umem_lock);
 	nvkm_memory_unref(&umem->memory);
 	return umem;
 }
@@ -179,9 +179,9 @@ nvkm_umem_new(const struct nvkm_oclass *oclass, void *argv, u32 argc,
 	if (ret)
 		return ret;
 
-	spin_lock(&umem->object.client->lock);
+	spin_lock(&umem->object.client->umem_lock);
 	list_add(&umem->head, &umem->object.client->umem);
-	spin_unlock(&umem->object.client->lock);
+	spin_unlock(&umem->object.client->umem_lock);
 
 	args->v0.page = nvkm_memory_page(umem->memory);
 	args->v0.addr = nvkm_memory_addr(umem->memory);
-- 
2.43.2





[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux