Lines Matching refs: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)
595 * @attach: attachment to be detached
602 struct dma_buf_attachment *attach)
612 * @attach: attachment whose scatterlist is to be returned
622 struct sg_table *drm_gem_map_dma_buf(struct dma_buf_attachment *attach,
625 struct drm_gem_object *obj = attach->dmabuf->priv;
639 ret = dma_map_sgtable(attach->dev, sgt, dir,
653 * @attach: attachment to unmap buffer from
659 void drm_gem_unmap_dma_buf(struct dma_buf_attachment *attach,
666 dma_unmap_sgtable(attach->dev, sgt, dir, DMA_ATTR_SKIP_CPU_SYNC);
785 .attach = drm_gem_map_attach,
895 * @attach_dev: struct device to dma_buf attach
909 struct dma_buf_attachment *attach;
929 attach = dma_buf_attach(dma_buf, attach_dev);
930 if (IS_ERR(attach))
931 return ERR_CAST(attach);
935 sgt = dma_buf_map_attachment_unlocked(attach, DMA_BIDIRECTIONAL);
941 obj = dev->driver->gem_prime_import_sg_table(dev, attach, sgt);
947 obj->import_attach = attach;
953 dma_buf_unmap_attachment_unlocked(attach, sgt, DMA_BIDIRECTIONAL);
955 dma_buf_detach(dma_buf, attach);
1046 struct dma_buf_attachment *attach;
1049 attach = obj->import_attach;
1051 dma_buf_unmap_attachment_unlocked(attach, sg, DMA_BIDIRECTIONAL);
1052 dma_buf = attach->dmabuf;
1053 dma_buf_detach(attach->dmabuf, attach);