Home | History | Annotate | Download | only in vmwgfx

Lines Matching defs:prime

33  * While no substantial code is shared, the prime code is inspired by
607 * ttm_prime_refcount_release - refcount release method for a prime object.
612 prime object.
619 struct ttm_prime_object *prime;
622 prime = container_of(base, struct ttm_prime_object, base);
623 BUG_ON(prime->dma_buf != NULL);
624 mutex_destroy(&prime->mutex);
625 if (prime->refcount_release)
626 prime->refcount_release(&base);
641 struct ttm_prime_object *prime =
643 struct ttm_base_object *base = &prime->base;
648 mutex_lock(&prime->mutex);
649 if (prime->dma_buf == dma_buf)
650 prime->dma_buf = NULL;
651 mutex_unlock(&prime->mutex);
657 * ttm_prime_fd_to_handle - Get a base object handle from a prime fd
660 * @fd: The prime / dmabuf fd.
672 struct ttm_prime_object *prime;
683 prime = (struct ttm_prime_object *) dma_buf->priv;
684 base = &prime->base;
694 * ttm_prime_handle_to_fd - Return a dma_buf fd from a ttm prime object
709 struct ttm_prime_object *prime;
719 prime = container_of(base, struct ttm_prime_object, base);
725 ret = mutex_lock_interruptible(&prime->mutex);
731 dma_buf = prime->dma_buf;
739 exp_info.size = prime->size;
741 exp_info.priv = prime;
749 mutex_unlock(&prime->mutex);
758 mutex_unlock(&prime->mutex);
766 prime->dma_buf = dma_buf;
768 mutex_unlock(&prime->mutex);
788 * @prime: The object to be initialized.
798 struct ttm_prime_object *prime, bool shareable,
804 mutex_init(&prime->mutex);
805 prime->size = PAGE_ALIGN(size);
806 prime->real_type = type;
807 prime->dma_buf = NULL;
808 prime->refcount_release = refcount_release;
809 return ttm_base_object_init(tfile, &prime->base, shareable,