Lines Matching refs:abi16
44 if (!cli->abi16) { in nouveau_abi16()
45 struct nouveau_abi16 *abi16; in nouveau_abi16() local
46 cli->abi16 = abi16 = kzalloc(sizeof(*abi16), GFP_KERNEL); in nouveau_abi16()
47 if (cli->abi16) { in nouveau_abi16()
52 INIT_LIST_HEAD(&abi16->channels); in nouveau_abi16()
60 &abi16->device) == 0) in nouveau_abi16()
61 return cli->abi16; in nouveau_abi16()
63 kfree(cli->abi16); in nouveau_abi16()
64 cli->abi16 = NULL; in nouveau_abi16()
67 return cli->abi16; in nouveau_abi16()
76 return cli->abi16; in nouveau_abi16_get()
82 nouveau_abi16_put(struct nouveau_abi16 *abi16, int ret) in nouveau_abi16_put() argument
84 struct nouveau_cli *cli = (void *)abi16->device.object.client; in nouveau_abi16_put()
124 nouveau_abi16_chan_fini(struct nouveau_abi16 *abi16, in nouveau_abi16_chan_fini() argument
159 nouveau_abi16_fini(struct nouveau_abi16 *abi16) in nouveau_abi16_fini() argument
161 struct nouveau_cli *cli = (void *)abi16->device.object.client; in nouveau_abi16_fini()
165 list_for_each_entry_safe(chan, temp, &abi16->channels, head) { in nouveau_abi16_fini()
166 nouveau_abi16_chan_fini(abi16, chan); in nouveau_abi16_fini()
170 nvif_device_dtor(&abi16->device); in nouveau_abi16_fini()
172 kfree(cli->abi16); in nouveau_abi16_fini()
173 cli->abi16 = NULL; in nouveau_abi16_fini()
254 struct nouveau_abi16 *abi16 = nouveau_abi16_get(file_priv); in nouveau_abi16_ioctl_channel_alloc() local
260 if (unlikely(!abi16)) in nouveau_abi16_ioctl_channel_alloc()
264 return nouveau_abi16_put(abi16, -ENODEV); in nouveau_abi16_ioctl_channel_alloc()
266 device = &abi16->device; in nouveau_abi16_ioctl_channel_alloc()
278 return nouveau_abi16_put(abi16, -ENOSYS); in nouveau_abi16_ioctl_channel_alloc()
293 return nouveau_abi16_put(abi16, -EINVAL); in nouveau_abi16_ioctl_channel_alloc()
298 return nouveau_abi16_put(abi16, -ENOMEM); in nouveau_abi16_ioctl_channel_alloc()
301 list_add(&chan->head, &abi16->channels); in nouveau_abi16_ioctl_channel_alloc()
352 nouveau_abi16_chan_fini(abi16, chan); in nouveau_abi16_ioctl_channel_alloc()
353 return nouveau_abi16_put(abi16, ret); in nouveau_abi16_ioctl_channel_alloc()
357 nouveau_abi16_chan(struct nouveau_abi16 *abi16, int channel) in nouveau_abi16_chan() argument
361 list_for_each_entry(chan, &abi16->channels, head) { in nouveau_abi16_chan()
376 struct nouveau_abi16 *abi16; in nouveau_abi16_usif() local
391 if (!(abi16 = nouveau_abi16(file_priv))) in nouveau_abi16_usif()
395 if (!(chan = nouveau_abi16_chan(abi16, args->v0.token))) in nouveau_abi16_usif()
402 args->v0.object = nvif_handle(&abi16->device.object); in nouveau_abi16_usif()
411 struct nouveau_abi16 *abi16 = nouveau_abi16_get(file_priv); in nouveau_abi16_ioctl_channel_free() local
414 if (unlikely(!abi16)) in nouveau_abi16_ioctl_channel_free()
417 chan = nouveau_abi16_chan(abi16, req->channel); in nouveau_abi16_ioctl_channel_free()
419 return nouveau_abi16_put(abi16, -ENOENT); in nouveau_abi16_ioctl_channel_free()
420 nouveau_abi16_chan_fini(abi16, chan); in nouveau_abi16_ioctl_channel_free()
421 return nouveau_abi16_put(abi16, 0); in nouveau_abi16_ioctl_channel_free()
428 struct nouveau_abi16 *abi16 = nouveau_abi16_get(file_priv); in nouveau_abi16_ioctl_grobj_alloc() local
436 if (unlikely(!abi16)) in nouveau_abi16_ioctl_grobj_alloc()
440 return nouveau_abi16_put(abi16, -EINVAL); in nouveau_abi16_ioctl_grobj_alloc()
441 client = abi16->device.object.client; in nouveau_abi16_ioctl_grobj_alloc()
443 chan = nouveau_abi16_chan(abi16, init->channel); in nouveau_abi16_ioctl_grobj_alloc()
445 return nouveau_abi16_put(abi16, -ENOENT); in nouveau_abi16_ioctl_grobj_alloc()
449 return nouveau_abi16_put(abi16, ret); in nouveau_abi16_ioctl_grobj_alloc()
498 return nouveau_abi16_put(abi16, -EINVAL); in nouveau_abi16_ioctl_grobj_alloc()
502 return nouveau_abi16_put(abi16, -ENOMEM); in nouveau_abi16_ioctl_grobj_alloc()
513 return nouveau_abi16_put(abi16, ret); in nouveau_abi16_ioctl_grobj_alloc()
521 struct nouveau_abi16 *abi16 = nouveau_abi16_get(file_priv); in nouveau_abi16_ioctl_notifierobj_alloc() local
524 struct nvif_device *device = &abi16->device; in nouveau_abi16_ioctl_notifierobj_alloc()
529 if (unlikely(!abi16)) in nouveau_abi16_ioctl_notifierobj_alloc()
534 return nouveau_abi16_put(abi16, -EINVAL); in nouveau_abi16_ioctl_notifierobj_alloc()
535 client = abi16->device.object.client; in nouveau_abi16_ioctl_notifierobj_alloc()
537 chan = nouveau_abi16_chan(abi16, info->channel); in nouveau_abi16_ioctl_notifierobj_alloc()
539 return nouveau_abi16_put(abi16, -ENOENT); in nouveau_abi16_ioctl_notifierobj_alloc()
543 return nouveau_abi16_put(abi16, -ENOMEM); in nouveau_abi16_ioctl_notifierobj_alloc()
584 return nouveau_abi16_put(abi16, ret); in nouveau_abi16_ioctl_notifierobj_alloc()
591 struct nouveau_abi16 *abi16 = nouveau_abi16_get(file_priv); in nouveau_abi16_ioctl_gpuobj_free() local
596 if (unlikely(!abi16)) in nouveau_abi16_ioctl_gpuobj_free()
599 chan = nouveau_abi16_chan(abi16, fini->channel); in nouveau_abi16_ioctl_gpuobj_free()
601 return nouveau_abi16_put(abi16, -EINVAL); in nouveau_abi16_ioctl_gpuobj_free()
614 return nouveau_abi16_put(abi16, ret); in nouveau_abi16_ioctl_gpuobj_free()