Searched refs:tfile (Results 1 - 21 of 21) sorted by relevance

/linux-4.4.14/drivers/gpu/drm/ttm/
H A Dttm_object.c127 struct ttm_object_file *tfile; member in struct:ttm_ref_object
133 ttm_object_file_ref(struct ttm_object_file *tfile) ttm_object_file_ref() argument
135 kref_get(&tfile->refcount); ttm_object_file_ref()
136 return tfile; ttm_object_file_ref()
141 struct ttm_object_file *tfile = ttm_object_file_destroy() local
144 kfree(tfile); ttm_object_file_destroy()
150 struct ttm_object_file *tfile = *p_tfile; ttm_object_file_unref() local
153 kref_put(&tfile->refcount, ttm_object_file_destroy); ttm_object_file_unref()
157 int ttm_base_object_init(struct ttm_object_file *tfile, ttm_base_object_init() argument
165 struct ttm_object_device *tdev = tfile->tdev; ttm_base_object_init()
169 base->tfile = ttm_object_file_ref(tfile); ttm_base_object_init()
182 ret = ttm_ref_object_add(tfile, base, TTM_REF_USAGE, NULL); ttm_base_object_init()
202 struct ttm_object_device *tdev = base->tfile->tdev; ttm_release_base()
214 ttm_object_file_unref(&base->tfile); ttm_release_base()
229 struct ttm_base_object *ttm_base_object_lookup(struct ttm_object_file *tfile, ttm_base_object_lookup() argument
234 struct drm_open_hash *ht = &tfile->ref_hash[TTM_REF_USAGE]; ttm_base_object_lookup()
277 * @tfile: Pointer to a struct ttm_object_file identifying the caller.
280 * Checks wether the caller identified by @tfile has put a valid USAGE
283 bool ttm_ref_object_exists(struct ttm_object_file *tfile, ttm_ref_object_exists() argument
286 struct drm_open_hash *ht = &tfile->ref_hash[TTM_REF_USAGE]; ttm_ref_object_exists()
319 int ttm_ref_object_add(struct ttm_object_file *tfile, ttm_ref_object_add() argument
323 struct drm_open_hash *ht = &tfile->ref_hash[ref_type]; ttm_ref_object_add()
326 struct ttm_mem_global *mem_glob = tfile->tdev->mem_glob; ttm_ref_object_add()
329 if (base->tfile != tfile && !base->shareable) ttm_ref_object_add()
360 ref->tfile = tfile; ttm_ref_object_add()
364 spin_lock(&tfile->lock); ttm_ref_object_add()
368 list_add_tail(&ref->head, &tfile->ref_list); ttm_ref_object_add()
370 spin_unlock(&tfile->lock); ttm_ref_object_add()
376 spin_unlock(&tfile->lock); ttm_ref_object_add()
392 struct ttm_object_file *tfile = ref->tfile; ttm_ref_object_release() local
394 struct ttm_mem_global *mem_glob = tfile->tdev->mem_glob; ttm_ref_object_release()
396 ht = &tfile->ref_hash[ref->ref_type]; ttm_ref_object_release()
399 spin_unlock(&tfile->lock); ttm_ref_object_release()
407 spin_lock(&tfile->lock); ttm_ref_object_release()
410 int ttm_ref_object_base_unref(struct ttm_object_file *tfile, ttm_ref_object_base_unref() argument
413 struct drm_open_hash *ht = &tfile->ref_hash[ref_type]; ttm_ref_object_base_unref()
418 spin_lock(&tfile->lock); ttm_ref_object_base_unref()
421 spin_unlock(&tfile->lock); ttm_ref_object_base_unref()
426 spin_unlock(&tfile->lock); ttm_ref_object_base_unref()
436 struct ttm_object_file *tfile = *p_tfile; ttm_object_file_release() local
439 spin_lock(&tfile->lock); ttm_object_file_release()
446 while (!list_empty(&tfile->ref_list)) { ttm_object_file_release()
447 list = tfile->ref_list.next; ttm_object_file_release()
453 drm_ht_remove(&tfile->ref_hash[i]); ttm_object_file_release()
455 spin_unlock(&tfile->lock); ttm_object_file_release()
456 ttm_object_file_unref(&tfile); ttm_object_file_release()
463 struct ttm_object_file *tfile = kmalloc(sizeof(*tfile), GFP_KERNEL); ttm_object_file_init() local
468 if (unlikely(tfile == NULL)) ttm_object_file_init()
471 spin_lock_init(&tfile->lock); ttm_object_file_init()
472 tfile->tdev = tdev; ttm_object_file_init()
473 kref_init(&tfile->refcount); ttm_object_file_init()
474 INIT_LIST_HEAD(&tfile->ref_list); ttm_object_file_init()
477 ret = drm_ht_create(&tfile->ref_hash[i], hash_order); ttm_object_file_init()
484 return tfile; ttm_object_file_init()
487 drm_ht_remove(&tfile->ref_hash[i]); ttm_object_file_init()
489 kfree(tfile); ttm_object_file_init()
596 struct ttm_object_device *tdev = base->tfile->tdev; ttm_prime_dmabuf_release()
611 * @tfile: A struct ttm_object_file identifying the caller.
619 int ttm_prime_fd_to_handle(struct ttm_object_file *tfile, ttm_prime_fd_to_handle() argument
622 struct ttm_object_device *tdev = tfile->tdev; ttm_prime_fd_to_handle()
638 ret = ttm_ref_object_add(tfile, base, TTM_REF_USAGE, NULL); ttm_prime_fd_to_handle()
649 * @tfile: Struct ttm_object_file identifying the caller.
655 int ttm_prime_handle_to_fd(struct ttm_object_file *tfile, ttm_prime_handle_to_fd() argument
659 struct ttm_object_device *tdev = tfile->tdev; ttm_prime_handle_to_fd()
665 base = ttm_base_object_lookup(tfile, handle); ttm_prime_handle_to_fd()
737 * @tfile: struct ttm_object_file identifying the caller
748 int ttm_prime_object_init(struct ttm_object_file *tfile, size_t size, ttm_prime_object_init() argument
760 return ttm_base_object_init(tfile, &prime->base, shareable, ttm_prime_object_init()
H A Dttm_lock.c232 struct ttm_object_file *tfile) ttm_vt_lock()
255 ret = ttm_base_object_init(tfile, &lock->base, false, ttm_vt_lock()
260 lock->vt_holder = tfile; ttm_vt_lock()
230 ttm_vt_lock(struct ttm_lock *lock, bool interruptible, struct ttm_object_file *tfile) ttm_vt_lock() argument
/linux-4.4.14/drivers/net/
H A Dtun.c382 struct tun_file *tfile) tun_flow_update()
387 u16 queue_index = tfile->queue_index; tun_flow_update()
398 if (tun->numqueues == 1 || tfile->detached) tun_flow_update()
486 static void tun_disable_queue(struct tun_struct *tun, struct tun_file *tfile) tun_disable_queue() argument
488 tfile->detached = tun; tun_disable_queue()
489 list_add_tail(&tfile->next, &tun->disabled); tun_disable_queue()
493 static struct tun_struct *tun_enable_queue(struct tun_file *tfile) tun_enable_queue() argument
495 struct tun_struct *tun = tfile->detached; tun_enable_queue()
497 tfile->detached = NULL; tun_enable_queue()
498 list_del_init(&tfile->next); tun_enable_queue()
503 static void tun_queue_purge(struct tun_file *tfile) tun_queue_purge() argument
505 skb_queue_purge(&tfile->sk.sk_receive_queue); tun_queue_purge()
506 skb_queue_purge(&tfile->sk.sk_error_queue); tun_queue_purge()
509 static void __tun_detach(struct tun_file *tfile, bool clean) __tun_detach() argument
514 tun = rtnl_dereference(tfile->tun); __tun_detach()
516 if (tun && !tfile->detached) { __tun_detach()
517 u16 index = tfile->queue_index; __tun_detach()
527 RCU_INIT_POINTER(tfile->tun, NULL); __tun_detach()
528 sock_put(&tfile->sk); __tun_detach()
530 tun_disable_queue(tun, tfile); __tun_detach()
535 tun_queue_purge(tfile); __tun_detach()
537 } else if (tfile->detached && clean) { __tun_detach()
538 tun = tun_enable_queue(tfile); __tun_detach()
539 sock_put(&tfile->sk); __tun_detach()
550 sock_put(&tfile->sk); __tun_detach()
554 static void tun_detach(struct tun_file *tfile, bool clean) tun_detach() argument
557 __tun_detach(tfile, clean); tun_detach()
564 struct tun_file *tfile, *tmp; tun_detach_all() local
568 tfile = rtnl_dereference(tun->tfiles[i]); tun_detach_all()
569 BUG_ON(!tfile); tun_detach_all()
570 tfile->socket.sk->sk_shutdown = RCV_SHUTDOWN; tun_detach_all()
571 tfile->socket.sk->sk_data_ready(tfile->socket.sk); tun_detach_all()
572 RCU_INIT_POINTER(tfile->tun, NULL); tun_detach_all()
575 list_for_each_entry(tfile, &tun->disabled, next) { tun_detach_all()
576 tfile->socket.sk->sk_shutdown = RCV_SHUTDOWN; tun_detach_all()
577 tfile->socket.sk->sk_data_ready(tfile->socket.sk); tun_detach_all()
578 RCU_INIT_POINTER(tfile->tun, NULL); tun_detach_all()
584 tfile = rtnl_dereference(tun->tfiles[i]); tun_detach_all()
586 tun_queue_purge(tfile); tun_detach_all()
587 sock_put(&tfile->sk); tun_detach_all()
589 list_for_each_entry_safe(tfile, tmp, &tun->disabled, next) { tun_detach_all()
590 tun_enable_queue(tfile); tun_detach_all()
591 tun_queue_purge(tfile); tun_detach_all()
592 sock_put(&tfile->sk); tun_detach_all()
602 struct tun_file *tfile = file->private_data; tun_attach() local
605 err = security_tun_dev_attach(tfile->socket.sk, tun->security); tun_attach()
610 if (rtnl_dereference(tfile->tun) && !tfile->detached) tun_attach()
618 if (!tfile->detached && tun_attach()
626 err = __sk_attach_filter(&tun->fprog, tfile->socket.sk, tun_attach()
631 tfile->queue_index = tun->numqueues; tun_attach()
632 tfile->socket.sk->sk_shutdown &= ~RCV_SHUTDOWN; tun_attach()
633 rcu_assign_pointer(tfile->tun, tun); tun_attach()
634 rcu_assign_pointer(tun->tfiles[tun->numqueues], tfile); tun_attach()
637 if (tfile->detached) tun_attach()
638 tun_enable_queue(tfile); tun_attach()
640 sock_hold(&tfile->sk); tun_attach()
652 static struct tun_struct *__tun_get(struct tun_file *tfile) __tun_get() argument
657 tun = rcu_dereference(tfile->tun); __tun_get()
814 struct tun_file *tfile; tun_net_xmit() local
818 tfile = rcu_dereference(tun->tfiles[txq]); tun_net_xmit()
843 BUG_ON(!tfile); tun_net_xmit()
851 if (tfile->socket.sk->sk_filter && tun_net_xmit()
852 sk_filter(tfile->socket.sk, skb)) tun_net_xmit()
858 if (skb_queue_len(&tfile->socket.sk->sk_receive_queue) * numqueues tun_net_xmit()
878 skb_queue_tail(&tfile->socket.sk->sk_receive_queue, skb); tun_net_xmit()
881 if (tfile->flags & TUN_FASYNC) tun_net_xmit()
882 kill_fasync(&tfile->fasync, SIGIO, POLL_IN); tun_net_xmit()
883 tfile->socket.sk->sk_data_ready(tfile->socket.sk); tun_net_xmit()
1027 struct tun_file *tfile = file->private_data; tun_chr_poll() local
1028 struct tun_struct *tun = __tun_get(tfile); tun_chr_poll()
1035 sk = tfile->socket.sk; tun_chr_poll()
1058 static struct sk_buff *tun_alloc_skb(struct tun_file *tfile, tun_alloc_skb() argument
1062 struct sock *sk = tfile->socket.sk; tun_alloc_skb()
1084 static ssize_t tun_get_user(struct tun_struct *tun, struct tun_file *tfile, tun_get_user() argument
1161 skb = tun_alloc_skb(tfile, align, copylen, linear, noblock); tun_get_user()
1268 tun_flow_update(tun, rxhash, tfile); tun_get_user()
1276 struct tun_file *tfile = file->private_data; tun_chr_write_iter() local
1282 result = tun_get_user(tun, tfile, NULL, from, file->f_flags & O_NONBLOCK); tun_chr_write_iter()
1290 struct tun_file *tfile, tun_put_user()
1401 static ssize_t tun_do_read(struct tun_struct *tun, struct tun_file *tfile, tun_do_read() argument
1415 skb = __skb_recv_datagram(tfile->socket.sk, noblock ? MSG_DONTWAIT : 0, tun_do_read()
1420 ret = tun_put_user(tun, tfile, skb, to); tun_do_read()
1432 struct tun_file *tfile = file->private_data; tun_chr_read_iter() local
1433 struct tun_struct *tun = __tun_get(tfile); tun_chr_read_iter()
1438 ret = tun_do_read(tun, tfile, to, file->f_flags & O_NONBLOCK); tun_chr_read_iter()
1486 struct tun_file *tfile; tun_sock_write_space() local
1500 tfile = container_of(sk, struct tun_file, sk); tun_sock_write_space()
1501 kill_fasync(&tfile->fasync, SIGIO, POLL_OUT); tun_sock_write_space()
1507 struct tun_file *tfile = container_of(sock, struct tun_file, socket); tun_sendmsg() local
1508 struct tun_struct *tun = __tun_get(tfile); tun_sendmsg()
1513 ret = tun_get_user(tun, tfile, m->msg_control, &m->msg_iter, tun_sendmsg()
1522 struct tun_file *tfile = container_of(sock, struct tun_file, socket); tun_recvmsg() local
1523 struct tun_struct *tun = __tun_get(tfile); tun_recvmsg()
1538 ret = tun_do_read(tun, tfile, &m->msg_iter, flags & MSG_DONTWAIT); tun_recvmsg()
1610 struct tun_file *tfile = file->private_data; tun_set_iff() local
1614 if (tfile->detached) tun_set_iff()
1686 dev->ifindex = tfile->ifindex; tun_set_iff()
1696 tun->sndbuf = tfile->socket.sk->sk_sndbuf; tun_set_iff()
1804 struct tun_file *tfile; tun_detach_filter() local
1807 tfile = rtnl_dereference(tun->tfiles[i]); tun_detach_filter()
1808 __sk_detach_filter(tfile->socket.sk, lockdep_rtnl_is_held()); tun_detach_filter()
1817 struct tun_file *tfile; tun_attach_filter() local
1820 tfile = rtnl_dereference(tun->tfiles[i]); tun_attach_filter()
1821 ret = __sk_attach_filter(&tun->fprog, tfile->socket.sk, tun_attach_filter()
1835 struct tun_file *tfile; tun_set_sndbuf() local
1839 tfile = rtnl_dereference(tun->tfiles[i]); tun_set_sndbuf()
1840 tfile->socket.sk->sk_sndbuf = tun->sndbuf; tun_set_sndbuf()
1846 struct tun_file *tfile = file->private_data; tun_set_queue() local
1853 tun = tfile->detached; tun_set_queue()
1863 tun = rtnl_dereference(tfile->tun); tun_set_queue()
1864 if (!tun || !(tun->flags & IFF_MULTI_QUEUE) || tfile->detached) tun_set_queue()
1867 __tun_detach(tfile, false); tun_set_queue()
1879 struct tun_file *tfile = file->private_data; __tun_chr_ioctl() local
1910 tun = __tun_get(tfile); __tun_chr_ioctl()
1914 ret = tun_set_iff(sock_net(&tfile->sk), file, &ifr); __tun_chr_ioctl()
1933 tfile->ifindex = ifindex; __tun_chr_ioctl()
1948 if (tfile->detached) __tun_chr_ioctl()
1950 if (!tfile->socket.sk->sk_filter) __tun_chr_ioctl()
2054 sndbuf = tfile->socket.sk->sk_sndbuf; __tun_chr_ioctl()
2193 struct tun_file *tfile = file->private_data; tun_chr_fasync() local
2196 if ((ret = fasync_helper(fd, file, on, &tfile->fasync)) < 0) tun_chr_fasync()
2201 tfile->flags |= TUN_FASYNC; tun_chr_fasync()
2203 tfile->flags &= ~TUN_FASYNC; tun_chr_fasync()
2212 struct tun_file *tfile; tun_chr_open() local
2216 tfile = (struct tun_file *)sk_alloc(net, AF_UNSPEC, GFP_KERNEL, tun_chr_open()
2218 if (!tfile) tun_chr_open()
2220 RCU_INIT_POINTER(tfile->tun, NULL); tun_chr_open()
2221 tfile->flags = 0; tun_chr_open()
2222 tfile->ifindex = 0; tun_chr_open()
2224 init_waitqueue_head(&tfile->wq.wait); tun_chr_open()
2225 RCU_INIT_POINTER(tfile->socket.wq, &tfile->wq); tun_chr_open()
2227 tfile->socket.file = file; tun_chr_open()
2228 tfile->socket.ops = &tun_socket_ops; tun_chr_open()
2230 sock_init_data(&tfile->socket, &tfile->sk); tun_chr_open()
2232 tfile->sk.sk_write_space = tun_sock_write_space; tun_chr_open()
2233 tfile->sk.sk_sndbuf = INT_MAX; tun_chr_open()
2235 file->private_data = tfile; tun_chr_open()
2236 INIT_LIST_HEAD(&tfile->next); tun_chr_open()
2238 sock_set_flag(&tfile->sk, SOCK_ZEROCOPY); tun_chr_open()
2245 struct tun_file *tfile = file->private_data; tun_chr_close() local
2247 tun_detach(tfile, true); tun_chr_close()
2397 struct tun_file *tfile; tun_get_socket() local
2400 tfile = file->private_data; tun_get_socket()
2401 if (!tfile) tun_get_socket()
2403 return &tfile->socket; tun_get_socket()
381 tun_flow_update(struct tun_struct *tun, u32 rxhash, struct tun_file *tfile) tun_flow_update() argument
1289 tun_put_user(struct tun_struct *tun, struct tun_file *tfile, struct sk_buff *skb, struct iov_iter *iter) tun_put_user() argument
/linux-4.4.14/drivers/gpu/drm/vmwgfx/
H A Dvmwgfx_prime.c124 struct ttm_object_file *tfile = vmw_fpriv(file_priv)->tfile; vmw_prime_fd_to_handle() local
126 return ttm_prime_fd_to_handle(tfile, fd, handle); vmw_prime_fd_to_handle()
134 struct ttm_object_file *tfile = vmw_fpriv(file_priv)->tfile; vmw_prime_handle_to_fd() local
136 return ttm_prime_handle_to_fd(tfile, handle, flags, prime_fd); vmw_prime_handle_to_fd()
H A Dvmwgfx_resource.c285 * @tfile: Pointer to a struct ttm_object_file identifying the caller
295 struct ttm_object_file *tfile, vmw_user_resource_lookup_handle()
305 base = ttm_base_object_lookup(tfile, handle); vmw_user_resource_lookup_handle()
338 struct ttm_object_file *tfile, vmw_user_lookup_handle()
348 ret = vmw_user_resource_lookup_handle(dev_priv, tfile, handle, vmw_user_lookup_handle()
357 ret = vmw_user_dmabuf_lookup(tfile, handle, out_buf, NULL); vmw_user_lookup_handle()
471 * @tfile: Pointer to a struct ttm_object_file on which to register the user
480 struct ttm_object_file *tfile, vmw_user_dmabuf_alloc()
506 ret = ttm_prime_object_init(tfile, vmw_user_dmabuf_alloc()
534 * @tfile: Identifying the caller.
537 struct ttm_object_file *tfile) vmw_user_dmabuf_verify_access()
547 if (likely(ttm_ref_object_exists(tfile, &vmw_user_bo->prime.base))) vmw_user_dmabuf_verify_access()
560 * @tfile: Identifying the caller.
563 * A blocking grab will be automatically released when @tfile is closed.
566 struct ttm_object_file *tfile, vmw_user_dmabuf_synccpu_grab()
593 ret = ttm_ref_object_add(tfile, &user_bo->prime.base, vmw_user_dmabuf_synccpu_grab()
606 * @tfile: Identifying the caller.
610 struct ttm_object_file *tfile, vmw_user_dmabuf_synccpu_release()
614 return ttm_ref_object_base_unref(tfile, handle, vmw_user_dmabuf_synccpu_release()
638 struct ttm_object_file *tfile = vmw_fpriv(file_priv)->tfile; vmw_user_dmabuf_synccpu_ioctl() local
652 ret = vmw_user_dmabuf_lookup(tfile, arg->handle, &dma_buf, vmw_user_dmabuf_synccpu_ioctl()
659 ret = vmw_user_dmabuf_synccpu_grab(user_bo, tfile, arg->flags); vmw_user_dmabuf_synccpu_ioctl()
670 ret = vmw_user_dmabuf_synccpu_release(arg->handle, tfile, vmw_user_dmabuf_synccpu_ioctl()
702 ret = vmw_user_dmabuf_alloc(dev_priv, vmw_fpriv(file_priv)->tfile, vmw_dmabuf_alloc_ioctl()
727 return ttm_ref_object_base_unref(vmw_fpriv(file_priv)->tfile, vmw_dmabuf_unref_ioctl()
732 int vmw_user_dmabuf_lookup(struct ttm_object_file *tfile, vmw_user_dmabuf_lookup() argument
739 base = ttm_base_object_lookup(tfile, handle); vmw_user_dmabuf_lookup()
765 int vmw_user_dmabuf_reference(struct ttm_object_file *tfile, vmw_user_dmabuf_reference() argument
777 return ttm_ref_object_add(tfile, &user_bo->prime.base, vmw_user_dmabuf_reference()
862 struct ttm_object_file *tfile = vmw_fpriv(file_priv)->tfile; vmw_stream_unref_ioctl() local
877 if (stream->base.tfile != tfile) { vmw_stream_unref_ioctl()
882 ttm_ref_object_base_unref(tfile, stream->base.hash.key, TTM_REF_USAGE); vmw_stream_unref_ioctl()
896 struct ttm_object_file *tfile = vmw_fpriv(file_priv)->tfile; vmw_stream_claim_ioctl() local
933 stream->base.tfile = NULL; vmw_stream_claim_ioctl()
944 ret = ttm_base_object_init(tfile, &stream->base, false, VMW_RES_STREAM, vmw_stream_claim_ioctl()
960 struct ttm_object_file *tfile, vmw_user_stream_lookup()
978 if (stream->base.tfile != tfile) { vmw_user_stream_lookup()
1018 ret = vmw_user_dmabuf_alloc(dev_priv, vmw_fpriv(file_priv)->tfile, vmw_dumb_create()
1044 struct ttm_object_file *tfile = vmw_fpriv(file_priv)->tfile; vmw_dumb_map_offset() local
1048 ret = vmw_user_dmabuf_lookup(tfile, handle, &out_buf, NULL); vmw_dumb_map_offset()
1070 return ttm_ref_object_base_unref(vmw_fpriv(file_priv)->tfile, vmw_dumb_destroy()
294 vmw_user_resource_lookup_handle(struct vmw_private *dev_priv, struct ttm_object_file *tfile, uint32_t handle, const struct vmw_user_resource_conv *converter, struct vmw_resource **p_res) vmw_user_resource_lookup_handle() argument
337 vmw_user_lookup_handle(struct vmw_private *dev_priv, struct ttm_object_file *tfile, uint32_t handle, struct vmw_surface **out_surf, struct vmw_dma_buffer **out_buf) vmw_user_lookup_handle() argument
479 vmw_user_dmabuf_alloc(struct vmw_private *dev_priv, struct ttm_object_file *tfile, uint32_t size, bool shareable, uint32_t *handle, struct vmw_dma_buffer **p_dma_buf, struct ttm_base_object **p_base) vmw_user_dmabuf_alloc() argument
536 vmw_user_dmabuf_verify_access(struct ttm_buffer_object *bo, struct ttm_object_file *tfile) vmw_user_dmabuf_verify_access() argument
565 vmw_user_dmabuf_synccpu_grab(struct vmw_user_dma_buffer *user_bo, struct ttm_object_file *tfile, uint32_t flags) vmw_user_dmabuf_synccpu_grab() argument
609 vmw_user_dmabuf_synccpu_release(uint32_t handle, struct ttm_object_file *tfile, uint32_t flags) vmw_user_dmabuf_synccpu_release() argument
959 vmw_user_stream_lookup(struct vmw_private *dev_priv, struct ttm_object_file *tfile, uint32_t *inout_id, struct vmw_resource **out) vmw_user_stream_lookup() argument
H A Dvmwgfx_surface.c677 struct ttm_object_file *tfile = vmw_fpriv(file_priv)->tfile; vmw_surface_destroy_ioctl() local
679 return ttm_ref_object_base_unref(tfile, arg->sid, TTM_REF_USAGE); vmw_surface_destroy_ioctl()
702 struct ttm_object_file *tfile = vmw_fpriv(file_priv)->tfile; vmw_surface_define_ioctl() local
833 user_srf->prime.base.tfile = NULL; vmw_surface_define_ioctl()
853 ret = vmw_user_dmabuf_alloc(dev_priv, tfile, vmw_surface_define_ioctl()
866 ret = ttm_prime_object_init(tfile, res->backup_size, &user_srf->prime, vmw_surface_define_ioctl()
902 struct ttm_object_file *tfile = vmw_fpriv(file_priv)->tfile; vmw_surface_handle_reference() local
909 ret = ttm_prime_fd_to_handle(tfile, u_handle, &handle); vmw_surface_handle_reference()
955 ret = ttm_ref_object_add(tfile, base, TTM_REF_USAGE, NULL); vmw_surface_handle_reference()
969 (void) ttm_ref_object_base_unref(tfile, handle, TTM_REF_USAGE); vmw_surface_handle_reference()
990 struct ttm_object_file *tfile = vmw_fpriv(file_priv)->tfile; vmw_surface_reference_ioctl() local
1017 ttm_ref_object_base_unref(tfile, base->hash.key, TTM_REF_USAGE); vmw_surface_reference_ioctl()
1289 struct ttm_object_file *tfile = vmw_fpriv(file_priv)->tfile; vmw_gb_surface_define_ioctl() local
1329 ret = vmw_user_dmabuf_lookup(tfile, req->buffer_handle, vmw_gb_surface_define_ioctl()
1340 ret = vmw_user_dmabuf_alloc(dev_priv, tfile, vmw_gb_surface_define_ioctl()
1354 ret = ttm_prime_object_init(tfile, res->backup_size, &user_srf->prime, vmw_gb_surface_define_ioctl()
1402 struct ttm_object_file *tfile = vmw_fpriv(file_priv)->tfile; vmw_gb_surface_reference_ioctl() local
1422 ret = vmw_user_dmabuf_reference(tfile, srf->res.backup, vmw_gb_surface_reference_ioctl()
1429 (void) ttm_ref_object_base_unref(tfile, base->hash.key, vmw_gb_surface_reference_ioctl()
1538 user_srf->prime.base.tfile = NULL; vmw_surface_gb_priv_define()
H A Dvmwgfx_fence.c593 struct ttm_object_file *tfile = vmw_fpriv(file_priv)->tfile; vmw_user_fence_create() local
627 ret = ttm_base_object_init(tfile, &ufence->base, false, vmw_user_fence_create()
713 struct ttm_object_file *tfile = vmw_fpriv(file_priv)->tfile; vmw_fence_obj_wait_ioctl() local
730 base = ttm_base_object_lookup(tfile, arg->handle); vmw_fence_obj_wait_ioctl()
759 return ttm_ref_object_base_unref(tfile, arg->handle, vmw_fence_obj_wait_ioctl()
772 struct ttm_object_file *tfile = vmw_fpriv(file_priv)->tfile; vmw_fence_obj_signaled_ioctl() local
775 base = ttm_base_object_lookup(tfile, arg->handle); vmw_fence_obj_signaled_ioctl()
805 return ttm_ref_object_base_unref(vmw_fpriv(file_priv)->tfile, vmw_fence_obj_unref_ioctl()
1125 ret = ttm_ref_object_add(vmw_fp->tfile, base, vmw_fence_event_ioctl()
1169 ttm_ref_object_base_unref(vmw_fpriv(file_priv)->tfile, vmw_fence_event_ioctl()
H A Dvmwgfx_drv.h82 struct ttm_object_file *tfile; member in struct:vmw_fpriv
609 struct ttm_object_file *tfile,
615 struct ttm_object_file *tfile,
626 struct ttm_object_file *tfile);
628 struct ttm_object_file *tfile,
634 extern int vmw_user_dmabuf_reference(struct ttm_object_file *tfile,
646 extern int vmw_user_dmabuf_lookup(struct ttm_object_file *tfile,
654 struct ttm_object_file *tfile,
906 struct ttm_object_file *tfile,
1000 struct ttm_object_file *tfile,
1044 struct ttm_object_file *tfile,
H A Dvmwgfx_shader.c714 struct ttm_object_file *tfile = vmw_fpriv(file_priv)->tfile; vmw_shader_destroy_ioctl() local
716 return ttm_ref_object_base_unref(tfile, arg->handle, vmw_shader_destroy_ioctl()
727 struct ttm_object_file *tfile, vmw_user_shader_alloc()
762 ushader->base.tfile = NULL; vmw_user_shader_alloc()
776 ret = ttm_base_object_init(tfile, &ushader->base, false, vmw_user_shader_alloc()
851 struct ttm_object_file *tfile = vmw_fpriv(file_priv)->tfile; vmw_shader_define() local
857 ret = vmw_user_dmabuf_lookup(tfile, buffer_handle, vmw_shader_define()
892 num_output_sig, tfile, shader_handle); vmw_shader_define()
960 * @tfile: Pointer to a struct ttm_object_file that the guest-backed shader is
720 vmw_user_shader_alloc(struct vmw_private *dev_priv, struct vmw_dma_buffer *buffer, size_t shader_size, size_t offset, SVGA3dShaderType shader_type, uint8_t num_input_sig, uint8_t num_output_sig, struct ttm_object_file *tfile, u32 *handle) vmw_user_shader_alloc() argument
H A Dvmwgfx_context.c734 struct ttm_object_file *tfile = vmw_fpriv(file_priv)->tfile; vmw_context_destroy_ioctl() local
736 return ttm_ref_object_base_unref(tfile, arg->cid, TTM_REF_USAGE); vmw_context_destroy_ioctl()
747 struct ttm_object_file *tfile = vmw_fpriv(file_priv)->tfile; vmw_context_define() local
788 ctx->base.tfile = NULL; vmw_context_define()
799 ret = ttm_base_object_init(tfile, &ctx->base, false, VMW_RES_CONTEXT, vmw_context_define()
H A Dvmwgfx_ioctl.c250 struct ttm_object_file *tfile = vmw_fpriv(file_priv)->tfile; vmw_present_ioctl() local
303 ret = vmw_user_resource_lookup_handle(dev_priv, tfile, arg->sid, vmw_present_ioctl()
H A Dvmwgfx_overlay.c464 struct ttm_object_file *tfile = vmw_fpriv(file_priv)->tfile; vmw_overlay_ioctl() local
476 ret = vmw_user_stream_lookup(dev_priv, tfile, &arg->stream_id, &res); vmw_overlay_ioctl()
487 ret = vmw_user_dmabuf_lookup(tfile, arg->handle, &buf, NULL); vmw_overlay_ioctl()
H A Dvmwgfx_drv.c1000 ttm_object_file_release(&vmw_fp->tfile); vmw_postclose()
1015 vmw_fp->tfile = ttm_object_file_init(dev_priv->tdev, 10); vmw_driver_open()
1016 if (unlikely(vmw_fp->tfile == NULL)) vmw_driver_open()
1201 ret = ttm_vt_lock(&active->lock, false, vmw_fp->tfile); vmw_master_set()
1236 ret = ttm_vt_lock(&vmaster->lock, false, vmw_fp->tfile); vmw_master_drop()
H A Dvmwgfx_buffer.c774 struct ttm_object_file *tfile = vmw_verify_access() local
775 vmw_fpriv((struct drm_file *)filp->private_data)->tfile; vmw_verify_access()
777 return vmw_user_dmabuf_verify_access(bo, tfile); vmw_verify_access()
H A Dvmwgfx_kms.c170 struct ttm_object_file *tfile = vmw_fpriv(file_priv)->tfile; vmw_du_crtc_cursor_set2() local
172 ret = vmw_user_lookup_handle(dev_priv, tfile, vmw_du_crtc_cursor_set2()
265 struct ttm_object_file *tfile, vmw_kms_cursor_snoop()
978 struct ttm_object_file *tfile = vmw_fpriv(file_priv)->tfile; vmw_kms_fb_create() local
1015 user_obj = ttm_base_object_lookup(tfile, mode_cmd.handle); vmw_kms_fb_create()
1026 ret = vmw_user_lookup_handle(dev_priv, tfile, vmw_kms_fb_create()
264 vmw_kms_cursor_snoop(struct vmw_surface *srf, struct ttm_object_file *tfile, struct ttm_buffer_object *bo, SVGA3dCmdHeader *header) vmw_kms_cursor_snoop() argument
H A Dvmwgfx_execbuf.c728 sw_context->fp->tfile, vmw_cmd_res_check()
1239 ret = vmw_user_dmabuf_lookup(sw_context->fp->tfile, handle, &vmw_bo, vmw_translate_mob_ptr()
1300 ret = vmw_user_dmabuf_lookup(sw_context->fp->tfile, handle, &vmw_bo, vmw_translate_guest_ptr()
1714 vmw_kms_cursor_snoop(srf, sw_context->fp->tfile, &vmw_bo->base, vmw_cmd_dma()
3725 ttm_ref_object_base_unref(vmw_fp->tfile, vmw_execbuf_copy_fence_user()
3872 ret = vmw_user_resource_lookup_handle(dev_priv, sw_context->fp->tfile, vmw_execbuf_tie_context()
/linux-4.4.14/include/drm/ttm/
H A Dttm_object.h100 * @tfile: Pointer to ttm_object_file of the creator.
130 struct ttm_object_file *tfile; member in struct:ttm_base_object
164 * @tfile: Pointer to a struct ttm_object_file.
167 * (different @tfile pointers.)
175 extern int ttm_base_object_init(struct ttm_object_file *tfile,
189 * @tfile: Pointer to a struct ttm_object_file.
196 *tfile, uint32_t key);
205 * This function should only be used when the struct tfile associated with the
226 * @tfile: A struct ttm_object_file representing the application owning the
237 * file corresponding to @tfile is closed, all its reference objects are
244 extern int ttm_ref_object_add(struct ttm_object_file *tfile,
248 extern bool ttm_ref_object_exists(struct ttm_object_file *tfile,
262 extern int ttm_ref_object_base_unref(struct ttm_object_file *tfile,
287 * ensure that there are no concurrent users of tfile.
324 extern int ttm_prime_object_init(struct ttm_object_file *tfile,
342 extern int ttm_prime_fd_to_handle(struct ttm_object_file *tfile,
344 extern int ttm_prime_handle_to_fd(struct ttm_object_file *tfile,
H A Dttm_lock.h180 * @tfile: Pointer to a struct ttm_object_file to register the lock with.
188 struct ttm_object_file *tfile);
/linux-4.4.14/drivers/remoteproc/
H A Dremoteproc_debugfs.c193 void rproc_remove_trace_file(struct dentry *tfile) rproc_remove_trace_file() argument
195 debugfs_remove(tfile); rproc_remove_trace_file()
201 struct dentry *tfile; rproc_create_trace_file() local
203 tfile = debugfs_create_file(name, 0400, rproc->dbg_dir, rproc_create_trace_file()
205 if (!tfile) { rproc_create_trace_file()
210 return tfile; rproc_create_trace_file()
H A Dremoteproc_internal.h57 void rproc_remove_trace_file(struct dentry *tfile);
/linux-4.4.14/fs/
H A Deventpoll.c851 * During ep_insert() we already hold the ep->mtx for the tfile. ep_eventpoll_poll()
1265 struct file *tfile, int fd, int full_check) ep_insert()
1284 ep_set_ffd(&epi->ffd, tfile, fd); ep_insert()
1319 spin_lock(&tfile->f_lock); ep_insert()
1320 list_add_tail_rcu(&epi->fllink, &tfile->f_ep_links); ep_insert()
1321 spin_unlock(&tfile->f_lock); ep_insert()
1360 spin_lock(&tfile->f_lock); ep_insert()
1362 spin_unlock(&tfile->f_lock); ep_insert()
1264 ep_insert(struct eventpoll *ep, struct epoll_event *event, struct file *tfile, int fd, int full_check) ep_insert() argument

Completed in 560 milliseconds