Commit 64a0f59a authored by Ben Skeggs's avatar Ben Skeggs

drm/nouveau/nvif: give every usermode object a human-readable identifier

Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
Reviewed-by: default avatarLyude Paul <lyude@redhat.com>
parent 45faf3d7
...@@ -13,8 +13,8 @@ struct nvif_user_func { ...@@ -13,8 +13,8 @@ struct nvif_user_func {
u64 (*time)(struct nvif_user *); u64 (*time)(struct nvif_user *);
}; };
int nvif_user_init(struct nvif_device *); int nvif_user_ctor(struct nvif_device *, const char *name);
void nvif_user_fini(struct nvif_device *); void nvif_user_dtor(struct nvif_device *);
extern const struct nvif_user_func nvif_userc361; extern const struct nvif_user_func nvif_userc361;
#endif #endif
...@@ -483,7 +483,7 @@ nouveau_accel_init(struct nouveau_drm *drm) ...@@ -483,7 +483,7 @@ nouveau_accel_init(struct nouveau_drm *drm)
/* Volta requires access to a doorbell register for kickoff. */ /* Volta requires access to a doorbell register for kickoff. */
if (drm->client.device.info.family >= NV_DEVICE_INFO_V0_VOLTA) { if (drm->client.device.info.family >= NV_DEVICE_INFO_V0_VOLTA) {
ret = nvif_user_init(device); ret = nvif_user_ctor(device, "drmUsermode");
if (ret) if (ret)
return; return;
} }
......
...@@ -41,7 +41,7 @@ nvif_device_time(struct nvif_device *device) ...@@ -41,7 +41,7 @@ nvif_device_time(struct nvif_device *device)
void void
nvif_device_dtor(struct nvif_device *device) nvif_device_dtor(struct nvif_device *device)
{ {
nvif_user_fini(device); nvif_user_dtor(device);
kfree(device->runlist); kfree(device->runlist);
device->runlist = NULL; device->runlist = NULL;
nvif_object_dtor(&device->object); nvif_object_dtor(&device->object);
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
#include <nvif/class.h> #include <nvif/class.h>
void void
nvif_user_fini(struct nvif_device *device) nvif_user_dtor(struct nvif_device *device)
{ {
if (device->user.func) { if (device->user.func) {
nvif_object_dtor(&device->user.object); nvif_object_dtor(&device->user.object);
...@@ -34,7 +34,7 @@ nvif_user_fini(struct nvif_device *device) ...@@ -34,7 +34,7 @@ nvif_user_fini(struct nvif_device *device)
} }
int int
nvif_user_init(struct nvif_device *device) nvif_user_ctor(struct nvif_device *device, const char *name)
{ {
struct { struct {
s32 oclass; s32 oclass;
...@@ -53,7 +53,7 @@ nvif_user_init(struct nvif_device *device) ...@@ -53,7 +53,7 @@ nvif_user_init(struct nvif_device *device)
if (cid < 0) if (cid < 0)
return cid; return cid;
ret = nvif_object_ctor(&device->object, "nvifUsermode", ret = nvif_object_ctor(&device->object, name ? name : "nvifUsermode",
0, users[cid].oclass, NULL, 0, 0, users[cid].oclass, NULL, 0,
&device->user.object); &device->user.object);
if (ret) if (ret)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment