aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@nvidia.com>2024-07-26 14:38:05 +1000
committerDanilo Krummrich <dakr@kernel.org>2024-07-27 03:05:28 +0200
commitca6eef9b1c3486bedadad6a85d246b26df51c61d (patch)
treec5dd54d10d70abb2fa8cd6e2f693645ec2827fee
parentdrm/nouveau/nvkm: remove nvkm_client_search() (diff)
downloadwireguard-linux-ca6eef9b1c3486bedadad6a85d246b26df51c61d.tar.xz
wireguard-linux-ca6eef9b1c3486bedadad6a85d246b26df51c61d.zip
drm/nouveau/nvif: remove support for userspace backends
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
-rw-r--r--drivers/gpu/drm/nouveau/include/nvif/driver.h3
-rw-r--r--drivers/gpu/drm/nouveau/nvif/driver.c32
2 files changed, 7 insertions, 28 deletions
diff --git a/drivers/gpu/drm/nouveau/include/nvif/driver.h b/drivers/gpu/drm/nouveau/include/nvif/driver.h
index 7a3af05f7f98..8d294ce3cf0a 100644
--- a/drivers/gpu/drm/nouveau/include/nvif/driver.h
+++ b/drivers/gpu/drm/nouveau/include/nvif/driver.h
@@ -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
diff --git a/drivers/gpu/drm/nouveau/nvif/driver.c b/drivers/gpu/drm/nouveau/nvif/driver.c
index 5e00dd07afed..acb708df2559 100644
--- a/drivers/gpu/drm/nouveau/nvif/driver.c
+++ b/drivers/gpu/drm/nouveau/nvif/driver.c
@@ -24,35 +24,17 @@
#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);
}