Lines Matching full:attach
19 struct dma_buf_attachment *attach; member
35 dma_buf_unmap_attachment(cache->attach, in dma_buf_cache_destructor()
39 dma_buf_detach(dmabuf, cache->attach); in dma_buf_cache_destructor()
51 dma_buf_cache_get_cache(struct dma_buf_attachment *attach) in dma_buf_cache_get_cache() argument
55 struct dma_buf *dmabuf = attach->dmabuf; in dma_buf_cache_get_cache()
63 if (cache->attach == attach) in dma_buf_cache_get_cache()
71 struct dma_buf_attachment *attach) in dma_buf_cache_detach() argument
77 cache = dma_buf_cache_get_cache(attach); in dma_buf_cache_detach()
79 dma_buf_detach(dmabuf, attach); in dma_buf_cache_detach()
88 struct dma_buf_attachment *attach; in dma_buf_cache_attach() local
97 attach = ERR_PTR(-ENOMEM); in dma_buf_cache_attach()
105 attach = dma_buf_attach(dmabuf, dev); in dma_buf_cache_attach()
112 if (cache->attach->dev == dev) { in dma_buf_cache_attach()
114 attach = cache->attach; in dma_buf_cache_attach()
121 attach = ERR_PTR(-ENOMEM); in dma_buf_cache_attach()
125 attach = dma_buf_attach(dmabuf, dev); in dma_buf_cache_attach()
126 if (IS_ERR_OR_NULL(attach)) in dma_buf_cache_attach()
129 cache->attach = attach; in dma_buf_cache_attach()
134 return attach; in dma_buf_cache_attach()
143 return attach; in dma_buf_cache_attach()
147 void dma_buf_cache_unmap_attachment(struct dma_buf_attachment *attach, in dma_buf_cache_unmap_attachment() argument
151 struct dma_buf *dmabuf = attach->dmabuf; in dma_buf_cache_unmap_attachment()
156 cache = dma_buf_cache_get_cache(attach); in dma_buf_cache_unmap_attachment()
158 dma_buf_unmap_attachment(attach, sg_table, direction); in dma_buf_cache_unmap_attachment()
164 struct sg_table *dma_buf_cache_map_attachment(struct dma_buf_attachment *attach, in dma_buf_cache_map_attachment() argument
167 struct dma_buf *dmabuf = attach->dmabuf; in dma_buf_cache_map_attachment()
173 cache = dma_buf_cache_get_cache(attach); in dma_buf_cache_map_attachment()
175 sg_table = dma_buf_map_attachment(attach, direction); in dma_buf_cache_map_attachment()
185 dma_buf_unmap_attachment(attach, cache->sg_table, in dma_buf_cache_map_attachment()
190 sg_table = dma_buf_map_attachment(attach, direction); in dma_buf_cache_map_attachment()