Lines Matching full:attach

566  * Optional pinning of buffers is handled at dma-buf attach and detach time in
594 * drm_gem_map_attach - dma_buf attach implementation for GEM
595 * @dma_buf: buffer to attach device to
596 * @attach: buffer attachment data
599 * used as the &dma_buf_ops.attach callback. Must be used together with
605 struct dma_buf_attachment *attach) in drm_gem_map_attach() argument
624 * @attach: attachment to be detached
631 struct dma_buf_attachment *attach) in drm_gem_map_detach() argument
641 * @attach: attachment whose scatterlist is to be returned
651 struct sg_table *drm_gem_map_dma_buf(struct dma_buf_attachment *attach, in drm_gem_map_dma_buf() argument
654 struct drm_gem_object *obj = attach->dmabuf->priv; in drm_gem_map_dma_buf()
668 ret = dma_map_sgtable(attach->dev, sgt, dir, in drm_gem_map_dma_buf()
682 * @attach: attachment to unmap buffer from
688 void drm_gem_unmap_dma_buf(struct dma_buf_attachment *attach, in drm_gem_unmap_dma_buf() argument
695 dma_unmap_sgtable(attach->dev, sgt, dir, DMA_ATTR_SKIP_CPU_SYNC); in drm_gem_unmap_dma_buf()
814 .attach = drm_gem_map_attach,
924 * @attach_dev: struct device to dma_buf attach
938 struct dma_buf_attachment *attach; in drm_gem_prime_import_dev() local
958 attach = dma_buf_attach(dma_buf, attach_dev); in drm_gem_prime_import_dev()
959 if (IS_ERR(attach)) in drm_gem_prime_import_dev()
960 return ERR_CAST(attach); in drm_gem_prime_import_dev()
964 sgt = dma_buf_map_attachment_unlocked(attach, DMA_BIDIRECTIONAL); in drm_gem_prime_import_dev()
970 obj = dev->driver->gem_prime_import_sg_table(dev, attach, sgt); in drm_gem_prime_import_dev()
976 obj->import_attach = attach; in drm_gem_prime_import_dev()
982 dma_buf_unmap_attachment_unlocked(attach, sgt, DMA_BIDIRECTIONAL); in drm_gem_prime_import_dev()
984 dma_buf_detach(dma_buf, attach); in drm_gem_prime_import_dev()
1075 struct dma_buf_attachment *attach; in drm_prime_gem_destroy() local
1078 attach = obj->import_attach; in drm_prime_gem_destroy()
1080 dma_buf_unmap_attachment_unlocked(attach, sg, DMA_BIDIRECTIONAL); in drm_prime_gem_destroy()
1081 dma_buf = attach->dmabuf; in drm_prime_gem_destroy()
1082 dma_buf_detach(attach->dmabuf, attach); in drm_prime_gem_destroy()