Commit a897f65b authored by Ben Skeggs's avatar Ben Skeggs Committed by Danilo Krummrich
Browse files

drm/nouveau/nvif: remove client device arg



This was once used by userspace tools (with nvkm built as a library), as
a way to select a "default device".

The DRM code doesn't need this at all as clients only have access to a
single device already, so inherit the value from its parent.

Signed-off-by: default avatarBen Skeggs <bskeggs@nvidia.com>
Signed-off-by: default avatarDanilo Krummrich <dakr@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240726043828.58966-20-bskeggs@nvidia.com
parent 7e0d8de4
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -10,8 +10,7 @@ struct nvif_client {
	u64 version;
};

int  nvif_client_ctor(struct nvif_client *parent, const char *name, u64 device,
		      struct nvif_client *);
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 *);
+0 −1
Original line number Diff line number Diff line
@@ -5,7 +5,6 @@
struct nvif_client_v0 {
	__u8  version;
	__u8  pad01[7];
	__u64 device;
	char  name[32];
};

+1 −3
Original line number Diff line number Diff line
@@ -241,7 +241,6 @@ nouveau_cli_init(struct nouveau_drm *drm, const char *sname,
		{ NVIF_CLASS_VMM_NV04 , -1 },
		{}
	};
	u64 device = nouveau_name(drm->dev);
	int ret;

	snprintf(cli->name, sizeof(cli->name), "%s", sname);
@@ -254,8 +253,7 @@ nouveau_cli_init(struct nouveau_drm *drm, const char *sname,

	if (cli != &drm->master) {
		mutex_lock(&drm->master.lock);
		ret = nvif_client_ctor(&drm->master.base, cli->name, device,
				       &cli->base);
		ret = nvif_client_ctor(&drm->master.base, cli->name, &cli->base);
		mutex_unlock(&drm->master.lock);
	}
	if (ret) {
+2 −3
Original line number Diff line number Diff line
@@ -55,10 +55,9 @@ nvif_client_dtor(struct nvif_client *client)
}

int
nvif_client_ctor(struct nvif_client *parent, const char *name, u64 device,
		 struct nvif_client *client)
nvif_client_ctor(struct nvif_client *parent, const char *name, struct nvif_client *client)
{
	struct nvif_client_v0 args = { .device = device };
	struct nvif_client_v0 args = {};
	struct {
		struct nvif_ioctl_v0 ioctl;
		struct nvif_ioctl_nop_v0 nop;
+1 −1
Original line number Diff line number Diff line
@@ -36,5 +36,5 @@ nvif_driver_init(const char *drv, const char *cfg, const char *dbg,
	if (ret)
		return ret;

	return nvif_client_ctor(client, name, device, client);
	return nvif_client_ctor(client, name, client);
}
Loading