Commit 843faa03 authored by Ben Skeggs's avatar Ben Skeggs

drm/nouveau/core/object: pass more args in oclass

The fields were already in struct nvkm_oclass for some reason (probably
as an accidental left-over).

Preparation for supporting subclients.
Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent a664869a
......@@ -106,9 +106,11 @@ nvkm_ioctl_new(struct nvkm_client *client,
do {
memset(&oclass, 0x00, sizeof(oclass));
oclass.client = client;
oclass.handle = args->v0.handle;
oclass.route = args->v0.route;
oclass.token = args->v0.token;
oclass.object = args->v0.object;
oclass.client = client;
oclass.parent = parent;
ret = parent->func->sclass(parent, i++, &oclass);
if (ret)
......@@ -127,9 +129,6 @@ nvkm_ioctl_new(struct nvkm_client *client,
ret = nvkm_object_init(object);
if (ret == 0) {
list_add(&object->head, &parent->tree);
object->route = args->v0.route;
object->token = args->v0.token;
object->object = args->v0.object;
if (nvkm_object_insert(object)) {
client->data = object;
return 0;
......
......@@ -289,6 +289,9 @@ nvkm_object_ctor(const struct nvkm_object_func *func,
object->engine = nvkm_engine_ref(oclass->engine);
object->oclass = oclass->base.oclass;
object->handle = oclass->handle;
object->route = oclass->route;
object->token = oclass->token;
object->object = oclass->object;
INIT_LIST_HEAD(&object->head);
INIT_LIST_HEAD(&object->tree);
RB_CLEAR_NODE(&object->node);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment