Home
last modified time | relevance | path

Searched refs:dma_buf (Results 1 – 25 of 109) sorted by relevance

12345

/linux/include/linux/
H A Ddma-buf.h28 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 Dvirtio_dma_buf.h24 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 Di915_gem_dmabuf.c22 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 Di915_gem_dmabuf.h11 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 Dvirtio_dma_buf.c20 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/vmwgfx/
H A Dttm_object.c96 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 Dvmwgfx_prime.c44 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/accel/ivpu/
H A Divpu_gem_userptr.c43 static void ivpu_gem_userptr_dmabuf_release(struct dma_buf *dma_buf) in ivpu_gem_userptr_dmabuf_release() argument
45 struct sg_table *sgt = dma_buf->priv; in ivpu_gem_userptr_dmabuf_release()
64 static struct dma_buf *
69 struct dma_buf *dma_buf; in ivpu_create_userptr_dmabuf() local
116 dma_buf = dma_buf_export(&exp_info); in ivpu_create_userptr_dmabuf()
117 if (IS_ERR(dma_buf)) { in ivpu_create_userptr_dmabuf()
118 ret = PTR_ERR(dma_buf); in ivpu_create_userptr_dmabuf()
124 return dma_buf; in ivpu_create_userptr_dmabuf()
142 struct dma_buf *dma_buf; in ivpu_bo_create_from_userptr() local
146 dma_buf = ivpu_create_userptr_dmabuf(vdev, user_ptr, size, flags); in ivpu_bo_create_from_userptr()
[all …]
/linux/drivers/gpu/drm/omapdrm/
H A Domap_gem_dmabuf.c40 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/gpu/drm/i915/gem/selftests/
H A Dmock_dmabuf.c54 static void mock_dmabuf_release(struct dma_buf *dma_buf) in mock_dmabuf_release() argument
56 struct mock_dmabuf *mock = to_mock(dma_buf); in mock_dmabuf_release()
65 static int mock_dmabuf_vmap(struct dma_buf *dma_buf, struct iosys_map *map) in mock_dmabuf_vmap() argument
67 struct mock_dmabuf *mock = to_mock(dma_buf); in mock_dmabuf_vmap()
78 static void mock_dmabuf_vunmap(struct dma_buf *dma_buf, struct iosys_map *map) in mock_dmabuf_vunmap() argument
80 struct mock_dmabuf *mock = to_mock(dma_buf); in mock_dmabuf_vunmap()
85 static int mock_dmabuf_mmap(struct dma_buf *dma_buf, struct vm_area_struct *vma) in mock_dmabuf_mmap() argument
99 static struct dma_buf *mock_dmabuf(int npages) in mock_dmabuf()
103 struct dma_buf *dmabuf; in mock_dmabuf()
/linux/drivers/gpu/drm/xe/
H A Dxe_dma_buf.c25 static int xe_dma_buf_attach(struct dma_buf *dmabuf, in xe_dma_buf_attach()
41 static void xe_dma_buf_detach(struct dma_buf *dmabuf, in xe_dma_buf_detach()
51 struct dma_buf *dmabuf = attach->dmabuf; in xe_dma_buf_pin()
100 struct dma_buf *dma_buf = attach->dmabuf; in xe_dma_buf_map() local
101 struct drm_gem_object *obj = dma_buf->priv; in xe_dma_buf_map()
166 static int xe_dma_buf_begin_cpu_access(struct dma_buf *dma_buf, in xe_dma_buf_begin_cpu_access() argument
169 struct drm_gem_object *obj = dma_buf->priv; in xe_dma_buf_begin_cpu_access()
196 static void xe_dma_buf_release(struct dma_buf *dmabuf) in xe_dma_buf_release()
222 struct dma_buf *xe_gem_prime_export(struct drm_gem_object *obj, int flags) in xe_gem_prime_export()
225 struct dma_buf *buf; in xe_gem_prime_export()
[all …]
H A Dxe_dma_buf.h11 struct dma_buf *xe_gem_prime_export(struct drm_gem_object *obj, int flags);
13 struct dma_buf *dma_buf);
/linux/drivers/scsi/lpfc/
H A Dlpfc_mem.c562 struct hbq_dmabuf *dma_buf; in lpfc_sli4_rb_alloc() local
564 dma_buf = kzalloc_obj(struct hbq_dmabuf); in lpfc_sli4_rb_alloc()
565 if (!dma_buf) in lpfc_sli4_rb_alloc()
568 dma_buf->hbuf.virt = dma_pool_alloc(phba->lpfc_hrb_pool, GFP_KERNEL, in lpfc_sli4_rb_alloc()
569 &dma_buf->hbuf.phys); in lpfc_sli4_rb_alloc()
570 if (!dma_buf->hbuf.virt) { in lpfc_sli4_rb_alloc()
571 kfree(dma_buf); in lpfc_sli4_rb_alloc()
574 dma_buf->dbuf.virt = dma_pool_alloc(phba->lpfc_drb_pool, GFP_KERNEL, in lpfc_sli4_rb_alloc()
575 &dma_buf->dbuf.phys); in lpfc_sli4_rb_alloc()
576 if (!dma_buf->dbuf.virt) { in lpfc_sli4_rb_alloc()
[all …]
/linux/drivers/dma-buf/
H A Ddma-buf.c67 static void __dma_buf_list_add(struct dma_buf *dmabuf) in __dma_buf_list_add()
74 static void __dma_buf_list_del(struct dma_buf *dmabuf) in __dma_buf_list_del()
96 struct dma_buf *dma_buf_iter_begin(void) in dma_buf_iter_begin()
98 struct dma_buf *ret = NULL, *dmabuf; in dma_buf_iter_begin()
129 struct dma_buf *dma_buf_iter_next(struct dma_buf *dmabuf) in dma_buf_iter_next()
131 struct dma_buf *ret = NULL; in dma_buf_iter_next()
152 struct dma_buf *dmabuf; in dmabuffs_dname()
168 struct dma_buf *dmabuf; in dma_buf_release()
230 struct dma_buf *dmabuf; in dma_buf_mmap_internal()
253 struct dma_buf *dmabuf; in dma_buf_llseek()
[all …]
/linux/kernel/bpf/
H A Ddmabuf_iter.c16 struct dma_buf *dmabuf;
24 struct dma_buf *dmabuf = p->dmabuf; in dmabuf_iter_seq_start()
42 struct dma_buf *dmabuf = v; in dmabuf_iter_seq_next()
51 __bpf_md_ptr(struct dma_buf *, dmabuf);
78 struct dma_buf *dmabuf = v; in dmabuf_iter_seq_stop()
135 DEFINE_BPF_ITER_FUNC(dmabuf, struct bpf_iter_meta *meta, struct dma_buf *dmabuf) in DEFINE_BPF_ITER_FUNC()
136 BTF_ID_LIST_SINGLE(bpf_dmabuf_btf_id, struct, dma_buf) in DEFINE_BPF_ITER_FUNC()
156 struct dma_buf *dmabuf;
172 __bpf_kfunc struct dma_buf *bpf_iter_dmabuf_next(struct bpf_iter_dmabuf *it) in bpf_iter_dmabuf_next()
/linux/drivers/scsi/csiostor/
H A Dcsio_scsi.c206 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 Dcsio_lnode.c278 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/xen/
H A Dgntdev-dmabuf.c30 struct dma_buf *dmabuf;
220 static int dmabuf_exp_ops_attach(struct dma_buf *dma_buf, in dmabuf_exp_ops_attach() argument
234 static void dmabuf_exp_ops_detach(struct dma_buf *dma_buf, in dmabuf_exp_ops_detach() argument
326 static void dmabuf_exp_ops_release(struct dma_buf *dma_buf) in dmabuf_exp_ops_release() argument
328 struct gntdev_dmabuf *gntdev_dmabuf = dma_buf->priv; in dmabuf_exp_ops_release()
560 struct dma_buf *dma_buf; in dmabuf_imp_to_refs() local
567 dma_buf = dma_buf_get(fd); in dmabuf_imp_to_refs()
568 if (IS_ERR(dma_buf)) in dmabuf_imp_to_refs()
569 return ERR_CAST(dma_buf); in dmabuf_imp_to_refs()
580 attach = dma_buf_attach(dma_buf, dev); in dmabuf_imp_to_refs()
[all …]
/linux/drivers/iio/adc/
H A Dnxp-sar-adc.c141 struct circ_buf dma_buf; member
585 struct circ_buf *dma_buf; in nxp_sar_adc_dma_cb() local
593 dma_buf = &info->dma_buf; in nxp_sar_adc_dma_cb()
594 dma_samples = (u32 *)dma_buf->buf; in nxp_sar_adc_dma_cb()
615 dma_buf->head = (NXP_SAR_ADC_DMA_BUFF_SZ - state.residue) / in nxp_sar_adc_dma_cb()
620 dma_buf->head--; in nxp_sar_adc_dma_cb()
625 dma_buf->head -= dma_buf->head % info->channels_used; in nxp_sar_adc_dma_cb()
631 while (dma_buf->tail != dma_buf->head) { in nxp_sar_adc_dma_cb()
632 idx = dma_buf->tail % info->channels_used; in nxp_sar_adc_dma_cb()
633 info->buffer[idx] = dma_samples[dma_buf->tail]; in nxp_sar_adc_dma_cb()
[all …]
/linux/drivers/gpu/drm/tegra/
H A Dgem.c79 if (obj->dma_buf) { in tegra_bo_pin()
80 struct dma_buf *buf = obj->dma_buf; in tegra_bo_pin()
187 if (obj->dma_buf) { in tegra_bo_mmap()
188 ret = dma_buf_vmap_unlocked(obj->dma_buf, &map); in tegra_bo_mmap()
211 if (obj->dma_buf) in tegra_bo_munmap()
212 return dma_buf_vunmap_unlocked(obj->dma_buf, &map); in tegra_bo_munmap()
457 struct dma_buf *buf) in tegra_bo_import()
493 bo->dma_buf = buf; in tegra_bo_import()
536 if (bo->dma_buf) in tegra_bo_free_object()
537 dma_buf_put(bo->dma_buf); in tegra_bo_free_object()
[all …]
/linux/drivers/gpu/drm/panthor/
H A Dpanthor_gem.c261 panthor_gem_prime_begin_cpu_access(struct dma_buf *dma_buf, in panthor_gem_prime_begin_cpu_access() argument
264 struct drm_gem_object *obj = dma_buf->priv; in panthor_gem_prime_begin_cpu_access()
276 list_for_each_entry(attach, &dma_buf->attachments, node) { in panthor_gem_prime_begin_cpu_access()
288 panthor_gem_prime_end_cpu_access(struct dma_buf *dma_buf, in panthor_gem_prime_end_cpu_access() argument
291 struct drm_gem_object *obj = dma_buf->priv; in panthor_gem_prime_end_cpu_access()
297 list_for_each_entry(attach, &dma_buf->attachments, node) { in panthor_gem_prime_end_cpu_access()
327 static struct dma_buf *
350 struct dma_buf *dma_buf) in panthor_gem_prime_import() argument
352 struct drm_gem_object *obj = dma_buf->priv; in panthor_gem_prime_import()
354 if (dma_buf->ops == &panthor_dma_buf_ops && obj->dev == dev) { in panthor_gem_prime_import()
[all …]
/linux/drivers/gpu/drm/amd/amdgpu/
H A Damdgpu_dma_buf.h28 struct dma_buf *amdgpu_gem_prime_export(struct drm_gem_object *gobj,
31 struct dma_buf *dma_buf);
/linux/drivers/media/common/videobuf2/
H A Dvideobuf2-vmalloc.c32 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/i2c/busses/
H A Di2c-stm32.c86 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/mtd/nand/raw/
H A Dlpc32xx_mlc.c201 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 …]

12345