| /linux/include/linux/ |
| H A D | dma-buf.h | 28 struct dma_buf; 64 int (*attach)(struct dma_buf *, struct dma_buf_attachment *); 75 void (*detach)(struct dma_buf *, struct dma_buf_attachment *); 195 void (*release)(struct dma_buf *); 222 int (*begin_cpu_access)(struct dma_buf *, enum dma_data_direction); 239 int (*end_cpu_access)(struct dma_buf *, enum dma_data_direction); 276 int (*mmap)(struct dma_buf *, struct vm_area_struct *vma); 278 int (*vmap)(struct dma_buf *dmabuf, struct iosys_map *map); 279 void (*vunmap)(struct dma_buf *dmabuf, struct iosys_map *map); 294 struct dma_buf { struct [all …]
|
| H A D | virtio_dma_buf.h | 24 int (*device_attach)(struct dma_buf *dma_buf, 26 int (*get_uuid)(struct dma_buf *dma_buf, uuid_t *uuid); 29 int virtio_dma_buf_attach(struct dma_buf *dma_buf, 32 struct dma_buf *virtio_dma_buf_export 34 bool is_virtio_dma_buf(struct dma_buf *dma_buf); 35 int virtio_dma_buf_get_uuid(struct dma_buf *dma_buf, uuid_t *uuid);
|
| /linux/drivers/gpu/drm/i915/gem/ |
| H A D | i915_gem_dmabuf.c | 22 static struct drm_i915_gem_object *dma_buf_to_obj(struct dma_buf *buf) 69 static int i915_gem_dmabuf_vmap(struct dma_buf *dma_buf, in i915_gem_dmabuf_vmap() argument 72 struct drm_i915_gem_object *obj = dma_buf_to_obj(dma_buf); in i915_gem_dmabuf_vmap() 84 static void i915_gem_dmabuf_vunmap(struct dma_buf *dma_buf, in i915_gem_dmabuf_vunmap() argument 87 struct drm_i915_gem_object *obj = dma_buf_to_obj(dma_buf); in i915_gem_dmabuf_vunmap() 93 static int i915_gem_dmabuf_mmap(struct dma_buf *dma_buf, struct vm_area_struct *vma) in i915_gem_dmabuf_mmap() argument 95 struct drm_i915_gem_object *obj = dma_buf_to_obj(dma_buf); in i915_gem_dmabuf_mmap() 117 static int i915_gem_begin_cpu_access(struct dma_buf *dma_buf, enum dma_data_direction direction) in i915_gem_begin_cpu_access() argument 119 struct drm_i915_gem_object *obj = dma_buf_to_obj(dma_buf); in i915_gem_begin_cpu_access() 142 static int i915_gem_end_cpu_access(struct dma_buf *dma_buf, enum dma_data_direction direction) in i915_gem_end_cpu_access() argument [all …]
|
| H A D | i915_gem_dmabuf.h | 11 struct dma_buf; 14 struct dma_buf *dma_buf); 16 struct dma_buf *i915_gem_prime_export(struct drm_gem_object *gem_obj, int flags);
|
| /linux/drivers/virtio/ |
| H A D | virtio_dma_buf.c | 20 struct dma_buf *virtio_dma_buf_export in virtio_dma_buf_export() 42 int virtio_dma_buf_attach(struct dma_buf *dma_buf, in virtio_dma_buf_attach() argument 47 container_of(dma_buf->ops, in virtio_dma_buf_attach() 51 ret = ops->device_attach(dma_buf, attach); in virtio_dma_buf_attach() 63 bool is_virtio_dma_buf(struct dma_buf *dma_buf) in is_virtio_dma_buf() argument 65 return dma_buf->ops->attach == &virtio_dma_buf_attach; in is_virtio_dma_buf() 76 int virtio_dma_buf_get_uuid(struct dma_buf *dma_buf, in virtio_dma_buf_get_uuid() argument 80 container_of(dma_buf->ops, in virtio_dma_buf_get_uuid() 83 if (!is_virtio_dma_buf(dma_buf)) in virtio_dma_buf_get_uuid() 86 return ops->get_uuid(dma_buf, uuid); in virtio_dma_buf_get_uuid()
|
| /linux/drivers/gpu/drm/amd/amdgpu/ |
| H A D | amdgpu_dma_buf.c | 77 static int amdgpu_dma_buf_attach(struct dma_buf *dmabuf, in amdgpu_dma_buf_attach() 134 struct dma_buf *dmabuf = attach->dmabuf; in amdgpu_dma_buf_pin() 196 struct dma_buf *dma_buf = attach->dmabuf; in amdgpu_dma_buf_map() local 197 struct drm_gem_object *obj = dma_buf->priv; in amdgpu_dma_buf_map() 290 static int amdgpu_dma_buf_begin_cpu_access(struct dma_buf *dma_buf, in amdgpu_dma_buf_begin_cpu_access() argument 293 struct amdgpu_bo *bo = gem_to_amdgpu_bo(dma_buf->priv); in amdgpu_dma_buf_begin_cpu_access() 319 static int amdgpu_dma_buf_vmap(struct dma_buf *dma_buf, struct iosys_map *map) in amdgpu_dma_buf_vmap() argument 321 struct drm_gem_object *obj = dma_buf->priv; in amdgpu_dma_buf_vmap() 333 ret = drm_gem_dmabuf_vmap(dma_buf, map); in amdgpu_dma_buf_vmap() 340 static void amdgpu_dma_buf_vunmap(struct dma_buf *dma_buf, struct iosys_map *map) in amdgpu_dma_buf_vunmap() argument [all …]
|
| H A D | amdgpu_dma_buf.h | 28 struct dma_buf *amdgpu_gem_prime_export(struct drm_gem_object *gobj, 31 struct dma_buf *dma_buf);
|
| /linux/drivers/gpu/drm/vmwgfx/ |
| H A D | ttm_object.c | 96 void (*dmabuf_release)(struct dma_buf *dma_buf); 130 static void ttm_prime_dmabuf_release(struct dma_buf *dma_buf); 472 static bool __must_check get_dma_buf_unless_doomed(struct dma_buf *dmabuf) in get_dma_buf_unless_doomed() 494 BUG_ON(prime->dma_buf != NULL); in ttm_prime_refcount_release() 510 static void ttm_prime_dmabuf_release(struct dma_buf *dma_buf) in ttm_prime_dmabuf_release() argument 513 (struct ttm_prime_object *) dma_buf->priv; in ttm_prime_dmabuf_release() 518 tdev->dmabuf_release(dma_buf); in ttm_prime_dmabuf_release() 520 if (prime->dma_buf == dma_buf) in ttm_prime_dmabuf_release() 521 prime->dma_buf = NULL; in ttm_prime_dmabuf_release() 541 struct dma_buf *dma_buf; in ttm_prime_fd_to_handle() local [all …]
|
| H A D | vmwgfx_prime.c | 44 static int vmw_prime_map_attach(struct dma_buf *dma_buf, in vmw_prime_map_attach() argument 50 static void vmw_prime_map_detach(struct dma_buf *dma_buf, in vmw_prime_map_detach() argument
|
| /linux/drivers/gpu/drm/omapdrm/ |
| H A D | omap_gem_dmabuf.c | 40 static int omap_gem_dmabuf_begin_cpu_access(struct dma_buf *buffer, in omap_gem_dmabuf_begin_cpu_access() 55 static int omap_gem_dmabuf_end_cpu_access(struct dma_buf *buffer, in omap_gem_dmabuf_end_cpu_access() 63 static int omap_gem_dmabuf_mmap(struct dma_buf *buffer, in omap_gem_dmabuf_mmap() 80 struct dma_buf *omap_gem_prime_export(struct drm_gem_object *obj, int flags) in omap_gem_prime_export() 98 struct dma_buf *dma_buf) in omap_gem_prime_import() argument 105 if (dma_buf->ops == &omap_dmabuf_ops) { in omap_gem_prime_import() 106 obj = dma_buf->priv; in omap_gem_prime_import() 117 attach = dma_buf_attach(dma_buf, dev->dev); in omap_gem_prime_import() 121 get_dma_buf(dma_buf); in omap_gem_prime_import() 129 obj = omap_gem_new_dmabuf(dev, dma_buf->size, sgt); in omap_gem_prime_import() [all …]
|
| /linux/drivers/scsi/lpfc/ |
| H A D | lpfc_mem.c | 564 struct hbq_dmabuf *dma_buf; in lpfc_sli4_rb_alloc() local 566 dma_buf = kzalloc(sizeof(struct hbq_dmabuf), GFP_KERNEL); in lpfc_sli4_rb_alloc() 567 if (!dma_buf) in lpfc_sli4_rb_alloc() 570 dma_buf->hbuf.virt = dma_pool_alloc(phba->lpfc_hrb_pool, GFP_KERNEL, in lpfc_sli4_rb_alloc() 571 &dma_buf->hbuf.phys); in lpfc_sli4_rb_alloc() 572 if (!dma_buf->hbuf.virt) { in lpfc_sli4_rb_alloc() 573 kfree(dma_buf); in lpfc_sli4_rb_alloc() 576 dma_buf->dbuf.virt = dma_pool_alloc(phba->lpfc_drb_pool, GFP_KERNEL, in lpfc_sli4_rb_alloc() 577 &dma_buf->dbuf.phys); in lpfc_sli4_rb_alloc() 578 if (!dma_buf->dbuf.virt) { in lpfc_sli4_rb_alloc() [all …]
|
| /linux/drivers/i2c/busses/ |
| H A D | i2c-qcom-geni.c | 95 void **dma_buf; member 114 void *dma_buf; member 420 if (gi2c->dma_buf) { in geni_i2c_rx_msg_cleanup() 424 i2c_put_dma_safe_msg_buf(gi2c->dma_buf, cur, !gi2c->err); in geni_i2c_rx_msg_cleanup() 432 if (gi2c->dma_buf) { in geni_i2c_tx_msg_cleanup() 436 i2c_put_dma_safe_msg_buf(gi2c->dma_buf, cur, !gi2c->err); in geni_i2c_tx_msg_cleanup() 445 void *dma_buf; in geni_i2c_rx_one_msg() local 450 dma_buf = i2c_get_dma_safe_msg_buf(msg, 32); in geni_i2c_rx_one_msg() 451 if (dma_buf) in geni_i2c_rx_one_msg() 459 if (dma_buf && geni_se_rx_dma_prep(se, dma_buf, len, &rx_dma)) { in geni_i2c_rx_one_msg() [all …]
|
| H A D | i2c-stm32.c | 86 dma->dma_buf = 0; in stm32_i2c_dma_free() 118 dma->dma_buf = dma_map_single(dev, buf, dma->dma_len, in stm32_i2c_prep_dma_xfer() 120 if (dma_mapping_error(dev, dma->dma_buf)) { in stm32_i2c_prep_dma_xfer() 125 txdesc = dmaengine_prep_slave_single(dma->chan_using, dma->dma_buf, in stm32_i2c_prep_dma_xfer() 150 dma_unmap_single(dev, dma->dma_buf, dma->dma_len, in stm32_i2c_prep_dma_xfer()
|
| /linux/drivers/scsi/csiostor/ |
| H A D | csio_scsi.c | 206 struct csio_dma_buf *dma_buf; in csio_scsi_init_cmd_wr() local 222 dma_buf = &req->dma_buf; in csio_scsi_init_cmd_wr() 225 wr->rsp_dmalen = cpu_to_be32(dma_buf->len); in csio_scsi_init_cmd_wr() 226 wr->rsp_dmaaddr = cpu_to_be64(dma_buf->paddr); in csio_scsi_init_cmd_wr() 298 struct csio_dma_buf *dma_buf; in csio_scsi_init_ultptx_dsgl() local 329 dma_buf = (struct csio_dma_buf *)tmp; in csio_scsi_init_ultptx_dsgl() 331 sgl->addr0 = cpu_to_be64(dma_buf->paddr); in csio_scsi_init_ultptx_dsgl() 333 min(xfer_len, dma_buf->len)); in csio_scsi_init_ultptx_dsgl() 336 sge_pair->addr[1] = cpu_to_be64(dma_buf->paddr); in csio_scsi_init_ultptx_dsgl() 338 min(xfer_len, dma_buf->len)); in csio_scsi_init_ultptx_dsgl() [all …]
|
| H A D | csio_lnode.c | 278 cmd = fdmi_req->dma_buf.vaddr; in csio_ln_fdmi_done() 312 cmd = fdmi_req->dma_buf.vaddr; in csio_ln_fdmi_rhba_cbfn() 391 FCOE_CT, &fdmi_req->dma_buf, len)) { in csio_ln_fdmi_rhba_cbfn() 428 cmd = fdmi_req->dma_buf.vaddr; in csio_ln_fdmi_dprt_cbfn() 498 FCOE_CT, &fdmi_req->dma_buf, len)) { in csio_ln_fdmi_dprt_cbfn() 529 cmd = fdmi_req->dma_buf.vaddr; in csio_ln_fdmi_dhba_cbfn() 550 FCOE_CT, &fdmi_req->dma_buf, len)) { in csio_ln_fdmi_dhba_cbfn() 588 cmd = fdmi_req->dma_buf.vaddr; in csio_ln_fdmi_start() 599 FCOE_CT, &fdmi_req->dma_buf, len)) { in csio_ln_fdmi_start() 1708 wr->rsp_dmalen = cpu_to_be32(io_req->dma_buf.len); in csio_ln_prep_ecwr() [all …]
|
| /linux/drivers/dma-buf/ |
| H A D | dma-buf-sysfs-stats.h | 16 int dma_buf_stats_setup(struct dma_buf *dmabuf, struct file *file); 18 void dma_buf_stats_teardown(struct dma_buf *dmabuf); 28 static inline int dma_buf_stats_setup(struct dma_buf *dmabuf, struct file *file) in dma_buf_stats_setup() 33 static inline void dma_buf_stats_teardown(struct dma_buf *dmabuf) {} in dma_buf_stats_teardown()
|
| H A D | dma-buf-sysfs-stats.c | 55 ssize_t (*show)(struct dma_buf *dmabuf, 66 struct dma_buf *dmabuf; in dma_buf_stats_attribute_show() 82 static ssize_t exporter_name_show(struct dma_buf *dmabuf, in exporter_name_show() 89 static ssize_t size_show(struct dma_buf *dmabuf, in size_show() 121 void dma_buf_stats_teardown(struct dma_buf *dmabuf) in dma_buf_stats_teardown() 171 int dma_buf_stats_setup(struct dma_buf *dmabuf, struct file *file) in dma_buf_stats_setup()
|
| H A D | udmabuf.c | 96 static int mmap_udmabuf(struct dma_buf *buf, struct vm_area_struct *vma) in mmap_udmabuf() 109 static int vmap_udmabuf(struct dma_buf *buf, struct iosys_map *map) in vmap_udmabuf() 135 static void vunmap_udmabuf(struct dma_buf *buf, struct iosys_map *map) in vunmap_udmabuf() 144 static struct sg_table *get_sg_table(struct device *dev, struct dma_buf *buf, in get_sg_table() 234 static void release_udmabuf(struct dma_buf *buf) in release_udmabuf() 246 static int begin_cpu_udmabuf(struct dma_buf *buf, in begin_cpu_udmabuf() 266 static int end_cpu_udmabuf(struct dma_buf *buf, in end_cpu_udmabuf() 311 static struct dma_buf *export_udmabuf(struct udmabuf *ubuf, in export_udmabuf() 379 struct dma_buf *dmabuf; in udmabuf_create()
|
| /linux/drivers/xen/ |
| H A D | gntdev-dmabuf.c | 30 struct dma_buf *dmabuf; 220 static int dmabuf_exp_ops_attach(struct dma_buf *dma_buf, in dmabuf_exp_ops_attach() argument 235 static void dmabuf_exp_ops_detach(struct dma_buf *dma_buf, in dmabuf_exp_ops_detach() argument 327 static void dmabuf_exp_ops_release(struct dma_buf *dma_buf) in dmabuf_exp_ops_release() argument 329 struct gntdev_dmabuf *gntdev_dmabuf = dma_buf->priv; in dmabuf_exp_ops_release() 562 struct dma_buf *dma_buf; in dmabuf_imp_to_refs() local 569 dma_buf = dma_buf_get(fd); in dmabuf_imp_to_refs() 570 if (IS_ERR(dma_buf)) in dmabuf_imp_to_refs() 571 return ERR_CAST(dma_buf); in dmabuf_imp_to_refs() 582 attach = dma_buf_attach(dma_buf, dev); in dmabuf_imp_to_refs() [all …]
|
| /linux/drivers/gpu/drm/xe/ |
| H A D | xe_dma_buf.h | 11 struct dma_buf *xe_gem_prime_export(struct drm_gem_object *obj, int flags); 13 struct dma_buf *dma_buf);
|
| /linux/drivers/media/common/videobuf2/ |
| H A D | videobuf2-vmalloc.c | 32 struct dma_buf *dbuf; 212 static int vb2_vmalloc_dmabuf_ops_attach(struct dma_buf *dbuf, in vb2_vmalloc_dmabuf_ops_attach() 251 static void vb2_vmalloc_dmabuf_ops_detach(struct dma_buf *dbuf, in vb2_vmalloc_dmabuf_ops_detach() 304 static void vb2_vmalloc_dmabuf_ops_release(struct dma_buf *dbuf) in vb2_vmalloc_dmabuf_ops_release() 310 static int vb2_vmalloc_dmabuf_ops_vmap(struct dma_buf *dbuf, in vb2_vmalloc_dmabuf_ops_vmap() 320 static int vb2_vmalloc_dmabuf_ops_mmap(struct dma_buf *dbuf, in vb2_vmalloc_dmabuf_ops_mmap() 336 static struct dma_buf *vb2_vmalloc_get_dmabuf(struct vb2_buffer *vb, in vb2_vmalloc_get_dmabuf() 341 struct dma_buf *dbuf; in vb2_vmalloc_get_dmabuf() 404 struct dma_buf *dbuf, in vb2_vmalloc_attach_dmabuf()
|
| /linux/drivers/dma-buf/heaps/ |
| H A D | system_heap.c | 73 static int system_heap_attach(struct dma_buf *dmabuf, in system_heap_attach() 103 static void system_heap_detach(struct dma_buf *dmabuf, in system_heap_detach() 142 static int system_heap_dma_buf_begin_cpu_access(struct dma_buf *dmabuf, in system_heap_dma_buf_begin_cpu_access() 163 static int system_heap_dma_buf_end_cpu_access(struct dma_buf *dmabuf, in system_heap_dma_buf_end_cpu_access() 184 static int system_heap_mmap(struct dma_buf *dmabuf, struct vm_area_struct *vma) in system_heap_mmap() 247 static int system_heap_vmap(struct dma_buf *dmabuf, struct iosys_map *map) in system_heap_vmap() 275 static void system_heap_vunmap(struct dma_buf *dmabuf, struct iosys_map *map) in system_heap_vunmap() 288 static void system_heap_dma_buf_release(struct dma_buf *dmabuf) in system_heap_dma_buf_release() 338 static struct dma_buf *system_heap_allocate(struct dma_heap *heap, in system_heap_allocate() 347 struct dma_buf *dmabuf; in system_heap_allocate()
|
| /linux/drivers/mtd/nand/raw/ |
| H A D | lpc32xx_mlc.c | 201 uint8_t *dma_buf; member 443 uint8_t *dma_buf; in lpc32xx_read_page() local 447 dma_buf = buf; in lpc32xx_read_page() 450 dma_buf = host->dma_buf; in lpc32xx_read_page() 476 res = lpc32xx_xmit_dma(mtd, dma_buf + i * 512, 512, in lpc32xx_read_page() 495 memcpy(buf, dma_buf, mtd->writesize); in lpc32xx_read_page() 507 uint8_t *dma_buf = (uint8_t *)buf; in lpc32xx_write_page_lowlevel() local 512 dma_buf = host->dma_buf; in lpc32xx_write_page_lowlevel() 513 memcpy(dma_buf, buf, mtd->writesize); in lpc32xx_write_page_lowlevel() 524 res = lpc32xx_xmit_dma(mtd, dma_buf + i * 512, 512, in lpc32xx_write_page_lowlevel() [all …]
|
| /linux/drivers/net/wireless/mediatek/mt7601u/ |
| H A D | mcu.c | 284 const struct mt7601u_dma_buf *dma_buf, in __mt7601u_dma_fw() argument 288 struct mt7601u_dma_buf buf = *dma_buf; /* we need to fake length */ in __mt7601u_dma_fw() 336 mt7601u_dma_fw(struct mt7601u_dev *dev, struct mt7601u_dma_buf *dma_buf, in mt7601u_dma_fw() argument 345 ret = __mt7601u_dma_fw(dev, dma_buf, data, n, dst_addr); in mt7601u_dma_fw() 352 return mt7601u_dma_fw(dev, dma_buf, data + n, len - n, dst_addr + n); in mt7601u_dma_fw() 358 struct mt7601u_dma_buf dma_buf; in mt7601u_upload_firmware() local 366 if (mt7601u_usb_alloc_buf(dev, MCU_FW_URB_SIZE, &dma_buf)) { in mt7601u_upload_firmware() 374 ret = mt7601u_dma_fw(dev, &dma_buf, fw->ilm, ilm_len, sizeof(fw->ivb)); in mt7601u_upload_firmware() 380 ret = mt7601u_dma_fw(dev, &dma_buf, fw->ilm + ilm_len, in mt7601u_upload_firmware() 401 mt7601u_usb_free_buf(dev, &dma_buf); in mt7601u_upload_firmware()
|
| /linux/drivers/gpu/drm/ |
| H A D | drm_gem_shmem_helper.c | 666 ret = dma_buf_mmap(obj->dma_buf, vma, 0); in drm_gem_shmem_mmap() 850 struct dma_buf *dma_buf) in drm_gem_shmem_prime_import_no_map() argument 858 if (drm_gem_is_prime_exported_dma_buf(dev, dma_buf)) { in drm_gem_shmem_prime_import_no_map() 863 obj = dma_buf->priv; in drm_gem_shmem_prime_import_no_map() 868 attach = dma_buf_attach(dma_buf, dev->dev); in drm_gem_shmem_prime_import_no_map() 872 get_dma_buf(dma_buf); in drm_gem_shmem_prime_import_no_map() 885 shmem->base.resv = dma_buf->resv; in drm_gem_shmem_prime_import_no_map() 890 dma_buf_detach(dma_buf, attach); in drm_gem_shmem_prime_import_no_map() 891 dma_buf_put(dma_buf); in drm_gem_shmem_prime_import_no_map()
|