Home
last modified time | relevance | path

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

123456

/linux/drivers/gpu/drm/
A Ddrm_prime.c94 struct dma_buf *dma_buf; member
112 member->dma_buf = dma_buf; in drm_prime_add_buf_handle()
122 if (dma_buf > pos->dma_buf) in drm_prime_add_buf_handle()
170 struct dma_buf *dma_buf, in drm_prime_lookup_buf_handle() argument
180 if (member->dma_buf == dma_buf) { in drm_prime_lookup_buf_handle()
194 struct dma_buf *dma_buf) in drm_prime_remove_buf_handle_locked() argument
203 if (member->dma_buf == dma_buf) { in drm_prime_remove_buf_handle_locked()
247 struct dma_buf *dma_buf; in drm_gem_dmabuf_export() local
300 struct dma_buf *dma_buf; in drm_gem_prime_fd_to_handle() local
329 obj->dma_buf = dma_buf; in drm_gem_prime_fd_to_handle()
[all …]
/linux/include/linux/
A Ddma-buf.h27 struct dma_buf;
203 void (*release)(struct dma_buf *);
302 struct dma_buf { struct
453 struct dma_buf *dmabuf; argument
516 struct dma_buf *dmabuf;
608 void dma_buf_detach(struct dma_buf *dmabuf,
616 struct dma_buf *dma_buf_get(int fd);
617 void dma_buf_put(struct dma_buf *dmabuf);
623 void dma_buf_move_notify(struct dma_buf *dma_buf);
624 int dma_buf_begin_cpu_access(struct dma_buf *dma_buf,
[all …]
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/include/drm/
A Ddrm_prime.h55 struct dma_buf;
66 struct dma_buf *drm_gem_dmabuf_export(struct drm_device *dev,
68 void drm_gem_dmabuf_release(struct dma_buf *dma_buf);
77 int drm_gem_map_attach(struct dma_buf *dma_buf,
79 void drm_gem_map_detach(struct dma_buf *dma_buf,
86 int drm_gem_dmabuf_vmap(struct dma_buf *dma_buf, struct dma_buf_map *map);
87 void drm_gem_dmabuf_vunmap(struct dma_buf *dma_buf, struct dma_buf_map *map);
90 int drm_gem_dmabuf_mmap(struct dma_buf *dma_buf, struct vm_area_struct *vma);
94 struct dma_buf *drm_gem_prime_export(struct drm_gem_object *obj,
101 struct dma_buf *dma_buf,
[all …]
/linux/drivers/gpu/drm/i915/gem/
A Di915_gem_dmabuf.c77 static int i915_gem_dmabuf_vmap(struct dma_buf *dma_buf, struct dma_buf_map *map) in i915_gem_dmabuf_vmap() argument
91 static void i915_gem_dmabuf_vunmap(struct dma_buf *dma_buf, struct dma_buf_map *map) in i915_gem_dmabuf_vunmap() argument
99 static int i915_gem_dmabuf_mmap(struct dma_buf *dma_buf, struct vm_area_struct *vma) in i915_gem_dmabuf_mmap() argument
119 static int i915_gem_begin_cpu_access(struct dma_buf *dma_buf, enum dma_data_direction direction) in i915_gem_begin_cpu_access() argument
144 static int i915_gem_end_cpu_access(struct dma_buf *dma_buf, enum dma_data_direction direction) in i915_gem_end_cpu_access() argument
275 struct dma_buf *dma_buf) in i915_gem_prime_import() argument
284 obj = dma_buf_to_obj(dma_buf); in i915_gem_prime_import()
304 get_dma_buf(dma_buf); in i915_gem_prime_import()
316 obj->base.resv = dma_buf->resv; in i915_gem_prime_import()
331 dma_buf_detach(dma_buf, attach); in i915_gem_prime_import()
[all …]
/linux/drivers/virtio/
A Dvirtio_dma_buf.c20 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/drivers/gpu/drm/amd/amdgpu/
A Damdgpu_dma_buf.c156 struct dma_buf *dma_buf = attach->dmabuf; in amdgpu_dma_buf_map() local
249 static int amdgpu_dma_buf_begin_cpu_access(struct dma_buf *dma_buf, in amdgpu_dma_buf_begin_cpu_access() argument
306 struct dma_buf *buf; in amdgpu_gem_prime_export()
332 amdgpu_dma_buf_create_obj(struct drm_device *dev, struct dma_buf *dma_buf) in amdgpu_dma_buf_create_obj() argument
334 struct dma_resv *resv = dma_buf->resv; in amdgpu_dma_buf_create_obj()
446 struct dma_buf *dma_buf) in amdgpu_gem_prime_import() argument
452 obj = dma_buf->priv; in amdgpu_gem_prime_import()
474 get_dma_buf(dma_buf); in amdgpu_gem_prime_import()
495 struct dma_buf *dma_buf = obj->import_attach->dmabuf; in amdgpu_dmabuf_is_xgmi_accessible() local
497 if (dma_buf->ops != &amdgpu_dmabuf_ops) in amdgpu_dmabuf_is_xgmi_accessible()
[all …]
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/gpu/drm/vmwgfx/
A Dttm_object.c98 void (*dmabuf_release)(struct dma_buf *dma_buf);
134 static void ttm_prime_dmabuf_release(struct dma_buf *dma_buf);
623 static void ttm_prime_dmabuf_release(struct dma_buf *dma_buf) in ttm_prime_dmabuf_release() argument
633 if (prime->dma_buf == dma_buf) in ttm_prime_dmabuf_release()
655 struct dma_buf *dma_buf; in ttm_prime_fd_to_handle() local
661 if (IS_ERR(dma_buf)) in ttm_prime_fd_to_handle()
672 dma_buf_put(dma_buf); in ttm_prime_fd_to_handle()
692 struct dma_buf *dma_buf; in ttm_prime_handle_to_fd() local
715 dma_buf = prime->dma_buf; in ttm_prime_handle_to_fd()
716 if (!dma_buf || !get_dma_buf_unless_doomed(dma_buf)) { in ttm_prime_handle_to_fd()
[all …]
A Dvmwgfx_prime.c42 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/drivers/gpu/drm/i915/gem/selftests/
A Dmock_dmabuf.c53 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 int mock_dmabuf_vmap(struct dma_buf *dma_buf, struct dma_buf_map *map) in mock_dmabuf_vmap() argument
66 struct mock_dmabuf *mock = to_mock(dma_buf); in mock_dmabuf_vmap()
77 static void mock_dmabuf_vunmap(struct dma_buf *dma_buf, struct dma_buf_map *map) in mock_dmabuf_vunmap() argument
79 struct mock_dmabuf *mock = to_mock(dma_buf); in mock_dmabuf_vunmap()
84 static int mock_dmabuf_mmap(struct dma_buf *dma_buf, struct vm_area_struct *vma) in mock_dmabuf_mmap() argument
98 static struct dma_buf *mock_dmabuf(int npages) in mock_dmabuf()
102 struct dma_buf *dmabuf; in mock_dmabuf()
/linux/drivers/gpu/drm/omapdrm/
A Domap_gem_dmabuf.c67 static int omap_gem_dmabuf_begin_cpu_access(struct dma_buf *buffer, in omap_gem_dmabuf_begin_cpu_access()
82 static int omap_gem_dmabuf_end_cpu_access(struct dma_buf *buffer, in omap_gem_dmabuf_end_cpu_access()
90 static int omap_gem_dmabuf_mmap(struct dma_buf *buffer, in omap_gem_dmabuf_mmap()
129 struct dma_buf *dma_buf) in omap_gem_prime_import() argument
136 if (dma_buf->ops == &omap_dmabuf_ops) { in omap_gem_prime_import()
137 obj = dma_buf->priv; in omap_gem_prime_import()
148 attach = dma_buf_attach(dma_buf, dev->dev); in omap_gem_prime_import()
152 get_dma_buf(dma_buf); in omap_gem_prime_import()
160 obj = omap_gem_new_dmabuf(dev, dma_buf->size, sgt); in omap_gem_prime_import()
173 dma_buf_detach(dma_buf, attach); in omap_gem_prime_import()
[all …]
/linux/drivers/scsi/lpfc/
A Dlpfc_mem.c557 if (!dma_buf) in lpfc_sli4_rb_alloc()
562 if (!dma_buf->hbuf.virt) { in lpfc_sli4_rb_alloc()
563 kfree(dma_buf); in lpfc_sli4_rb_alloc()
568 if (!dma_buf->dbuf.virt) { in lpfc_sli4_rb_alloc()
571 kfree(dma_buf); in lpfc_sli4_rb_alloc()
575 return dma_buf; in lpfc_sli4_rb_alloc()
614 dma_buf = kzalloc(sizeof(*dma_buf), GFP_KERNEL); in lpfc_sli4_nvmet_alloc()
615 if (!dma_buf) in lpfc_sli4_nvmet_alloc()
621 kfree(dma_buf); in lpfc_sli4_nvmet_alloc()
629 kfree(dma_buf); in lpfc_sli4_nvmet_alloc()
[all …]
/linux/drivers/dma-buf/
A Ddma-buf.c45 struct dma_buf *dmabuf; in dmabuffs_dname()
61 struct dma_buf *dmabuf; in dma_buf_release()
90 struct dma_buf *dmabuf; in dma_buf_file_release()
130 struct dma_buf *dmabuf; in dma_buf_mmap_internal()
151 struct dma_buf *dmabuf; in dma_buf_llseek()
200 struct dma_buf *dmabuf = container_of(dcb->poll, struct dma_buf, poll); in dma_buf_poll_cb()
232 struct dma_buf *dmabuf; in dma_buf_poll()
342 struct dma_buf *dmabuf; in dma_buf_ioctl()
496 struct dma_buf *dmabuf; in dma_buf_export()
618 struct dma_buf *dma_buf_get(int fd) in dma_buf_get()
[all …]
A Ddma-buf-sysfs-stats.h16 int dma_buf_stats_setup(struct dma_buf *dmabuf);
18 void dma_buf_stats_teardown(struct dma_buf *dmabuf);
28 static inline int dma_buf_stats_setup(struct dma_buf *dmabuf) in dma_buf_stats_setup()
33 static inline void dma_buf_stats_teardown(struct dma_buf *dmabuf) {} in dma_buf_stats_teardown()
A Ddma-buf-sysfs-stats.c55 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) in dma_buf_stats_setup()
/linux/drivers/scsi/csiostor/
A Dcsio_scsi.c222 dma_buf = &req->dma_buf; in csio_scsi_init_cmd_wr()
381 dma_buf = &req->dma_buf; in csio_scsi_init_read_wr()
434 dma_buf = &req->dma_buf; in csio_scsi_init_write_wr()
1585 dma_buf = &req->dma_buf; in csio_scsi_err_handler()
2043 dma_buf = &req->dma_buf; in csio_tm_cbfn()
2446 dma_buf = &ioreq->dma_buf; in csio_scsim_init()
2448 &dma_buf->paddr); in csio_scsim_init()
2449 if (!dma_buf->vaddr) { in csio_scsim_init()
2486 dma_buf = &ioreq->dma_buf; in csio_scsim_init()
2488 dma_buf->paddr); in csio_scsim_init()
[all …]
/linux/drivers/i2c/busses/
A Di2c-qcom-geni.c89 void *dma_buf; member
383 void *dma_buf; in geni_i2c_rx_one_msg() local
389 if (dma_buf) in geni_i2c_rx_one_msg()
397 if (dma_buf && geni_se_rx_dma_prep(se, dma_buf, len, &rx_dma)) { in geni_i2c_rx_one_msg()
400 dma_buf = NULL; in geni_i2c_rx_one_msg()
404 gi2c->dma_buf = dma_buf; in geni_i2c_rx_one_msg()
422 void *dma_buf; in geni_i2c_tx_one_msg() local
428 if (dma_buf) in geni_i2c_tx_one_msg()
436 if (dma_buf && geni_se_tx_dma_prep(se, dma_buf, len, &tx_dma)) { in geni_i2c_tx_one_msg()
439 dma_buf = NULL; in geni_i2c_tx_one_msg()
[all …]
A Di2c-stm32.c87 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/drivers/xen/
A Dgntdev-dmabuf.c38 struct dma_buf *dmabuf;
228 static int dmabuf_exp_ops_attach(struct dma_buf *dma_buf, in dmabuf_exp_ops_attach() argument
243 static void dmabuf_exp_ops_detach(struct dma_buf *dma_buf, in dmabuf_exp_ops_detach() argument
335 static void dmabuf_exp_ops_release(struct dma_buf *dma_buf) in dmabuf_exp_ops_release() argument
585 struct dma_buf *dma_buf; in dmabuf_imp_to_refs() local
591 dma_buf = dma_buf_get(fd); in dmabuf_imp_to_refs()
592 if (IS_ERR(dma_buf)) in dmabuf_imp_to_refs()
676 dma_buf_put(dma_buf); in dmabuf_imp_to_refs()
706 struct dma_buf *dma_buf; in dmabuf_imp_release() local
722 dma_buf = attach->dmabuf; in dmabuf_imp_release()
[all …]
/linux/drivers/dma-buf/heaps/
A Dcma_heap.c50 static int cma_heap_attach(struct dma_buf *dmabuf, in cma_heap_attach()
83 static void cma_heap_detach(struct dma_buf *dmabuf, in cma_heap_detach()
121 static int cma_heap_dma_buf_begin_cpu_access(struct dma_buf *dmabuf, in cma_heap_dma_buf_begin_cpu_access()
141 static int cma_heap_dma_buf_end_cpu_access(struct dma_buf *dmabuf, in cma_heap_dma_buf_end_cpu_access()
179 static int cma_heap_mmap(struct dma_buf *dmabuf, struct vm_area_struct *vma) in cma_heap_mmap()
203 static int cma_heap_vmap(struct dma_buf *dmabuf, struct dma_buf_map *map) in cma_heap_vmap()
230 static void cma_heap_vunmap(struct dma_buf *dmabuf, struct dma_buf_map *map) in cma_heap_vunmap()
243 static void cma_heap_dma_buf_release(struct dma_buf *dmabuf) in cma_heap_dma_buf_release()
274 static struct dma_buf *cma_heap_allocate(struct dma_heap *heap, in cma_heap_allocate()
286 struct dma_buf *dmabuf; in cma_heap_allocate()
A Dsystem_heap.c83 static int system_heap_attach(struct dma_buf *dmabuf, in system_heap_attach()
114 static void system_heap_detach(struct dma_buf *dmabuf, in system_heap_detach()
154 static int system_heap_dma_buf_begin_cpu_access(struct dma_buf *dmabuf, in system_heap_dma_buf_begin_cpu_access()
175 static int system_heap_dma_buf_end_cpu_access(struct dma_buf *dmabuf, in system_heap_dma_buf_end_cpu_access()
196 static int system_heap_mmap(struct dma_buf *dmabuf, struct vm_area_struct *vma) in system_heap_mmap()
244 static int system_heap_vmap(struct dma_buf *dmabuf, struct dma_buf_map *map) in system_heap_vmap()
272 static void system_heap_vunmap(struct dma_buf *dmabuf, struct dma_buf_map *map) in system_heap_vunmap()
285 static void system_heap_dma_buf_release(struct dma_buf *dmabuf) in system_heap_dma_buf_release()
335 static struct dma_buf *system_heap_allocate(struct dma_heap *heap, in system_heap_allocate()
344 struct dma_buf *dmabuf; in system_heap_allocate()
/linux/drivers/media/common/videobuf2/
A Dvideobuf2-vmalloc.c32 struct dma_buf *dbuf;
208 static int vb2_vmalloc_dmabuf_ops_attach(struct dma_buf *dbuf, in vb2_vmalloc_dmabuf_ops_attach()
247 static void vb2_vmalloc_dmabuf_ops_detach(struct dma_buf *dbuf, in vb2_vmalloc_dmabuf_ops_detach()
309 static void vb2_vmalloc_dmabuf_ops_release(struct dma_buf *dbuf) in vb2_vmalloc_dmabuf_ops_release()
315 static int vb2_vmalloc_dmabuf_ops_vmap(struct dma_buf *dbuf, struct dma_buf_map *map) 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(struct vb2_buffer *vb, in vb2_vmalloc_get_dmabuf()
345 struct dma_buf *dbuf; in vb2_vmalloc_get_dmabuf()
408 struct dma_buf *dbuf, in vb2_vmalloc_attach_dmabuf()
/linux/drivers/mtd/nand/raw/
A Dlpc32xx_mlc.c201 uint8_t *dma_buf; member
442 uint8_t *dma_buf; in lpc32xx_read_page() local
446 dma_buf = buf; in lpc32xx_read_page()
449 dma_buf = host->dma_buf; in lpc32xx_read_page()
475 res = lpc32xx_xmit_dma(mtd, dma_buf + i * 512, 512, in lpc32xx_read_page()
494 memcpy(buf, dma_buf, mtd->writesize); in lpc32xx_read_page()
506 uint8_t *dma_buf = (uint8_t *)buf; in lpc32xx_write_page_lowlevel() local
511 dma_buf = host->dma_buf; in lpc32xx_write_page_lowlevel()
512 memcpy(dma_buf, buf, mtd->writesize); in lpc32xx_write_page_lowlevel()
523 res = lpc32xx_xmit_dma(mtd, dma_buf + i * 512, 512, in lpc32xx_write_page_lowlevel()
[all …]
/linux/drivers/net/ethernet/microsoft/mana/
A Dhw_channel.c390 struct hwc_dma_buf *dma_buf; in mana_hwc_alloc_dma_buf() local
398 dma_buf = kzalloc(struct_size(dma_buf, reqs, q_depth), GFP_KERNEL); in mana_hwc_alloc_dma_buf()
399 if (!dma_buf) in mana_hwc_alloc_dma_buf()
402 dma_buf->num_reqs = q_depth; in mana_hwc_alloc_dma_buf()
406 gmi = &dma_buf->mem_info; in mana_hwc_alloc_dma_buf()
417 hwc_wr = &dma_buf->reqs[i]; in mana_hwc_alloc_dma_buf()
425 *dma_buf_ptr = dma_buf; in mana_hwc_alloc_dma_buf()
428 kfree(dma_buf); in mana_hwc_alloc_dma_buf()
433 struct hwc_dma_buf *dma_buf) in mana_hwc_dealloc_dma_buf() argument
435 if (!dma_buf) in mana_hwc_dealloc_dma_buf()
[all …]

Completed in 58 milliseconds

123456