]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
drm/nouveau/nvif: remove support for userspace backends
authorBen Skeggs <bskeggs@nvidia.com>
Fri, 26 Jul 2024 04:38:05 +0000 (14:38 +1000)
committerDanilo Krummrich <dakr@kernel.org>
Sat, 27 Jul 2024 01:05:28 +0000 (03:05 +0200)
The tools that used libnvkm no longer exist.

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-15-bskeggs@nvidia.com
drivers/gpu/drm/nouveau/include/nvif/driver.h
drivers/gpu/drm/nouveau/nvif/driver.c

index 7a3af05f7f98ddcf622a9a40a598fb9095199e8b..8d294ce3cf0a6224363b31e0ba4fd5a9f015ecaa 100644 (file)
@@ -21,7 +21,4 @@ int nvif_driver_init(const char *drv, const char *cfg, const char *dbg,
                     const char *name, u64 device, struct nvif_client *);
 
 extern const struct nvif_driver nvif_driver_nvkm;
-extern const struct nvif_driver nvif_driver_drm;
-extern const struct nvif_driver nvif_driver_lib;
-extern const struct nvif_driver nvif_driver_null;
 #endif
index 5e00dd07afed619bbaa60539149e6beb11e1ddfc..acb708df2559822d787ee355aea9c7080ed179c5 100644 (file)
 #include <nvif/driver.h>
 #include <nvif/client.h>
 
-static const struct nvif_driver *
-nvif_driver[] = {
-#ifdef __KERNEL__
-       &nvif_driver_nvkm,
-#else
-       &nvif_driver_drm,
-       &nvif_driver_lib,
-       &nvif_driver_null,
-#endif
-       NULL
-};
-
 int
 nvif_driver_init(const char *drv, const char *cfg, const char *dbg,
                 const char *name, u64 device, struct nvif_client *client)
 {
-       int ret = -EINVAL, i;
+       int ret;
+
+       client->driver = &nvif_driver_nvkm;
 
-       for (i = 0; (client->driver = nvif_driver[i]); i++) {
-               if (!drv || !strcmp(client->driver->name, drv)) {
-                       ret = client->driver->init(name, device, cfg, dbg,
-                                                  &client->object.priv);
-                       if (ret == 0)
-                               break;
-                       client->driver->fini(client->object.priv);
-               }
-       }
+       ret = client->driver->init(name, device, cfg, dbg, &client->object.priv);
+       if (ret)
+               return ret;
 
-       if (ret == 0)
-               ret = nvif_client_ctor(client, name, device, client);
-       return ret;
+       return nvif_client_ctor(client, name, device, client);
 }