Lines Matching refs:dma_buf

95 	void (*dmabuf_release)(struct dma_buf *dma_buf);
130 static void ttm_prime_dmabuf_release(struct dma_buf *dma_buf);
516 tdev->dma_buf_size = ttm_round_pot(sizeof(struct dma_buf)) + in ttm_object_device_init()
553 static bool __must_check get_dma_buf_unless_doomed(struct dma_buf *dmabuf) in get_dma_buf_unless_doomed()
575 BUG_ON(prime->dma_buf != NULL); in ttm_prime_refcount_release()
591 static void ttm_prime_dmabuf_release(struct dma_buf *dma_buf) in ttm_prime_dmabuf_release() argument
594 (struct ttm_prime_object *) dma_buf->priv; in ttm_prime_dmabuf_release()
599 tdev->dmabuf_release(dma_buf); in ttm_prime_dmabuf_release()
601 if (prime->dma_buf == dma_buf) in ttm_prime_dmabuf_release()
602 prime->dma_buf = NULL; in ttm_prime_dmabuf_release()
623 struct dma_buf *dma_buf; in ttm_prime_fd_to_handle() local
628 dma_buf = dma_buf_get(fd); in ttm_prime_fd_to_handle()
629 if (IS_ERR(dma_buf)) in ttm_prime_fd_to_handle()
630 return PTR_ERR(dma_buf); in ttm_prime_fd_to_handle()
632 if (dma_buf->ops != &tdev->ops) in ttm_prime_fd_to_handle()
635 prime = (struct ttm_prime_object *) dma_buf->priv; in ttm_prime_fd_to_handle()
640 dma_buf_put(dma_buf); in ttm_prime_fd_to_handle()
661 struct dma_buf *dma_buf; in ttm_prime_handle_to_fd() local
684 dma_buf = prime->dma_buf; in ttm_prime_handle_to_fd()
685 if (!dma_buf || !get_dma_buf_unless_doomed(dma_buf)) { in ttm_prime_handle_to_fd()
703 dma_buf = dma_buf_export(&exp_info); in ttm_prime_handle_to_fd()
704 if (IS_ERR(dma_buf)) { in ttm_prime_handle_to_fd()
705 ret = PTR_ERR(dma_buf); in ttm_prime_handle_to_fd()
716 prime->dma_buf = dma_buf; in ttm_prime_handle_to_fd()
720 ret = dma_buf_fd(dma_buf, flags); in ttm_prime_handle_to_fd()
725 dma_buf_put(dma_buf); in ttm_prime_handle_to_fd()
758 prime->dma_buf = NULL; in ttm_prime_object_init()