drm/nouveau/nvif: remove client version
authorBen Skeggs <bskeggs@nvidia.com>
Fri, 26 Jul 2024 04:38:11 +0000 (14:38 +1000)
committerDanilo Krummrich <dakr@kernel.org>
Sat, 27 Jul 2024 01:05:33 +0000 (03:05 +0200)
This is not, and has never, been used for anything.  Remove it.

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-21-bskeggs@nvidia.com
drivers/gpu/drm/nouveau/include/nvif/client.h
drivers/gpu/drm/nouveau/include/nvif/ioctl.h
drivers/gpu/drm/nouveau/nvif/client.c
drivers/gpu/drm/nouveau/nvkm/core/ioctl.c

index 2c8e9be..03f1d56 100644 (file)
@@ -7,12 +7,10 @@
 struct nvif_client {
        struct nvif_object object;
        const struct nvif_driver *driver;
-       u64 version;
 };
 
 int  nvif_client_ctor(struct nvif_client *parent, const char *name, struct nvif_client *);
 void nvif_client_dtor(struct nvif_client *);
-int  nvif_client_ioctl(struct nvif_client *, void *, u32);
 int  nvif_client_suspend(struct nvif_client *);
 int  nvif_client_resume(struct nvif_client *);
 
index 4e047bb..1e74245 100644 (file)
@@ -2,11 +2,8 @@
 #ifndef __NVIF_IOCTL_H__
 #define __NVIF_IOCTL_H__
 
-#define NVIF_VERSION_LATEST                               0x0000000000000100ULL
-
 struct nvif_ioctl_v0 {
        __u8  version;
-#define NVIF_IOCTL_V0_NOP                                                  0x00
 #define NVIF_IOCTL_V0_SCLASS                                               0x01
 #define NVIF_IOCTL_V0_NEW                                                  0x02
 #define NVIF_IOCTL_V0_DEL                                                  0x03
@@ -28,10 +25,6 @@ struct nvif_ioctl_v0 {
        __u8  data[];           /* ioctl data (below) */
 };
 
-struct nvif_ioctl_nop_v0 {
-       __u64 version;
-};
-
 struct nvif_ioctl_sclass_v0 {
        /* nvif_ioctl ... */
        __u8  version;
index bbfc80f..fdf5054 100644 (file)
 #include <nvif/class.h>
 #include <nvif/if0000.h>
 
-int
-nvif_client_ioctl(struct nvif_client *client, void *data, u32 size)
-{
-       return client->driver->ioctl(client->object.priv, data, size, NULL);
-}
-
 int
 nvif_client_suspend(struct nvif_client *client)
 {
@@ -58,10 +52,6 @@ int
 nvif_client_ctor(struct nvif_client *parent, const char *name, struct nvif_client *client)
 {
        struct nvif_client_v0 args = {};
-       struct {
-               struct nvif_ioctl_v0 ioctl;
-               struct nvif_ioctl_nop_v0 nop;
-       } nop = {};
        int ret;
 
        strscpy_pad(args.name, name, sizeof(args.name));
@@ -75,13 +65,5 @@ nvif_client_ctor(struct nvif_client *parent, const char *name, struct nvif_clien
        client->object.client = client;
        client->object.handle = ~0;
        client->driver = parent->driver;
-
-       if (ret == 0) {
-               ret = nvif_client_ioctl(client, &nop, sizeof(nop));
-               client->version = nop.nop.version;
-       }
-
-       if (ret)
-               nvif_client_dtor(client);
-       return ret;
+       return 0;
 }
index 39d5c97..584fc43 100644 (file)
@@ -33,18 +33,7 @@ static int
 nvkm_ioctl_nop(struct nvkm_client *client,
               struct nvkm_object *object, void *data, u32 size)
 {
-       union {
-               struct nvif_ioctl_nop_v0 v0;
-       } *args = data;
-       int ret = -ENOSYS;
-
-       nvif_ioctl(object, "nop size %d\n", size);
-       if (!(ret = nvif_unpack(ret, &data, &size, args->v0, 0, 0, false))) {
-               nvif_ioctl(object, "nop vers %lld\n", args->v0.version);
-               args->v0.version = NVIF_VERSION_LATEST;
-       }
-
-       return ret;
+       return -ENOSYS;
 }
 
 #include <nvif/class.h>