/kernel/linux/linux-5.10/drivers/dma-buf/ |
H A D | dma-buf.c | 688 * calls attach() of dma_buf_ops to allow device-specific attach functionality 689 * @dmabuf: [in] buffer to attach device to. 711 struct dma_buf_attachment *attach; in dma_buf_dynamic_attach() local 720 attach = kzalloc(sizeof(*attach), GFP_KERNEL); in dma_buf_dynamic_attach() 721 if (!attach) in dma_buf_dynamic_attach() 724 attach->dev = dev; in dma_buf_dynamic_attach() 725 attach->dmabuf = dmabuf; in dma_buf_dynamic_attach() 727 attach in dma_buf_dynamic_attach() 810 dma_buf_detach(struct dma_buf *dmabuf, struct dma_buf_attachment *attach) dma_buf_detach() argument 845 dma_buf_pin(struct dma_buf_attachment *attach) dma_buf_pin() argument 864 dma_buf_unpin(struct dma_buf_attachment *attach) dma_buf_unpin() argument 890 dma_buf_map_attachment(struct dma_buf_attachment *attach, enum dma_data_direction direction) dma_buf_map_attachment() argument 952 dma_buf_unmap_attachment(struct dma_buf_attachment *attach, struct sg_table *sg_table, enum dma_data_direction direction) dma_buf_unmap_attachment() argument 988 struct dma_buf_attachment *attach; dma_buf_move_notify() local [all...] |
/kernel/linux/linux-6.6/drivers/dma-buf/ |
H A D | dma-buf.c | 778 static struct sg_table * __map_dma_buf(struct dma_buf_attachment *attach, in __map_dma_buf() argument 784 sg_table = attach->dmabuf->ops->map_dma_buf(attach, direction); in __map_dma_buf() 788 if (!dma_buf_attachment_is_dynamic(attach)) { in __map_dma_buf() 789 ret = dma_resv_wait_timeout(attach->dmabuf->resv, in __map_dma_buf() 793 attach->dmabuf->ops->unmap_dma_buf(attach, sg_table, in __map_dma_buf() 844 * - &dma_buf_ops.attach() 869 * @dmabuf: [in] buffer to attach device to. 877 * Optionally this calls &dma_buf_ops.attach t 894 struct dma_buf_attachment *attach; dma_buf_dynamic_attach() local 983 __unmap_dma_buf(struct dma_buf_attachment *attach, struct sg_table *sg_table, enum dma_data_direction direction) __unmap_dma_buf() argument 1002 dma_buf_detach(struct dma_buf *dmabuf, struct dma_buf_attachment *attach) dma_buf_detach() argument 1041 dma_buf_pin(struct dma_buf_attachment *attach) dma_buf_pin() argument 1065 dma_buf_unpin(struct dma_buf_attachment *attach) dma_buf_unpin() argument 1099 dma_buf_map_attachment(struct dma_buf_attachment *attach, enum dma_data_direction direction) dma_buf_map_attachment() argument 1176 dma_buf_map_attachment_unlocked(struct dma_buf_attachment *attach, enum dma_data_direction direction) dma_buf_map_attachment_unlocked() argument 1204 dma_buf_unmap_attachment(struct dma_buf_attachment *attach, struct sg_table *sg_table, enum dma_data_direction direction) dma_buf_unmap_attachment() argument 1236 dma_buf_unmap_attachment_unlocked(struct dma_buf_attachment *attach, struct sg_table *sg_table, enum dma_data_direction direction) dma_buf_unmap_attachment_unlocked() argument 1261 struct dma_buf_attachment *attach; dma_buf_move_notify() local [all...] |
/kernel/linux/linux-6.6/drivers/gpu/drm/amd/amdgpu/ |
H A D | amdgpu_dma_buf.c | 47 * amdgpu_dma_buf_attach - &dma_buf_ops.attach implementation 49 * @dmabuf: DMA-buf where we attach to 50 * @attach: attachment to add 55 struct dma_buf_attachment *attach) in amdgpu_dma_buf_attach() 62 if (pci_p2pdma_distance(adev->pdev, attach->dev, false) < 0) in amdgpu_dma_buf_attach() 63 attach->peer2peer = false; in amdgpu_dma_buf_attach() 80 * @attach: the attachment to remove 85 struct dma_buf_attachment *attach) in amdgpu_dma_buf_detach() 98 * @attach: attachment to pin down 102 static int amdgpu_dma_buf_pin(struct dma_buf_attachment *attach) in amdgpu_dma_buf_pin() argument 54 amdgpu_dma_buf_attach(struct dma_buf *dmabuf, struct dma_buf_attachment *attach) amdgpu_dma_buf_attach() argument 84 amdgpu_dma_buf_detach(struct dma_buf *dmabuf, struct dma_buf_attachment *attach) amdgpu_dma_buf_detach() argument 118 amdgpu_dma_buf_unpin(struct dma_buf_attachment *attach) amdgpu_dma_buf_unpin() argument 139 amdgpu_dma_buf_map(struct dma_buf_attachment *attach, enum dma_data_direction dir) amdgpu_dma_buf_map() argument 210 amdgpu_dma_buf_unmap(struct dma_buf_attachment *attach, struct sg_table *sgt, enum dma_data_direction dir) amdgpu_dma_buf_unmap() argument 364 amdgpu_dma_buf_move_notify(struct dma_buf_attachment *attach) amdgpu_dma_buf_move_notify() argument 439 struct dma_buf_attachment *attach; amdgpu_gem_prime_import() local [all...] |
/kernel/linux/linux-6.6/drivers/infiniband/core/ |
H A D | umem_dmabuf.c | 24 dma_resv_assert_held(umem_dmabuf->attach->dmabuf->resv); in ib_umem_dmabuf_map_pages() 29 sgt = dma_buf_map_attachment(umem_dmabuf->attach, in ib_umem_dmabuf_map_pages() 72 ret = dma_resv_wait_timeout(umem_dmabuf->attach->dmabuf->resv, in ib_umem_dmabuf_map_pages() 85 dma_resv_assert_held(umem_dmabuf->attach->dmabuf->resv); in ib_umem_dmabuf_unmap_pages() 106 dma_buf_unmap_attachment(umem_dmabuf->attach, umem_dmabuf->sgt, in ib_umem_dmabuf_unmap_pages() 153 umem_dmabuf->attach = dma_buf_dynamic_attach( in ib_umem_dmabuf_get() 158 if (IS_ERR(umem_dmabuf->attach)) { in ib_umem_dmabuf_get() 159 ret = ERR_CAST(umem_dmabuf->attach); in ib_umem_dmabuf_get() 174 ib_umem_dmabuf_unsupported_move_notify(struct dma_buf_attachment *attach) in ib_umem_dmabuf_unsupported_move_notify() argument 176 struct ib_umem_dmabuf *umem_dmabuf = attach in ib_umem_dmabuf_unsupported_move_notify() [all...] |
/kernel/linux/linux-5.10/drivers/gpu/drm/amd/amdgpu/ |
H A D | amdgpu_dma_buf.c | 169 * amdgpu_dma_buf_attach - &dma_buf_ops.attach implementation 171 * @dmabuf: DMA-buf where we attach to 172 * @attach: attachment to add 177 struct dma_buf_attachment *attach) in amdgpu_dma_buf_attach() 184 if (pci_p2pdma_distance_many(adev->pdev, &attach->dev, 1, true) < 0) in amdgpu_dma_buf_attach() 185 attach->peer2peer = false; in amdgpu_dma_buf_attach() 187 if (attach->dev->driver == adev->dev->driver) in amdgpu_dma_buf_attach() 215 * @attach: the attachment to remove 220 struct dma_buf_attachment *attach) in amdgpu_dma_buf_detach() 226 if (attach in amdgpu_dma_buf_detach() 176 amdgpu_dma_buf_attach(struct dma_buf *dmabuf, struct dma_buf_attachment *attach) amdgpu_dma_buf_attach() argument 219 amdgpu_dma_buf_detach(struct dma_buf *dmabuf, struct dma_buf_attachment *attach) amdgpu_dma_buf_detach() argument 237 amdgpu_dma_buf_pin(struct dma_buf_attachment *attach) amdgpu_dma_buf_pin() argument 265 amdgpu_dma_buf_unpin(struct dma_buf_attachment *attach) amdgpu_dma_buf_unpin() argument 286 amdgpu_dma_buf_map(struct dma_buf_attachment *attach, enum dma_data_direction dir) amdgpu_dma_buf_map() argument 356 amdgpu_dma_buf_unmap(struct dma_buf_attachment *attach, struct sg_table *sgt, enum dma_data_direction dir) amdgpu_dma_buf_unmap() argument 514 amdgpu_dma_buf_move_notify(struct dma_buf_attachment *attach) amdgpu_dma_buf_move_notify() argument 586 struct dma_buf_attachment *attach; amdgpu_gem_prime_import() local [all...] |
/kernel/linux/linux-6.6/drivers/gpu/drm/virtio/ |
H A D | virtgpu_prime.c | 47 virtgpu_gem_map_dma_buf(struct dma_buf_attachment *attach, in virtgpu_gem_map_dma_buf() argument 50 struct drm_gem_object *obj = attach->dmabuf->priv; in virtgpu_gem_map_dma_buf() 54 return virtio_gpu_vram_map_dma_buf(bo, attach->dev, dir); in virtgpu_gem_map_dma_buf() 56 return drm_gem_map_dma_buf(attach, dir); in virtgpu_gem_map_dma_buf() 59 static void virtgpu_gem_unmap_dma_buf(struct dma_buf_attachment *attach, in virtgpu_gem_unmap_dma_buf() argument 63 struct drm_gem_object *obj = attach->dmabuf->priv; in virtgpu_gem_unmap_dma_buf() 67 virtio_gpu_vram_unmap_dma_buf(attach->dev, sgt, dir); in virtgpu_gem_unmap_dma_buf() 71 drm_gem_unmap_dma_buf(attach, sgt, dir); in virtgpu_gem_unmap_dma_buf() 77 .attach = virtio_dma_buf_attach, 166 struct drm_device *dev, struct dma_buf_attachment *attach, in virtgpu_gem_prime_import_sg_table() 165 virtgpu_gem_prime_import_sg_table( struct drm_device *dev, struct dma_buf_attachment *attach, struct sg_table *table) virtgpu_gem_prime_import_sg_table() argument [all...] |
/kernel/linux/linux-6.6/include/linux/ |
H A D | dma-buf.h | 47 * @attach: 54 * device), and otherwise need to fail the attach operation. 59 * fail the attach operation. 72 int (*attach)(struct dma_buf *, struct dma_buf_attachment *); member 109 int (*pin)(struct dma_buf_attachment *attach); 122 void (*unpin)(struct dma_buf_attachment *attach); 129 * can only be called if @attach has been called successfully. 137 * &device.dma_params from the &dma_buf_attachment. The @attach callback 483 void (*move_notify)(struct dma_buf_attachment *attach); 584 * @attach 590 dma_buf_attachment_is_dynamic(struct dma_buf_attachment *attach) dma_buf_attachment_is_dynamic() argument [all...] |
/kernel/linux/linux-5.10/drivers/media/common/videobuf2/ |
H A D | videobuf2-vmalloc.c | 213 struct vb2_vmalloc_attachment *attach; in vb2_vmalloc_dmabuf_ops_attach() local 222 attach = kzalloc(sizeof(*attach), GFP_KERNEL); in vb2_vmalloc_dmabuf_ops_attach() 223 if (!attach) in vb2_vmalloc_dmabuf_ops_attach() 226 sgt = &attach->sgt; in vb2_vmalloc_dmabuf_ops_attach() 229 kfree(attach); in vb2_vmalloc_dmabuf_ops_attach() 237 kfree(attach); in vb2_vmalloc_dmabuf_ops_attach() 244 attach->dma_dir = DMA_NONE; in vb2_vmalloc_dmabuf_ops_attach() 245 dbuf_attach->priv = attach; in vb2_vmalloc_dmabuf_ops_attach() 252 struct vb2_vmalloc_attachment *attach in vb2_vmalloc_dmabuf_ops_detach() local 271 struct vb2_vmalloc_attachment *attach = db_attach->priv; vb2_vmalloc_dmabuf_ops_map() local [all...] |
H A D | videobuf2-dma-contig.c | 218 struct vb2_dc_attachment *attach; in vb2_dc_dmabuf_ops_attach() local 225 attach = kzalloc(sizeof(*attach), GFP_KERNEL); in vb2_dc_dmabuf_ops_attach() 226 if (!attach) in vb2_dc_dmabuf_ops_attach() 229 sgt = &attach->sgt; in vb2_dc_dmabuf_ops_attach() 235 kfree(attach); in vb2_dc_dmabuf_ops_attach() 247 attach->dma_dir = DMA_NONE; in vb2_dc_dmabuf_ops_attach() 248 dbuf_attach->priv = attach; in vb2_dc_dmabuf_ops_attach() 256 struct vb2_dc_attachment *attach = db_attach->priv; in vb2_dc_dmabuf_ops_detach() local 259 if (!attach) in vb2_dc_dmabuf_ops_detach() 282 struct vb2_dc_attachment *attach = db_attach->priv; vb2_dc_dmabuf_ops_map() local [all...] |
H A D | videobuf2-dma-sg.c | 358 struct vb2_dma_sg_attachment *attach; in vb2_dma_sg_dmabuf_ops_attach() local 365 attach = kzalloc(sizeof(*attach), GFP_KERNEL); in vb2_dma_sg_dmabuf_ops_attach() 366 if (!attach) in vb2_dma_sg_dmabuf_ops_attach() 369 sgt = &attach->sgt; in vb2_dma_sg_dmabuf_ops_attach() 375 kfree(attach); in vb2_dma_sg_dmabuf_ops_attach() 387 attach->dma_dir = DMA_NONE; in vb2_dma_sg_dmabuf_ops_attach() 388 dbuf_attach->priv = attach; in vb2_dma_sg_dmabuf_ops_attach() 396 struct vb2_dma_sg_attachment *attach = db_attach->priv; in vb2_dma_sg_dmabuf_ops_detach() local 399 if (!attach) in vb2_dma_sg_dmabuf_ops_detach() 415 struct vb2_dma_sg_attachment *attach = db_attach->priv; vb2_dma_sg_dmabuf_ops_map() local [all...] |
/kernel/linux/linux-6.6/drivers/media/common/videobuf2/ |
H A D | videobuf2-vmalloc.c | 213 struct vb2_vmalloc_attachment *attach; in vb2_vmalloc_dmabuf_ops_attach() local 222 attach = kzalloc(sizeof(*attach), GFP_KERNEL); in vb2_vmalloc_dmabuf_ops_attach() 223 if (!attach) in vb2_vmalloc_dmabuf_ops_attach() 226 sgt = &attach->sgt; in vb2_vmalloc_dmabuf_ops_attach() 229 kfree(attach); in vb2_vmalloc_dmabuf_ops_attach() 237 kfree(attach); in vb2_vmalloc_dmabuf_ops_attach() 244 attach->dma_dir = DMA_NONE; in vb2_vmalloc_dmabuf_ops_attach() 245 dbuf_attach->priv = attach; in vb2_vmalloc_dmabuf_ops_attach() 252 struct vb2_vmalloc_attachment *attach in vb2_vmalloc_dmabuf_ops_detach() local 271 struct vb2_vmalloc_attachment *attach = db_attach->priv; vb2_vmalloc_dmabuf_ops_map() local [all...] |
H A D | videobuf2-dma-contig.c | 320 struct vb2_dc_attachment *attach; in vb2_dc_dmabuf_ops_attach() local 327 attach = kzalloc(sizeof(*attach), GFP_KERNEL); in vb2_dc_dmabuf_ops_attach() 328 if (!attach) in vb2_dc_dmabuf_ops_attach() 331 sgt = &attach->sgt; in vb2_dc_dmabuf_ops_attach() 337 kfree(attach); in vb2_dc_dmabuf_ops_attach() 349 attach->dma_dir = DMA_NONE; in vb2_dc_dmabuf_ops_attach() 350 dbuf_attach->priv = attach; in vb2_dc_dmabuf_ops_attach() 358 struct vb2_dc_attachment *attach = db_attach->priv; in vb2_dc_dmabuf_ops_detach() local 361 if (!attach) in vb2_dc_dmabuf_ops_detach() 384 struct vb2_dc_attachment *attach = db_attach->priv; vb2_dc_dmabuf_ops_map() local [all...] |
H A D | videobuf2-dma-sg.c | 371 struct vb2_dma_sg_attachment *attach; in vb2_dma_sg_dmabuf_ops_attach() local 378 attach = kzalloc(sizeof(*attach), GFP_KERNEL); in vb2_dma_sg_dmabuf_ops_attach() 379 if (!attach) in vb2_dma_sg_dmabuf_ops_attach() 382 sgt = &attach->sgt; in vb2_dma_sg_dmabuf_ops_attach() 388 kfree(attach); in vb2_dma_sg_dmabuf_ops_attach() 400 attach->dma_dir = DMA_NONE; in vb2_dma_sg_dmabuf_ops_attach() 401 dbuf_attach->priv = attach; in vb2_dma_sg_dmabuf_ops_attach() 409 struct vb2_dma_sg_attachment *attach = db_attach->priv; in vb2_dma_sg_dmabuf_ops_detach() local 412 if (!attach) in vb2_dma_sg_dmabuf_ops_detach() 428 struct vb2_dma_sg_attachment *attach = db_attach->priv; vb2_dma_sg_dmabuf_ops_map() local [all...] |
/kernel/linux/linux-5.10/include/linux/ |
H A D | dma-buf.h | 46 * @attach: 53 * device), and otherwise need to fail the attach operation. 58 * fail the attach operation. 71 int (*attach)(struct dma_buf *, struct dma_buf_attachment *); member 100 int (*pin)(struct dma_buf_attachment *attach); 113 void (*unpin)(struct dma_buf_attachment *attach); 120 * can only be called if @attach has been called successfully. 128 * &device.dma_params from the &dma_buf_attachment. The @attach callback 279 * @lock: used internally to serialize list manipulation, attach/detach and 299 * and is incremented on each attach 487 dma_buf_attachment_is_dynamic(struct dma_buf_attachment *attach) dma_buf_attachment_is_dynamic() argument [all...] |
/kernel/linux/linux-5.10/drivers/xen/ |
H A D | gntdev-dmabuf.c | 54 struct dma_buf_attachment *attach; member 227 struct dma_buf_attachment *attach) in dmabuf_exp_ops_attach() 237 attach->priv = gntdev_dmabuf_attach; in dmabuf_exp_ops_attach() 242 struct dma_buf_attachment *attach) in dmabuf_exp_ops_detach() 244 struct gntdev_dmabuf_attachment *gntdev_dmabuf_attach = attach->priv; in dmabuf_exp_ops_detach() 251 dma_unmap_sgtable(attach->dev, sgt, in dmabuf_exp_ops_detach() 259 attach->priv = NULL; in dmabuf_exp_ops_detach() 264 dmabuf_exp_ops_map_dma_buf(struct dma_buf_attachment *attach, in dmabuf_exp_ops_map_dma_buf() argument 267 struct gntdev_dmabuf_attachment *gntdev_dmabuf_attach = attach->priv; in dmabuf_exp_ops_map_dma_buf() 268 struct gntdev_dmabuf *gntdev_dmabuf = attach in dmabuf_exp_ops_map_dma_buf() 226 dmabuf_exp_ops_attach(struct dma_buf *dma_buf, struct dma_buf_attachment *attach) dmabuf_exp_ops_attach() argument 241 dmabuf_exp_ops_detach(struct dma_buf *dma_buf, struct dma_buf_attachment *attach) dmabuf_exp_ops_detach() argument 306 dmabuf_exp_ops_unmap_dma_buf(struct dma_buf_attachment *attach, struct sg_table *sgt, enum dma_data_direction dir) dmabuf_exp_ops_unmap_dma_buf() argument 577 struct dma_buf_attachment *attach; dmabuf_imp_to_refs() local 702 struct dma_buf_attachment *attach; dmabuf_imp_release() local [all...] |
/kernel/linux/linux-6.6/drivers/xen/ |
H A D | gntdev-dmabuf.c | 48 struct dma_buf_attachment *attach; member 221 struct dma_buf_attachment *attach) in dmabuf_exp_ops_attach() 231 attach->priv = gntdev_dmabuf_attach; in dmabuf_exp_ops_attach() 236 struct dma_buf_attachment *attach) in dmabuf_exp_ops_detach() 238 struct gntdev_dmabuf_attachment *gntdev_dmabuf_attach = attach->priv; in dmabuf_exp_ops_detach() 245 dma_unmap_sgtable(attach->dev, sgt, in dmabuf_exp_ops_detach() 253 attach->priv = NULL; in dmabuf_exp_ops_detach() 258 dmabuf_exp_ops_map_dma_buf(struct dma_buf_attachment *attach, in dmabuf_exp_ops_map_dma_buf() argument 261 struct gntdev_dmabuf_attachment *gntdev_dmabuf_attach = attach->priv; in dmabuf_exp_ops_map_dma_buf() 262 struct gntdev_dmabuf *gntdev_dmabuf = attach in dmabuf_exp_ops_map_dma_buf() 220 dmabuf_exp_ops_attach(struct dma_buf *dma_buf, struct dma_buf_attachment *attach) dmabuf_exp_ops_attach() argument 235 dmabuf_exp_ops_detach(struct dma_buf *dma_buf, struct dma_buf_attachment *attach) dmabuf_exp_ops_detach() argument 300 dmabuf_exp_ops_unmap_dma_buf(struct dma_buf_attachment *attach, struct sg_table *sgt, enum dma_data_direction dir) dmabuf_exp_ops_unmap_dma_buf() argument 571 struct dma_buf_attachment *attach; dmabuf_imp_to_refs() local 696 struct dma_buf_attachment *attach; dmabuf_imp_release() local [all...] |
/kernel/linux/linux-5.10/drivers/gpu/drm/omapdrm/ |
H A D | omap_gem_dmabuf.c | 129 struct dma_buf_attachment *attach; in omap_gem_prime_import() local 146 attach = dma_buf_attach(dma_buf, dev->dev); in omap_gem_prime_import() 147 if (IS_ERR(attach)) in omap_gem_prime_import() 148 return ERR_CAST(attach); in omap_gem_prime_import() 152 sgt = dma_buf_map_attachment(attach, DMA_TO_DEVICE); in omap_gem_prime_import() 164 obj->import_attach = attach; in omap_gem_prime_import() 169 dma_buf_unmap_attachment(attach, sgt, DMA_TO_DEVICE); in omap_gem_prime_import() 171 dma_buf_detach(dma_buf, attach); in omap_gem_prime_import()
|
/kernel/linux/linux-6.6/drivers/gpu/drm/omapdrm/ |
H A D | omap_gem_dmabuf.c | 100 struct dma_buf_attachment *attach; in omap_gem_prime_import() local 117 attach = dma_buf_attach(dma_buf, dev->dev); in omap_gem_prime_import() 118 if (IS_ERR(attach)) in omap_gem_prime_import() 119 return ERR_CAST(attach); in omap_gem_prime_import() 123 sgt = dma_buf_map_attachment_unlocked(attach, DMA_TO_DEVICE); in omap_gem_prime_import() 135 obj->import_attach = attach; in omap_gem_prime_import() 140 dma_buf_unmap_attachment_unlocked(attach, sgt, DMA_TO_DEVICE); in omap_gem_prime_import() 142 dma_buf_detach(dma_buf, attach); in omap_gem_prime_import()
|
/kernel/linux/linux-5.10/drivers/gpu/drm/vmwgfx/ |
H A D | vmwgfx_prime.c | 38 * DMA-BUF attach- and mapping methods. No need to implement 43 struct dma_buf_attachment *attach) in vmw_prime_map_attach() 49 struct dma_buf_attachment *attach) in vmw_prime_map_detach() 53 static struct sg_table *vmw_prime_map_dma_buf(struct dma_buf_attachment *attach, in vmw_prime_map_dma_buf() argument 59 static void vmw_prime_unmap_dma_buf(struct dma_buf_attachment *attach, in vmw_prime_unmap_dma_buf() argument 66 .attach = vmw_prime_map_attach, 42 vmw_prime_map_attach(struct dma_buf *dma_buf, struct dma_buf_attachment *attach) vmw_prime_map_attach() argument 48 vmw_prime_map_detach(struct dma_buf *dma_buf, struct dma_buf_attachment *attach) vmw_prime_map_detach() argument
|
/kernel/linux/linux-6.6/drivers/gpu/drm/vmwgfx/ |
H A D | vmwgfx_prime.c | 38 * DMA-BUF attach- and mapping methods. No need to implement 43 struct dma_buf_attachment *attach) in vmw_prime_map_attach() 49 struct dma_buf_attachment *attach) in vmw_prime_map_detach() 53 static struct sg_table *vmw_prime_map_dma_buf(struct dma_buf_attachment *attach, in vmw_prime_map_dma_buf() argument 59 static void vmw_prime_unmap_dma_buf(struct dma_buf_attachment *attach, in vmw_prime_unmap_dma_buf() argument 66 .attach = vmw_prime_map_attach, 42 vmw_prime_map_attach(struct dma_buf *dma_buf, struct dma_buf_attachment *attach) vmw_prime_map_attach() argument 48 vmw_prime_map_detach(struct dma_buf *dma_buf, struct dma_buf_attachment *attach) vmw_prime_map_detach() argument
|
/kernel/linux/linux-5.10/drivers/gpu/drm/ |
H A D | drm_prime.c | 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) in drm_gem_map_attach() 592 * @attach: attachment to be detached 599 struct dma_buf_attachment *attach) in drm_gem_map_detach() 609 * @attach: attachment whose scatterlist is to be returned 619 struct sg_table *drm_gem_map_dma_buf(struct dma_buf_attachment *attach, in drm_gem_map_dma_buf() argument 580 drm_gem_map_attach(struct dma_buf *dma_buf, struct dma_buf_attachment *attach) drm_gem_map_attach() argument 598 drm_gem_map_detach(struct dma_buf *dma_buf, struct dma_buf_attachment *attach) drm_gem_map_detach() argument 654 drm_gem_unmap_dma_buf(struct dma_buf_attachment *attach, struct sg_table *sgt, enum dma_data_direction dir) drm_gem_unmap_dma_buf() argument 914 struct dma_buf_attachment *attach; drm_gem_prime_import_dev() local 1037 struct dma_buf_attachment *attach; drm_prime_gem_destroy() local [all...] |
/kernel/linux/linux-6.6/drivers/gpu/drm/ |
H A D | drm_prime.c | 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() 595 * @attach: attachment to be detached 602 struct dma_buf_attachment *attach) in drm_gem_map_detach() 612 * @attach: attachment whose scatterlist is to be returned 622 struct sg_table *drm_gem_map_dma_buf(struct dma_buf_attachment *attach, in drm_gem_map_dma_buf() argument 580 drm_gem_map_attach(struct dma_buf *dma_buf, struct dma_buf_attachment *attach) drm_gem_map_attach() argument 601 drm_gem_map_detach(struct dma_buf *dma_buf, struct dma_buf_attachment *attach) drm_gem_map_detach() argument 659 drm_gem_unmap_dma_buf(struct dma_buf_attachment *attach, struct sg_table *sgt, enum dma_data_direction dir) drm_gem_unmap_dma_buf() argument 909 struct dma_buf_attachment *attach; drm_gem_prime_import_dev() local 1046 struct dma_buf_attachment *attach; drm_prime_gem_destroy() local [all...] |
/kernel/linux/linux-6.6/drivers/gpu/drm/i915/gem/ |
H A D | i915_gem_dmabuf.c | 28 static struct sg_table *i915_gem_map_dma_buf(struct dma_buf_attachment *attach, in i915_gem_map_dma_buf() argument 31 struct drm_i915_gem_object *obj = dma_buf_to_obj(attach->dmabuf); in i915_gem_map_dma_buf() 56 ret = dma_map_sgtable(attach->dev, sgt, dir, DMA_ATTR_SKIP_CPU_SYNC); in i915_gem_map_dma_buf() 168 struct dma_buf_attachment *attach) in i915_gem_dmabuf_attach() 197 struct dma_buf_attachment *attach) in i915_gem_dmabuf_detach() 205 .attach = i915_gem_dmabuf_attach, 286 struct dma_buf_attachment *attach; in i915_gem_prime_import() local 307 /* need to attach */ in i915_gem_prime_import() 308 attach = dma_buf_attach(dma_buf, dev->dev); in i915_gem_prime_import() 309 if (IS_ERR(attach)) in i915_gem_prime_import() 167 i915_gem_dmabuf_attach(struct dma_buf *dmabuf, struct dma_buf_attachment *attach) i915_gem_dmabuf_attach() argument 196 i915_gem_dmabuf_detach(struct dma_buf *dmabuf, struct dma_buf_attachment *attach) i915_gem_dmabuf_detach() argument [all...] |
/kernel/linux/linux-6.6/drivers/gpu/drm/tegra/ |
H A D | gem.c | 82 map->attach = dma_buf_attach(buf, dev); in tegra_bo_pin() 83 if (IS_ERR(map->attach)) { in tegra_bo_pin() 84 err = PTR_ERR(map->attach); in tegra_bo_pin() 88 map->sgt = dma_buf_map_attachment_unlocked(map->attach, direction); in tegra_bo_pin() 90 dma_buf_detach(buf, map->attach); in tegra_bo_pin() 163 if (map->attach) { in tegra_bo_unpin() 164 dma_buf_unmap_attachment_unlocked(map->attach, map->sgt, in tegra_bo_unpin() 166 dma_buf_detach(map->attach->dmabuf, map->attach); in tegra_bo_unpin() 450 struct dma_buf_attachment *attach; in tegra_bo_import() local 615 tegra_gem_prime_map_dma_buf(struct dma_buf_attachment *attach, enum dma_data_direction dir) tegra_gem_prime_map_dma_buf() argument 647 tegra_gem_prime_unmap_dma_buf(struct dma_buf_attachment *attach, struct sg_table *sgt, enum dma_data_direction dir) tegra_gem_prime_unmap_dma_buf() argument [all...] |
/kernel/linux/linux-5.10/drivers/nvdimm/ |
H A D | claim.c | 43 bool __nd_attach_ndns(struct device *dev, struct nd_namespace_common *attach, in __nd_attach_ndns() argument 46 struct nvdimm_bus *nvdimm_bus = walk_to_nvdimm_bus(&attach->dev); in __nd_attach_ndns() 48 if (attach->claim) in __nd_attach_ndns() 52 attach->claim = dev; in __nd_attach_ndns() 53 *_ndns = attach; in __nd_attach_ndns() 54 get_device(&attach->dev); in __nd_attach_ndns() 58 bool nd_attach_ndns(struct device *dev, struct nd_namespace_common *attach, in nd_attach_ndns() argument 63 nvdimm_bus_lock(&attach->dev); in nd_attach_ndns() 64 claimed = __nd_attach_ndns(dev, attach, _ndns); in nd_attach_ndns() 65 nvdimm_bus_unlock(&attach in nd_attach_ndns() [all...] |