Lines Matching refs:vmw_be
588 struct vmw_ttm_tt *vmw_be = in vmw_ttm_bind() local
592 ret = vmw_ttm_map_dma(vmw_be); in vmw_ttm_bind()
596 vmw_be->gmr_id = bo_mem->start; in vmw_ttm_bind()
597 vmw_be->mem_type = bo_mem->mem_type; in vmw_ttm_bind()
601 return vmw_gmr_bind(vmw_be->dev_priv, &vmw_be->vsgt, in vmw_ttm_bind()
602 ttm->num_pages, vmw_be->gmr_id); in vmw_ttm_bind()
604 if (unlikely(vmw_be->mob == NULL)) { in vmw_ttm_bind()
605 vmw_be->mob = in vmw_ttm_bind()
607 if (unlikely(vmw_be->mob == NULL)) in vmw_ttm_bind()
611 return vmw_mob_bind(vmw_be->dev_priv, vmw_be->mob, in vmw_ttm_bind()
612 &vmw_be->vsgt, ttm->num_pages, in vmw_ttm_bind()
613 vmw_be->gmr_id); in vmw_ttm_bind()
622 struct vmw_ttm_tt *vmw_be = in vmw_ttm_unbind() local
625 switch (vmw_be->mem_type) { in vmw_ttm_unbind()
627 vmw_gmr_unbind(vmw_be->dev_priv, vmw_be->gmr_id); in vmw_ttm_unbind()
630 vmw_mob_unbind(vmw_be->dev_priv, vmw_be->mob); in vmw_ttm_unbind()
636 if (vmw_be->dev_priv->map_mode == vmw_dma_map_bind) in vmw_ttm_unbind()
637 vmw_ttm_unmap_dma(vmw_be); in vmw_ttm_unbind()
645 struct vmw_ttm_tt *vmw_be = in vmw_ttm_destroy() local
648 vmw_ttm_unmap_dma(vmw_be); in vmw_ttm_destroy()
649 if (vmw_be->dev_priv->map_mode == vmw_dma_alloc_coherent) in vmw_ttm_destroy()
650 ttm_dma_tt_fini(&vmw_be->dma_ttm); in vmw_ttm_destroy()
654 if (vmw_be->mob) in vmw_ttm_destroy()
655 vmw_mob_destroy(vmw_be->mob); in vmw_ttm_destroy()
657 kfree(vmw_be); in vmw_ttm_destroy()
722 struct vmw_ttm_tt *vmw_be; in vmw_ttm_tt_create() local
725 vmw_be = kzalloc(sizeof(*vmw_be), GFP_KERNEL); in vmw_ttm_tt_create()
726 if (!vmw_be) in vmw_ttm_tt_create()
729 vmw_be->dma_ttm.ttm.func = &vmw_ttm_func; in vmw_ttm_tt_create()
730 vmw_be->dev_priv = container_of(bo->bdev, struct vmw_private, bdev); in vmw_ttm_tt_create()
731 vmw_be->mob = NULL; in vmw_ttm_tt_create()
733 if (vmw_be->dev_priv->map_mode == vmw_dma_alloc_coherent) in vmw_ttm_tt_create()
734 ret = ttm_dma_tt_init(&vmw_be->dma_ttm, bo, page_flags); in vmw_ttm_tt_create()
736 ret = ttm_tt_init(&vmw_be->dma_ttm.ttm, bo, page_flags); in vmw_ttm_tt_create()
740 return &vmw_be->dma_ttm.ttm; in vmw_ttm_tt_create()
742 kfree(vmw_be); in vmw_ttm_tt_create()