OSDN Git Service

drm/nouveau/subdev: remove nvkm_subdev.mutex
authorBen Skeggs <bskeggs@redhat.com>
Wed, 2 Dec 2020 05:52:46 +0000 (15:52 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Thu, 11 Feb 2021 00:14:23 +0000 (10:14 +1000)
There's not really any nice way to assign the lock classes when we split
subdev indices into type+inst, and saves a few bytes in the structs when
a subdev has no need for it.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
drivers/gpu/drm/nouveau/include/nvkm/core/subdev.h
drivers/gpu/drm/nouveau/nvkm/core/subdev.c

index 76288c6..f927eae 100644 (file)
@@ -7,7 +7,6 @@ struct nvkm_subdev {
        const struct nvkm_subdev_func *func;
        struct nvkm_device *device;
        enum nvkm_devidx index;
-       struct mutex mutex;
        u32 debug;
 
        bool oneinit;
index 49d468b..5da6c92 100644 (file)
@@ -26,8 +26,6 @@
 #include <core/option.h>
 #include <subdev/mc.h>
 
-static struct lock_class_key nvkm_subdev_lock_class[NVKM_SUBDEV_NR];
-
 const char *
 nvkm_subdev_name[NVKM_SUBDEV_NR] = {
        [NVKM_SUBDEV_ACR     ] = "acr",
@@ -217,8 +215,6 @@ nvkm_subdev_ctor(const struct nvkm_subdev_func *func,
        subdev->func = func;
        subdev->device = device;
        subdev->index = index;
-
-       __mutex_init(&subdev->mutex, name, &nvkm_subdev_lock_class[index]);
        subdev->debug = nvkm_dbgopt(device->dbgopt, name);
 }