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, data, size, hack);
58 nvif_object_sclass_get(struct nvif_object *object, struct nvif_sclass **psclass)
76 ret = nvif_object_ioctl(object, args, size, NULL);
102 nvif_object_rd(struct nvif_object *object, int size, u64 addr)
112 int ret = nvif_object_ioctl(object, &args, sizeof(args), NULL);
121 nvif_object_wr(struct nvif_object *object, int size, u64 addr, u32 data)
132 int ret = nvif_object_ioctl(object, &args, sizeof(args), NULL);
139 nvif_object_mthd(struct nvif_object *object, u32 mthd, void *data, u32 size)
160 ret = nvif_object_ioctl(object, args, sizeof(*args) + size, NULL);
168 nvif_object_unmap_handle(struct nvif_object *object)
177 nvif_object_ioctl(object, &args, sizeof(args), NULL);
181 nvif_object_map_handle(struct nvif_object *object, void *argv, u32 argc,
196 ret = nvif_object_ioctl(object, args, argn, NULL);
205 nvif_object_unmap(struct nvif_object *object)
207 struct nvif_client *client = object->client;
208 if (object->map.ptr) {
209 if (object->map.size) {
210 client->driver->unmap(client, object->map.ptr,
211 object->map.size);
212 object->map.size = 0;
214 object->map.ptr = NULL;
215 nvif_object_unmap_handle(object);
220 nvif_object_map(struct nvif_object *object, void *argv, u32 argc)
222 struct nvif_client *client = object->client;
224 int ret = nvif_object_map_handle(object, argv, argc, &handle, &length);
227 object->map.ptr = client->driver->map(client,
230 if (ret = -ENOMEM, object->map.ptr) {
231 object->map.size = length;
235 object->map.ptr = (void *)(unsigned long)handle;
238 nvif_object_unmap_handle(object);
244 nvif_object_dtor(struct nvif_object *object)
253 if (!nvif_object_constructed(object))
256 nvif_object_unmap(object);
257 nvif_object_ioctl(object, &args, sizeof(args), NULL);
258 object->client = NULL;
263 s32 oclass, void *data, u32 size, struct nvif_object *object)
271 object->client = NULL;
272 object->name = name ? name : "nvifObject";
273 object->handle = handle;
274 object->oclass = oclass;
275 object->map.ptr = NULL;
276 object->map.size = 0;
280 nvif_object_dtor(object);
284 object->parent = parent->parent;
290 args->new.token = nvif_handle(object);
291 args->new.object = nvif_handle(object);
297 &object->priv);
301 object->client = parent->client;
305 nvif_object_dtor(object);