• Home
  • Raw
  • Download

Lines Matching refs:vma

42 void msm_gem_vma_purge(struct msm_gem_vma *vma)  in msm_gem_vma_purge()  argument
44 struct msm_gem_address_space *aspace = vma->aspace; in msm_gem_vma_purge()
45 unsigned size = vma->node.size; in msm_gem_vma_purge()
48 if (!vma->mapped) in msm_gem_vma_purge()
51 aspace->mmu->funcs->unmap(aspace->mmu, vma->iova, size); in msm_gem_vma_purge()
53 vma->mapped = false; in msm_gem_vma_purge()
58 msm_gem_vma_map(struct msm_gem_vma *vma, int prot, in msm_gem_vma_map() argument
61 struct msm_gem_address_space *aspace = vma->aspace; in msm_gem_vma_map()
64 if (GEM_WARN_ON(!vma->iova)) in msm_gem_vma_map()
67 if (vma->mapped) in msm_gem_vma_map()
70 vma->mapped = true; in msm_gem_vma_map()
84 ret = aspace->mmu->funcs->map(aspace->mmu, vma->iova, sgt, size, prot); in msm_gem_vma_map()
87 vma->mapped = false; in msm_gem_vma_map()
94 void msm_gem_vma_close(struct msm_gem_vma *vma) in msm_gem_vma_close() argument
96 struct msm_gem_address_space *aspace = vma->aspace; in msm_gem_vma_close()
98 GEM_WARN_ON(vma->mapped); in msm_gem_vma_close()
101 if (vma->iova) in msm_gem_vma_close()
102 drm_mm_remove_node(&vma->node); in msm_gem_vma_close()
105 vma->iova = 0; in msm_gem_vma_close()
112 struct msm_gem_vma *vma; in msm_gem_vma_new() local
114 vma = kzalloc(sizeof(*vma), GFP_KERNEL); in msm_gem_vma_new()
115 if (!vma) in msm_gem_vma_new()
118 vma->aspace = aspace; in msm_gem_vma_new()
120 return vma; in msm_gem_vma_new()
124 int msm_gem_vma_init(struct msm_gem_vma *vma, int size, in msm_gem_vma_init() argument
127 struct msm_gem_address_space *aspace = vma->aspace; in msm_gem_vma_init()
133 if (GEM_WARN_ON(vma->iova)) in msm_gem_vma_init()
137 ret = drm_mm_insert_node_in_range(&aspace->mm, &vma->node, in msm_gem_vma_init()
145 vma->iova = vma->node.start; in msm_gem_vma_init()
146 vma->mapped = false; in msm_gem_vma_init()