]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
drm/nouveau/nvif: give every usermode object a human-readable identifier
authorBen Skeggs <bskeggs@redhat.com>
Mon, 30 Mar 2020 04:01:57 +0000 (14:01 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Fri, 24 Jul 2020 08:50:51 +0000 (18:50 +1000)
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
drivers/gpu/drm/nouveau/include/nvif/user.h
drivers/gpu/drm/nouveau/nouveau_drm.c
drivers/gpu/drm/nouveau/nvif/device.c
drivers/gpu/drm/nouveau/nvif/user.c

index 6825574d93c2b30e75eaef6e59c1616b8acd5bcd..146986a9fe530437b7533a45c5213a068e47bf46 100644 (file)
@@ -13,8 +13,8 @@ struct nvif_user_func {
        u64 (*time)(struct nvif_user *);
 };
 
-int nvif_user_init(struct nvif_device *);
-void nvif_user_fini(struct nvif_device *);
+int nvif_user_ctor(struct nvif_device *, const char *name);
+void nvif_user_dtor(struct nvif_device *);
 
 extern const struct nvif_user_func nvif_userc361;
 #endif
index bfb8d4c1a2d85359679e0328c1489f944e3afd44..6f24a215ac74903de451f2376d3080e2d0fae77c 100644 (file)
@@ -483,7 +483,7 @@ nouveau_accel_init(struct nouveau_drm *drm)
 
        /* Volta requires access to a doorbell register for kickoff. */
        if (drm->client.device.info.family >= NV_DEVICE_INFO_V0_VOLTA) {
-               ret = nvif_user_init(device);
+               ret = nvif_user_ctor(device, "drmUsermode");
                if (ret)
                        return;
        }
index a3aebf86593132ff7d64cb7066ea582823ce90b0..8c3d883f331380d11173f64f3d6c8985ceb207d7 100644 (file)
@@ -41,7 +41,7 @@ nvif_device_time(struct nvif_device *device)
 void
 nvif_device_dtor(struct nvif_device *device)
 {
-       nvif_user_fini(device);
+       nvif_user_dtor(device);
        kfree(device->runlist);
        device->runlist = NULL;
        nvif_object_dtor(&device->object);
index 490fd18d02c0c488caca802270abf9d9b3f773af..d89f5b67b3046518d9735c593611cffb38d10259 100644 (file)
@@ -25,7 +25,7 @@
 #include <nvif/class.h>
 
 void
-nvif_user_fini(struct nvif_device *device)
+nvif_user_dtor(struct nvif_device *device)
 {
        if (device->user.func) {
                nvif_object_dtor(&device->user.object);
@@ -34,7 +34,7 @@ nvif_user_fini(struct nvif_device *device)
 }
 
 int
-nvif_user_init(struct nvif_device *device)
+nvif_user_ctor(struct nvif_device *device, const char *name)
 {
        struct {
                s32 oclass;
@@ -53,7 +53,7 @@ nvif_user_init(struct nvif_device *device)
        if (cid < 0)
                return cid;
 
-       ret = nvif_object_ctor(&device->object, "nvifUsermode",
+       ret = nvif_object_ctor(&device->object, name ? name : "nvifUsermode",
                               0, users[cid].oclass, NULL, 0,
                               &device->user.object);
        if (ret)