Lines Matching defs:attach
560 * Optional pinning of buffers is handled at dma-buf attach and detach time in
588 * drm_gem_map_attach - dma_buf attach implementation for GEM
589 * @dma_buf: buffer to attach device to
590 * @attach: buffer attachment data
593 * used as the &dma_buf_ops.attach callback. Must be used together with
599 struct dma_buf_attachment *attach)
618 * @attach: attachment to be detached
625 struct dma_buf_attachment *attach)
635 * @attach: attachment whose scatterlist is to be returned
645 struct sg_table *drm_gem_map_dma_buf(struct dma_buf_attachment *attach,
648 struct drm_gem_object *obj = attach->dmabuf->priv;
662 ret = dma_map_sgtable(attach->dev, sgt, dir,
676 * @attach: attachment to unmap buffer from
682 void drm_gem_unmap_dma_buf(struct dma_buf_attachment *attach,
689 dma_unmap_sgtable(attach->dev, sgt, dir, DMA_ATTR_SKIP_CPU_SYNC);
808 .attach = drm_gem_map_attach,
918 * @attach_dev: struct device to dma_buf attach
932 struct dma_buf_attachment *attach;
952 attach = dma_buf_attach(dma_buf, attach_dev);
953 if (IS_ERR(attach))
954 return ERR_CAST(attach);
958 sgt = dma_buf_map_attachment_unlocked(attach, DMA_BIDIRECTIONAL);
964 obj = dev->driver->gem_prime_import_sg_table(dev, attach, sgt);
970 obj->import_attach = attach;
976 dma_buf_unmap_attachment_unlocked(attach, sgt, DMA_BIDIRECTIONAL);
978 dma_buf_detach(dma_buf, attach);
1069 struct dma_buf_attachment *attach;
1072 attach = obj->import_attach;
1074 dma_buf_unmap_attachment_unlocked(attach, sg, DMA_BIDIRECTIONAL);
1075 dma_buf = attach->dmabuf;
1076 dma_buf_detach(attach->dmabuf, attach);