Commit 7c413feb authored by Ben Skeggs's avatar Ben Skeggs
Browse files

drm/nouveau/core/client: pass notification callback to nvkm_client_new



Preparation for supporting subclients.

Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent 05da248b
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -20,7 +20,9 @@ struct nvkm_client {
};

int  nvkm_client_new(const char *name, u64 device, const char *cfg,
		     const char *dbg, struct nvkm_client **);
		     const char *dbg,
		     int (*)(const void *, u32, const void *, u32),
		     struct nvkm_client **);

int nvkm_client_notify_new(struct nvkm_object *, struct nvkm_event *,
			   void *data, u32 size);
+2 −10
Original line number Diff line number Diff line
@@ -103,16 +103,8 @@ static int
nvkm_client_driver_init(const char *name, u64 device, const char *cfg,
			const char *dbg, void **ppriv)
{
	struct nvkm_client *client;
	int ret;

	ret = nvkm_client_new(name, device, cfg, dbg, &client);
	*ppriv = client;
	if (ret)
		return ret;

	client->ntfy = nvkm_client_ntfy;
	return 0;
	return nvkm_client_new(name, device, cfg, dbg, nvkm_client_ntfy,
			       (struct nvkm_client **)ppriv);
}

const struct nvif_driver
+4 −1
Original line number Diff line number Diff line
@@ -238,7 +238,9 @@ nvkm_client = {

int
nvkm_client_new(const char *name, u64 device, const char *cfg,
		const char *dbg, struct nvkm_client **pclient)
		const char *dbg,
		int (*ntfy)(const void *, u32, const void *, u32),
		struct nvkm_client **pclient)
{
	struct nvkm_oclass oclass = { .base = nvkm_uclient_sclass };
	struct nvkm_client *client;
@@ -252,5 +254,6 @@ nvkm_client_new(const char *name, u64 device, const char *cfg,
	client->device = device;
	client->debug = nvkm_dbgopt(dbg, "CLIENT");
	client->objroot = RB_ROOT;
	client->ntfy = ntfy;
	return 0;
}