Lines Matching refs:attach

543  * 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)
592 * @attach: attachment to be detached
599 struct dma_buf_attachment *attach)
609 * @attach: attachment whose scatterlist is to be returned
619 struct sg_table *drm_gem_map_dma_buf(struct dma_buf_attachment *attach,
622 struct drm_gem_object *obj = attach->dmabuf->priv;
634 ret = dma_map_sgtable(attach->dev, sgt, dir,
648 * @attach: attachment to unmap buffer from
654 void drm_gem_unmap_dma_buf(struct dma_buf_attachment *attach,
661 dma_unmap_sgtable(attach->dev, sgt, dir, DMA_ATTR_SKIP_CPU_SYNC);
789 .attach = drm_gem_map_attach,
900 * @attach_dev: struct device to dma_buf attach
914 struct dma_buf_attachment *attach;
934 attach = dma_buf_attach(dma_buf, attach_dev);
935 if (IS_ERR(attach))
936 return ERR_CAST(attach);
940 sgt = dma_buf_map_attachment(attach, DMA_BIDIRECTIONAL);
946 obj = dev->driver->gem_prime_import_sg_table(dev, attach, sgt);
952 obj->import_attach = attach;
958 dma_buf_unmap_attachment(attach, sgt, DMA_BIDIRECTIONAL);
960 dma_buf_detach(dma_buf, attach);
1037 struct dma_buf_attachment *attach;
1040 attach = obj->import_attach;
1042 dma_buf_unmap_attachment(attach, sg, DMA_BIDIRECTIONAL);
1043 dma_buf = attach->dmabuf;
1044 dma_buf_detach(attach->dmabuf, attach);