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