/Linux-v5.10/drivers/gpu/drm/ |
D | drm_prime.c | 91 struct dma_buf *dma_buf; member 99 struct dma_buf *dma_buf, uint32_t handle) in drm_prime_add_buf_handle() argument 108 get_dma_buf(dma_buf); in drm_prime_add_buf_handle() 109 member->dma_buf = dma_buf; in drm_prime_add_buf_handle() 119 if (dma_buf > pos->dma_buf) in drm_prime_add_buf_handle() 145 static struct dma_buf *drm_prime_lookup_buf_by_handle(struct drm_prime_file_private *prime_fpriv, in drm_prime_lookup_buf_by_handle() 156 return member->dma_buf; in drm_prime_lookup_buf_by_handle() 167 struct dma_buf *dma_buf, in drm_prime_lookup_buf_handle() argument 177 if (member->dma_buf == dma_buf) { in drm_prime_lookup_buf_handle() 180 } else if (member->dma_buf < dma_buf) { in drm_prime_lookup_buf_handle() [all …]
|
/Linux-v5.10/include/linux/ |
D | dma-buf.h | 26 struct dma_buf; 71 int (*attach)(struct dma_buf *, struct dma_buf_attachment *); 82 void (*detach)(struct dma_buf *, struct dma_buf_attachment *); 178 void (*release)(struct dma_buf *); 210 int (*begin_cpu_access)(struct dma_buf *, enum dma_data_direction); 229 int (*end_cpu_access)(struct dma_buf *, enum dma_data_direction); 266 int (*mmap)(struct dma_buf *, struct vm_area_struct *vma); 268 void *(*vmap)(struct dma_buf *); 269 void (*vunmap)(struct dma_buf *, void *vaddr); 305 struct dma_buf { struct [all …]
|
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-v5.10/include/drm/ |
D | drm_prime.h | 55 struct dma_buf; 65 struct dma_buf *drm_gem_dmabuf_export(struct drm_device *dev, 67 void drm_gem_dmabuf_release(struct dma_buf *dma_buf); 76 int drm_gem_map_attach(struct dma_buf *dma_buf, 78 void drm_gem_map_detach(struct dma_buf *dma_buf, 85 void *drm_gem_dmabuf_vmap(struct dma_buf *dma_buf); 86 void drm_gem_dmabuf_vunmap(struct dma_buf *dma_buf, void *vaddr); 89 int drm_gem_dmabuf_mmap(struct dma_buf *dma_buf, struct vm_area_struct *vma); 93 struct dma_buf *drm_gem_prime_export(struct drm_gem_object *obj, 100 struct dma_buf *dma_buf, [all …]
|
/Linux-v5.10/drivers/virtio/ |
D | virtio_dma_buf.c | 20 struct dma_buf *virtio_dma_buf_export in virtio_dma_buf_export() 40 int virtio_dma_buf_attach(struct dma_buf *dma_buf, in virtio_dma_buf_attach() argument 45 container_of(dma_buf->ops, in virtio_dma_buf_attach() 49 ret = ops->device_attach(dma_buf, attach); in virtio_dma_buf_attach() 61 bool is_virtio_dma_buf(struct dma_buf *dma_buf) in is_virtio_dma_buf() argument 63 return dma_buf->ops->attach == &virtio_dma_buf_attach; in is_virtio_dma_buf() 74 int virtio_dma_buf_get_uuid(struct dma_buf *dma_buf, in virtio_dma_buf_get_uuid() argument 78 container_of(dma_buf->ops, in virtio_dma_buf_get_uuid() 81 if (!is_virtio_dma_buf(dma_buf)) in virtio_dma_buf_get_uuid() 84 return ops->get_uuid(dma_buf, uuid); in virtio_dma_buf_get_uuid()
|
/Linux-v5.10/drivers/gpu/drm/i915/gem/ |
D | i915_gem_dmabuf.c | 15 static struct drm_i915_gem_object *dma_buf_to_obj(struct dma_buf *buf) in dma_buf_to_obj() 80 static void *i915_gem_dmabuf_vmap(struct dma_buf *dma_buf) in i915_gem_dmabuf_vmap() argument 82 struct drm_i915_gem_object *obj = dma_buf_to_obj(dma_buf); in i915_gem_dmabuf_vmap() 87 static void i915_gem_dmabuf_vunmap(struct dma_buf *dma_buf, void *vaddr) in i915_gem_dmabuf_vunmap() argument 89 struct drm_i915_gem_object *obj = dma_buf_to_obj(dma_buf); in i915_gem_dmabuf_vunmap() 95 static int i915_gem_dmabuf_mmap(struct dma_buf *dma_buf, struct vm_area_struct *vma) in i915_gem_dmabuf_mmap() argument 97 struct drm_i915_gem_object *obj = dma_buf_to_obj(dma_buf); in i915_gem_dmabuf_mmap() 116 static int i915_gem_begin_cpu_access(struct dma_buf *dma_buf, enum dma_data_direction direction) in i915_gem_begin_cpu_access() argument 118 struct drm_i915_gem_object *obj = dma_buf_to_obj(dma_buf); in i915_gem_begin_cpu_access() 138 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 …]
|
/Linux-v5.10/drivers/gpu/drm/amd/amdgpu/ |
D | amdgpu_dma_buf.c | 176 static int amdgpu_dma_buf_attach(struct dma_buf *dmabuf, in amdgpu_dma_buf_attach() 219 static void amdgpu_dma_buf_detach(struct dma_buf *dmabuf, in amdgpu_dma_buf_detach() 277 struct dma_buf *dma_buf = attach->dmabuf; in amdgpu_dma_buf_map() local 278 struct drm_gem_object *obj = dma_buf->priv; in amdgpu_dma_buf_map() 348 struct dma_buf *dma_buf = attach->dmabuf; in amdgpu_dma_buf_unmap() local 349 struct drm_gem_object *obj = dma_buf->priv; in amdgpu_dma_buf_unmap() 374 static int amdgpu_dma_buf_begin_cpu_access(struct dma_buf *dma_buf, in amdgpu_dma_buf_begin_cpu_access() argument 377 struct amdgpu_bo *bo = gem_to_amdgpu_bo(dma_buf->priv); in amdgpu_dma_buf_begin_cpu_access() 426 struct dma_buf *amdgpu_gem_prime_export(struct drm_gem_object *gobj, in amdgpu_gem_prime_export() 430 struct dma_buf *buf; in amdgpu_gem_prime_export() [all …]
|
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-v5.10/drivers/gpu/drm/i915/gem/selftests/ |
D | mock_dmabuf.c | 53 static void mock_dmabuf_release(struct dma_buf *dma_buf) in mock_dmabuf_release() argument 55 struct mock_dmabuf *mock = to_mock(dma_buf); in mock_dmabuf_release() 64 static void *mock_dmabuf_vmap(struct dma_buf *dma_buf) in mock_dmabuf_vmap() argument 66 struct mock_dmabuf *mock = to_mock(dma_buf); in mock_dmabuf_vmap() 71 static void mock_dmabuf_vunmap(struct dma_buf *dma_buf, void *vaddr) in mock_dmabuf_vunmap() argument 73 struct mock_dmabuf *mock = to_mock(dma_buf); in mock_dmabuf_vunmap() 78 static int mock_dmabuf_mmap(struct dma_buf *dma_buf, struct vm_area_struct *vma) in mock_dmabuf_mmap() argument 92 static struct dma_buf *mock_dmabuf(int npages) in mock_dmabuf() 96 struct dma_buf *dmabuf; in mock_dmabuf()
|
D | i915_gem_dmabuf.c | 17 struct dma_buf *dmabuf; in igt_dmabuf_export() 40 struct dma_buf *dmabuf; in igt_dmabuf_import_self() 83 struct dma_buf *dmabuf; in igt_dmabuf_import() 165 struct dma_buf *dmabuf; in igt_dmabuf_import_ownership() 214 struct dma_buf *dmabuf; in igt_dmabuf_export_vmap()
|
/Linux-v5.10/drivers/gpu/drm/omapdrm/ |
D | omap_gem_dmabuf.c | 65 static int omap_gem_dmabuf_begin_cpu_access(struct dma_buf *buffer, in omap_gem_dmabuf_begin_cpu_access() 80 static int omap_gem_dmabuf_end_cpu_access(struct dma_buf *buffer, in omap_gem_dmabuf_end_cpu_access() 88 static int omap_gem_dmabuf_mmap(struct dma_buf *buffer, in omap_gem_dmabuf_mmap() 110 struct dma_buf *omap_gem_prime_export(struct drm_gem_object *obj, int flags) in omap_gem_prime_export() 127 struct dma_buf *dma_buf) in omap_gem_prime_import() argument 134 if (dma_buf->ops == &omap_dmabuf_ops) { in omap_gem_prime_import() 135 obj = dma_buf->priv; in omap_gem_prime_import() 146 attach = dma_buf_attach(dma_buf, dev->dev); in omap_gem_prime_import() 150 get_dma_buf(dma_buf); in omap_gem_prime_import() 158 obj = omap_gem_new_dmabuf(dev, dma_buf->size, sgt); in omap_gem_prime_import() [all …]
|
/Linux-v5.10/drivers/gpu/drm/vmwgfx/ |
D | ttm_object.c | 95 void (*dmabuf_release)(struct dma_buf *dma_buf); 131 static void ttm_prime_dmabuf_release(struct dma_buf *dma_buf); 547 tdev->dma_buf_size = ttm_round_pot(sizeof(struct dma_buf)) + in ttm_object_device_init() 582 static bool __must_check get_dma_buf_unless_doomed(struct dma_buf *dmabuf) in get_dma_buf_unless_doomed() 604 BUG_ON(prime->dma_buf != NULL); in ttm_prime_refcount_release() 620 static void ttm_prime_dmabuf_release(struct dma_buf *dma_buf) in ttm_prime_dmabuf_release() argument 623 (struct ttm_prime_object *) dma_buf->priv; in ttm_prime_dmabuf_release() 628 tdev->dmabuf_release(dma_buf); in ttm_prime_dmabuf_release() 630 if (prime->dma_buf == dma_buf) in ttm_prime_dmabuf_release() 631 prime->dma_buf = NULL; in ttm_prime_dmabuf_release() [all …]
|
D | vmwgfx_prime.c | 42 static int vmw_prime_map_attach(struct dma_buf *dma_buf, in vmw_prime_map_attach() argument 48 static void vmw_prime_map_detach(struct dma_buf *dma_buf, in vmw_prime_map_detach() argument
|
/Linux-v5.10/drivers/scsi/lpfc/ |
D | lpfc_mem.c | 540 struct hbq_dmabuf *dma_buf; in lpfc_sli4_rb_alloc() local 542 dma_buf = kzalloc(sizeof(struct hbq_dmabuf), GFP_KERNEL); in lpfc_sli4_rb_alloc() 543 if (!dma_buf) in lpfc_sli4_rb_alloc() 546 dma_buf->hbuf.virt = dma_pool_alloc(phba->lpfc_hrb_pool, GFP_KERNEL, in lpfc_sli4_rb_alloc() 547 &dma_buf->hbuf.phys); in lpfc_sli4_rb_alloc() 548 if (!dma_buf->hbuf.virt) { in lpfc_sli4_rb_alloc() 549 kfree(dma_buf); in lpfc_sli4_rb_alloc() 552 dma_buf->dbuf.virt = dma_pool_alloc(phba->lpfc_drb_pool, GFP_KERNEL, in lpfc_sli4_rb_alloc() 553 &dma_buf->dbuf.phys); in lpfc_sli4_rb_alloc() 554 if (!dma_buf->dbuf.virt) { in lpfc_sli4_rb_alloc() [all …]
|
/Linux-v5.10/drivers/scsi/csiostor/ |
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 …]
|
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-v5.10/drivers/dma-buf/ |
D | dma-buf.c | 43 struct dma_buf *dmabuf; in dmabuffs_dname() 59 struct dma_buf *dmabuf; in dma_buf_release() 117 struct dma_buf *dmabuf; in dma_buf_mmap_internal() 138 struct dma_buf *dmabuf; in dma_buf_llseek() 197 struct dma_buf *dmabuf; in dma_buf_poll() 329 static long dma_buf_set_name(struct dma_buf *dmabuf, const char __user *buf) in dma_buf_set_name() 356 struct dma_buf *dmabuf; in dma_buf_ioctl() 403 struct dma_buf *dmabuf = file->private_data; in dma_buf_show_fdinfo() 432 static struct file *dma_buf_getfile(struct dma_buf *dmabuf, int flags) in dma_buf_getfile() 506 struct dma_buf *dma_buf_export(const struct dma_buf_export_info *exp_info) in dma_buf_export() [all …]
|
/Linux-v5.10/drivers/dma-buf/heaps/ |
D | heap-helpers.c | 28 struct dma_buf *heap_helper_export_dmabuf(struct heap_helper_buffer *buffer, in heap_helper_export_dmabuf() 92 static int dma_heap_attach(struct dma_buf *dmabuf, in dma_heap_attach() 124 static void dma_heap_detach(struct dma_buf *dmabuf, in dma_heap_detach() 177 static int dma_heap_mmap(struct dma_buf *dmabuf, struct vm_area_struct *vma) in dma_heap_mmap() 190 static void dma_heap_dma_buf_release(struct dma_buf *dmabuf) in dma_heap_dma_buf_release() 197 static int dma_heap_dma_buf_begin_cpu_access(struct dma_buf *dmabuf, in dma_heap_dma_buf_begin_cpu_access() 218 static int dma_heap_dma_buf_end_cpu_access(struct dma_buf *dmabuf, in dma_heap_dma_buf_end_cpu_access() 238 static void *dma_heap_dma_buf_vmap(struct dma_buf *dmabuf) in dma_heap_dma_buf_vmap() 250 static void dma_heap_dma_buf_vunmap(struct dma_buf *dmabuf, void *vaddr) in dma_heap_dma_buf_vunmap()
|
/Linux-v5.10/drivers/xen/ |
D | gntdev-dmabuf.c | 35 struct dma_buf *dmabuf; 225 static int dmabuf_exp_ops_attach(struct dma_buf *dma_buf, in dmabuf_exp_ops_attach() argument 240 static void dmabuf_exp_ops_detach(struct dma_buf *dma_buf, in dmabuf_exp_ops_detach() argument 332 static void dmabuf_exp_ops_release(struct dma_buf *dma_buf) in dmabuf_exp_ops_release() argument 334 struct gntdev_dmabuf *gntdev_dmabuf = dma_buf->priv; in dmabuf_exp_ops_release() 582 struct dma_buf *dma_buf; in dmabuf_imp_to_refs() local 588 dma_buf = dma_buf_get(fd); in dmabuf_imp_to_refs() 589 if (IS_ERR(dma_buf)) in dmabuf_imp_to_refs() 590 return ERR_CAST(dma_buf); in dmabuf_imp_to_refs() 601 attach = dma_buf_attach(dma_buf, dev); in dmabuf_imp_to_refs() [all …]
|
/Linux-v5.10/drivers/i2c/busses/ |
D | i2c-qcom-geni.c | 356 void *dma_buf = NULL; in geni_i2c_rx_one_msg() local 361 dma_buf = i2c_get_dma_safe_msg_buf(msg, 32); in geni_i2c_rx_one_msg() 363 if (dma_buf) in geni_i2c_rx_one_msg() 370 if (dma_buf && geni_se_rx_dma_prep(se, dma_buf, len, &rx_dma)) { in geni_i2c_rx_one_msg() 372 i2c_put_dma_safe_msg_buf(dma_buf, msg, false); in geni_i2c_rx_one_msg() 373 dma_buf = NULL; in geni_i2c_rx_one_msg() 383 if (dma_buf) { in geni_i2c_rx_one_msg() 387 i2c_put_dma_safe_msg_buf(dma_buf, msg, !gi2c->err); in geni_i2c_rx_one_msg() 398 void *dma_buf = NULL; in geni_i2c_tx_one_msg() local 403 dma_buf = i2c_get_dma_safe_msg_buf(msg, 32); in geni_i2c_tx_one_msg() [all …]
|
D | i2c-stm32.c | 87 dma->dma_buf = 0; in stm32_i2c_dma_free() 121 dma->dma_buf = dma_map_single(chan_dev, buf, dma->dma_len, in stm32_i2c_prep_dma_xfer() 123 if (dma_mapping_error(chan_dev, dma->dma_buf)) { in stm32_i2c_prep_dma_xfer() 128 txdesc = dmaengine_prep_slave_single(dma->chan_using, dma->dma_buf, in stm32_i2c_prep_dma_xfer() 153 dma_unmap_single(chan_dev, dma->dma_buf, dma->dma_len, in stm32_i2c_prep_dma_xfer()
|
/Linux-v5.10/drivers/media/common/videobuf2/ |
D | videobuf2-vmalloc.c | 32 struct dma_buf *dbuf; 210 static int vb2_vmalloc_dmabuf_ops_attach(struct dma_buf *dbuf, in vb2_vmalloc_dmabuf_ops_attach() 249 static void vb2_vmalloc_dmabuf_ops_detach(struct dma_buf *dbuf, in vb2_vmalloc_dmabuf_ops_detach() 311 static void vb2_vmalloc_dmabuf_ops_release(struct dma_buf *dbuf) in vb2_vmalloc_dmabuf_ops_release() 317 static void *vb2_vmalloc_dmabuf_ops_vmap(struct dma_buf *dbuf) in vb2_vmalloc_dmabuf_ops_vmap() 324 static int vb2_vmalloc_dmabuf_ops_mmap(struct dma_buf *dbuf, in vb2_vmalloc_dmabuf_ops_mmap() 340 static struct dma_buf *vb2_vmalloc_get_dmabuf(void *buf_priv, unsigned long flags) in vb2_vmalloc_get_dmabuf() 343 struct dma_buf *dbuf; in vb2_vmalloc_get_dmabuf() 397 static void *vb2_vmalloc_attach_dmabuf(struct device *dev, struct dma_buf *dbuf, in vb2_vmalloc_attach_dmabuf()
|
/Linux-v5.10/drivers/gpu/drm/virtio/ |
D | virtgpu_prime.c | 30 static int virtgpu_virtio_get_uuid(struct dma_buf *buf, in virtgpu_virtio_get_uuid() 62 struct dma_buf *virtgpu_gem_prime_export(struct drm_gem_object *obj, in virtgpu_gem_prime_export() 65 struct dma_buf *buf; in virtgpu_gem_prime_export() 104 struct dma_buf *buf) in virtgpu_gem_prime_import()
|
/Linux-v5.10/drivers/mtd/nand/raw/ |
D | lpc32xx_mlc.c | 202 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-v5.10/drivers/net/wireless/mediatek/mt7601u/ |
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()
|