mirror of
https://github.com/torvalds/linux.git
synced 2024-09-20 06:53:04 +00:00
drm/nouveau/nvif: remove client devlist
This was once used by userspace tools (with nvkm built as a library), but is now unused. Signed-off-by: Ben Skeggs <bskeggs@nvidia.com> Signed-off-by: Danilo Krummrich <dakr@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20240726043828.58966-22-bskeggs@nvidia.com
This commit is contained in:
parent
def122b64e
commit
c45c999cfb
|
@ -7,13 +7,4 @@ struct nvif_client_v0 {
|
|||
__u8 pad01[7];
|
||||
char name[32];
|
||||
};
|
||||
|
||||
#define NVIF_CLIENT_V0_DEVLIST 0x00
|
||||
|
||||
struct nvif_client_devlist_v0 {
|
||||
__u8 version;
|
||||
__u8 count;
|
||||
__u8 pad02[6];
|
||||
__u64 device[];
|
||||
};
|
||||
#endif
|
||||
|
|
|
@ -109,7 +109,6 @@ struct nvkm_device_chip {
|
|||
};
|
||||
|
||||
struct nvkm_device *nvkm_device_find(u64 name);
|
||||
int nvkm_device_list(u64 *name, int size);
|
||||
|
||||
/* privileged register interface accessor macros */
|
||||
#define nvkm_rd08(d,a) ioread8((d)->pri + (a))
|
||||
|
|
|
@ -65,45 +65,6 @@ nvkm_uclient_sclass = {
|
|||
.ctor = nvkm_uclient_new,
|
||||
};
|
||||
|
||||
static int
|
||||
nvkm_client_mthd_devlist(struct nvkm_client *client, void *data, u32 size)
|
||||
{
|
||||
union {
|
||||
struct nvif_client_devlist_v0 v0;
|
||||
} *args = data;
|
||||
int ret = -ENOSYS;
|
||||
|
||||
nvif_ioctl(&client->object, "client devlist size %d\n", size);
|
||||
if (!(ret = nvif_unpack(ret, &data, &size, args->v0, 0, 0, true))) {
|
||||
nvif_ioctl(&client->object, "client devlist vers %d count %d\n",
|
||||
args->v0.version, args->v0.count);
|
||||
if (size == sizeof(args->v0.device[0]) * args->v0.count) {
|
||||
ret = nvkm_device_list(args->v0.device, args->v0.count);
|
||||
if (ret >= 0) {
|
||||
args->v0.count = ret;
|
||||
ret = 0;
|
||||
}
|
||||
} else {
|
||||
ret = -EINVAL;
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int
|
||||
nvkm_client_mthd(struct nvkm_object *object, u32 mthd, void *data, u32 size)
|
||||
{
|
||||
struct nvkm_client *client = nvkm_client(object);
|
||||
switch (mthd) {
|
||||
case NVIF_CLIENT_V0_DEVLIST:
|
||||
return nvkm_client_mthd_devlist(client, data, size);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static int
|
||||
nvkm_client_child_new(const struct nvkm_oclass *oclass,
|
||||
void *data, u32 size, struct nvkm_object **pobject)
|
||||
|
@ -145,7 +106,6 @@ static const struct nvkm_object_func
|
|||
nvkm_client = {
|
||||
.dtor = nvkm_client_dtor,
|
||||
.fini = nvkm_client_fini,
|
||||
.mthd = nvkm_client_mthd,
|
||||
.sclass = nvkm_client_child_get,
|
||||
};
|
||||
|
||||
|
|
|
@ -53,20 +53,6 @@ nvkm_device_find(u64 handle)
|
|||
return device;
|
||||
}
|
||||
|
||||
int
|
||||
nvkm_device_list(u64 *name, int size)
|
||||
{
|
||||
struct nvkm_device *device;
|
||||
int nr = 0;
|
||||
mutex_lock(&nv_devices_mutex);
|
||||
list_for_each_entry(device, &nv_devices, head) {
|
||||
if (nr++ < size)
|
||||
name[nr - 1] = device->handle;
|
||||
}
|
||||
mutex_unlock(&nv_devices_mutex);
|
||||
return nr;
|
||||
}
|
||||
|
||||
static const struct nvkm_device_chip
|
||||
nv4_chipset = {
|
||||
.name = "NV04",
|
||||
|
|
Loading…
Reference in New Issue
Block a user