Lines Matching full:attach

542  * Optional pinning of buffers is handled at dma-buf attach and detach time in
570 * drm_gem_map_attach - dma_buf attach implementation for GEM
571 * @dma_buf: buffer to attach device to
572 * @attach: buffer attachment data
575 * used as the &dma_buf_ops.attach callback. Must be used together with
581 struct dma_buf_attachment *attach) in drm_gem_map_attach() argument
600 * @attach: attachment to be detached
607 struct dma_buf_attachment *attach) in drm_gem_map_detach() argument
617 * @attach: attachment whose scatterlist is to be returned
627 struct sg_table *drm_gem_map_dma_buf(struct dma_buf_attachment *attach, in drm_gem_map_dma_buf() argument
630 struct drm_gem_object *obj = attach->dmabuf->priv; in drm_gem_map_dma_buf()
644 ret = dma_map_sgtable(attach->dev, sgt, dir, in drm_gem_map_dma_buf()
658 * @attach: attachment to unmap buffer from
664 void drm_gem_unmap_dma_buf(struct dma_buf_attachment *attach, in drm_gem_unmap_dma_buf() argument
671 dma_unmap_sgtable(attach->dev, sgt, dir, DMA_ATTR_SKIP_CPU_SYNC); in drm_gem_unmap_dma_buf()
790 .attach = drm_gem_map_attach,
900 * @attach_dev: struct device to dma_buf attach
914 struct dma_buf_attachment *attach; in drm_gem_prime_import_dev() local
934 attach = dma_buf_attach(dma_buf, attach_dev); in drm_gem_prime_import_dev()
935 if (IS_ERR(attach)) in drm_gem_prime_import_dev()
936 return ERR_CAST(attach); in drm_gem_prime_import_dev()
940 sgt = dma_buf_map_attachment_unlocked(attach, DMA_BIDIRECTIONAL); in drm_gem_prime_import_dev()
946 obj = dev->driver->gem_prime_import_sg_table(dev, attach, sgt); in drm_gem_prime_import_dev()
952 obj->import_attach = attach; in drm_gem_prime_import_dev()
958 dma_buf_unmap_attachment_unlocked(attach, sgt, DMA_BIDIRECTIONAL); in drm_gem_prime_import_dev()
960 dma_buf_detach(dma_buf, attach); in drm_gem_prime_import_dev()
1051 struct dma_buf_attachment *attach; in drm_prime_gem_destroy() local
1054 attach = obj->import_attach; in drm_prime_gem_destroy()
1056 dma_buf_unmap_attachment_unlocked(attach, sg, DMA_BIDIRECTIONAL); in drm_prime_gem_destroy()
1057 dma_buf = attach->dmabuf; in drm_prime_gem_destroy()
1058 dma_buf_detach(attach->dmabuf, attach); in drm_prime_gem_destroy()