Lines Matching refs:object

25 #include <nvif/object.h>
31 nvif_object_ioctl(struct nvif_object *object, void *data, u32 size, void **hack)
33 struct nvif_client *client = object->client;
39 if (object != &client->object)
40 args->v0.object = nvif_handle(object);
42 args->v0.object = 0;
47 return client->driver->ioctl(client->object.priv, client->super,
59 nvif_object_sclass_get(struct nvif_object *object, struct nvif_sclass **psclass)
77 ret = nvif_object_ioctl(object, args, size, NULL);
103 nvif_object_rd(struct nvif_object *object, int size, u64 addr)
113 int ret = nvif_object_ioctl(object, &args, sizeof(args), NULL);
122 nvif_object_wr(struct nvif_object *object, int size, u64 addr, u32 data)
133 int ret = nvif_object_ioctl(object, &args, sizeof(args), NULL);
140 nvif_object_mthd(struct nvif_object *object, u32 mthd, void *data, u32 size)
161 ret = nvif_object_ioctl(object, args, sizeof(*args) + size, NULL);
169 nvif_object_unmap_handle(struct nvif_object *object)
178 nvif_object_ioctl(object, &args, sizeof(args), NULL);
182 nvif_object_map_handle(struct nvif_object *object, void *argv, u32 argc,
197 ret = nvif_object_ioctl(object, args, argn, NULL);
206 nvif_object_unmap(struct nvif_object *object)
208 struct nvif_client *client = object->client;
209 if (object->map.ptr) {
210 if (object->map.size) {
211 client->driver->unmap(client, object->map.ptr,
212 object->map.size);
213 object->map.size = 0;
215 object->map.ptr = NULL;
216 nvif_object_unmap_handle(object);
221 nvif_object_map(struct nvif_object *object, void *argv, u32 argc)
223 struct nvif_client *client = object->client;
225 int ret = nvif_object_map_handle(object, argv, argc, &handle, &length);
228 object->map.ptr = client->driver->map(client,
231 if (ret = -ENOMEM, object->map.ptr) {
232 object->map.size = length;
236 object->map.ptr = (void *)(unsigned long)handle;
239 nvif_object_unmap_handle(object);
245 nvif_object_dtor(struct nvif_object *object)
254 if (!object->client)
257 nvif_object_unmap(object);
258 nvif_object_ioctl(object, &args, sizeof(args), NULL);
259 object->client = NULL;
264 s32 oclass, void *data, u32 size, struct nvif_object *object)
272 object->client = NULL;
273 object->name = name ? name : "nvifObject";
274 object->handle = handle;
275 object->oclass = oclass;
276 object->map.ptr = NULL;
277 object->map.size = 0;
281 nvif_object_dtor(object);
285 object->parent = parent->parent;
291 args->new.token = nvif_handle(object);
292 args->new.object = nvif_handle(object);
298 &object->priv);
302 object->client = parent->client;
306 nvif_object_dtor(object);