/linux-6.12.1/drivers/dma-buf/ |
D | dma-buf.c | 42 static void __dma_buf_debugfs_list_add(struct dma_buf *dmabuf) in __dma_buf_debugfs_list_add() argument 45 list_add(&dmabuf->list_node, &debugfs_list); in __dma_buf_debugfs_list_add() 49 static void __dma_buf_debugfs_list_del(struct dma_buf *dmabuf) in __dma_buf_debugfs_list_del() argument 51 if (!dmabuf) in __dma_buf_debugfs_list_del() 55 list_del(&dmabuf->list_node); in __dma_buf_debugfs_list_del() 59 static void __dma_buf_debugfs_list_add(struct dma_buf *dmabuf) in __dma_buf_debugfs_list_add() argument 70 struct dma_buf *dmabuf; in dmabuffs_dname() local 74 dmabuf = dentry->d_fsdata; in dmabuffs_dname() 75 spin_lock(&dmabuf->name_lock); in dmabuffs_dname() 76 if (dmabuf->name) in dmabuffs_dname() [all …]
|
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() local 70 dmabuf = sysfs_entry->dmabuf; in dma_buf_stats_attribute_show() 72 if (!dmabuf || !attribute->show) in dma_buf_stats_attribute_show() 75 return attribute->show(dmabuf, attribute, buf); in dma_buf_stats_attribute_show() 82 static ssize_t exporter_name_show(struct dma_buf *dmabuf, in exporter_name_show() argument 86 return sysfs_emit(buf, "%s\n", dmabuf->exp_name); in exporter_name_show() 89 static ssize_t size_show(struct dma_buf *dmabuf, in size_show() argument 93 return sysfs_emit(buf, "%zu\n", dmabuf->size); in size_show() 121 void dma_buf_stats_teardown(struct dma_buf *dmabuf) in dma_buf_stats_teardown() argument [all …]
|
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() argument 33 static inline void dma_buf_stats_teardown(struct dma_buf *dmabuf) {} in dma_buf_stats_teardown() argument
|
D | dma-heap.c | 55 struct dma_buf *dmabuf; in dma_heap_buffer_alloc() local 66 dmabuf = heap->ops->allocate(heap, len, fd_flags, heap_flags); in dma_heap_buffer_alloc() 67 if (IS_ERR(dmabuf)) in dma_heap_buffer_alloc() 68 return PTR_ERR(dmabuf); in dma_heap_buffer_alloc() 70 fd = dma_buf_fd(dmabuf, fd_flags); in dma_heap_buffer_alloc() 72 dma_buf_put(dmabuf); in dma_heap_buffer_alloc()
|
/linux-6.12.1/drivers/gpu/drm/i915/gem/selftests/ |
D | i915_gem_dmabuf.c | 22 struct dma_buf *dmabuf; in igt_dmabuf_export() local 28 dmabuf = i915_gem_prime_export(&obj->base, 0); in igt_dmabuf_export() 30 if (IS_ERR(dmabuf)) { in igt_dmabuf_export() 32 (int)PTR_ERR(dmabuf)); in igt_dmabuf_export() 33 return PTR_ERR(dmabuf); in igt_dmabuf_export() 36 dma_buf_put(dmabuf); in igt_dmabuf_export() 45 struct dma_buf *dmabuf; in igt_dmabuf_import_self() local 52 dmabuf = i915_gem_prime_export(&obj->base, 0); in igt_dmabuf_import_self() 53 if (IS_ERR(dmabuf)) { in igt_dmabuf_import_self() 55 (int)PTR_ERR(dmabuf)); in igt_dmabuf_import_self() [all …]
|
D | mock_dmabuf.c | 13 struct mock_dmabuf *mock = to_mock(attachment->dmabuf); in mock_map_dma_buf() 103 struct dma_buf *dmabuf; in mock_dmabuf() local 123 dmabuf = dma_buf_export(&exp_info); in mock_dmabuf() 124 if (IS_ERR(dmabuf)) in mock_dmabuf() 127 return dmabuf; in mock_dmabuf()
|
/linux-6.12.1/drivers/hid/ |
D | hid-elan.c | 80 unsigned char *dmabuf, unsigned char param) in elan_get_device_param() argument 84 dmabuf[0] = ELAN_FEATURE_REPORT; in elan_get_device_param() 85 dmabuf[1] = 0x05; in elan_get_device_param() 86 dmabuf[2] = 0x03; in elan_get_device_param() 87 dmabuf[3] = param; in elan_get_device_param() 88 dmabuf[4] = 0x01; in elan_get_device_param() 90 ret = hid_hw_raw_request(hdev, ELAN_FEATURE_REPORT, dmabuf, in elan_get_device_param() 98 ret = hid_hw_raw_request(hdev, ELAN_FEATURE_REPORT, dmabuf, in elan_get_device_param() 121 unsigned char *dmabuf; in elan_get_device_params() local 124 dmabuf = kmalloc(ELAN_FEATURE_SIZE, GFP_KERNEL); in elan_get_device_params() [all …]
|
/linux-6.12.1/samples/vfio-mdev/ |
D | mbochs.c | 820 struct mbochs_dmabuf *dmabuf = vma->vm_private_data; in mbochs_dmabuf_vm_fault() local 822 if (WARN_ON(vmf->pgoff >= dmabuf->pagecount)) in mbochs_dmabuf_vm_fault() 825 vmf->page = dmabuf->pages[vmf->pgoff]; in mbochs_dmabuf_vm_fault() 836 struct mbochs_dmabuf *dmabuf = buf->priv; in mbochs_mmap_dmabuf() local 837 struct device *dev = mdev_dev(dmabuf->mdev_state->mdev); in mbochs_mmap_dmabuf() 839 dev_dbg(dev, "%s: %d\n", __func__, dmabuf->id); in mbochs_mmap_dmabuf() 845 vma->vm_private_data = dmabuf; in mbochs_mmap_dmabuf() 849 static void mbochs_print_dmabuf(struct mbochs_dmabuf *dmabuf, in mbochs_print_dmabuf() argument 852 struct device *dev = mdev_dev(dmabuf->mdev_state->mdev); in mbochs_print_dmabuf() 853 u32 fourcc = dmabuf->mode.drm_format; in mbochs_print_dmabuf() [all …]
|
/linux-6.12.1/include/linux/ |
D | dma-buf.h | 286 int (*vmap)(struct dma_buf *dmabuf, struct iosys_map *map); 287 void (*vunmap)(struct dma_buf *dmabuf, struct iosys_map *map); 451 struct dma_buf *dmabuf; member 514 struct dma_buf *dmabuf; member 568 static inline void get_dma_buf(struct dma_buf *dmabuf) in get_dma_buf() argument 570 get_file(dmabuf->file); in get_dma_buf() 581 static inline bool dma_buf_is_dynamic(struct dma_buf *dmabuf) in dma_buf_is_dynamic() argument 583 return !!dmabuf->ops->pin; in dma_buf_is_dynamic() 600 struct dma_buf_attachment *dma_buf_attach(struct dma_buf *dmabuf, 603 dma_buf_dynamic_attach(struct dma_buf *dmabuf, struct device *dev, [all …]
|
/linux-6.12.1/drivers/infiniband/core/ |
D | umem_dmabuf.c | 24 dma_resv_assert_held(umem_dmabuf->attach->dmabuf->resv); in ib_umem_dmabuf_map_pages() 75 ret = dma_resv_wait_timeout(umem_dmabuf->attach->dmabuf->resv, in ib_umem_dmabuf_map_pages() 88 dma_resv_assert_held(umem_dmabuf->attach->dmabuf->resv); in ib_umem_dmabuf_unmap_pages() 123 struct dma_buf *dmabuf; in ib_umem_dmabuf_get_with_dma_device() local 135 dmabuf = dma_buf_get(fd); in ib_umem_dmabuf_get_with_dma_device() 136 if (IS_ERR(dmabuf)) in ib_umem_dmabuf_get_with_dma_device() 137 return ERR_CAST(dmabuf); in ib_umem_dmabuf_get_with_dma_device() 139 if (dmabuf->size < end) in ib_umem_dmabuf_get_with_dma_device() 159 dmabuf, in ib_umem_dmabuf_get_with_dma_device() 173 dma_buf_put(dmabuf); in ib_umem_dmabuf_get_with_dma_device() [all …]
|
/linux-6.12.1/drivers/dma-buf/heaps/ |
D | cma_heap.c | 50 static int cma_heap_attach(struct dma_buf *dmabuf, in cma_heap_attach() argument 53 struct cma_heap_buffer *buffer = dmabuf->priv; in cma_heap_attach() 83 static void cma_heap_detach(struct dma_buf *dmabuf, in cma_heap_detach() argument 86 struct cma_heap_buffer *buffer = dmabuf->priv; 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() argument 124 struct cma_heap_buffer *buffer = dmabuf->priv; in cma_heap_dma_buf_begin_cpu_access() 142 static int cma_heap_dma_buf_end_cpu_access(struct dma_buf *dmabuf, in cma_heap_dma_buf_end_cpu_access() argument 145 struct cma_heap_buffer *buffer = dmabuf->priv; in cma_heap_dma_buf_end_cpu_access() 178 static int cma_heap_mmap(struct dma_buf *dmabuf, struct vm_area_struct *vma) in cma_heap_mmap() argument 180 struct cma_heap_buffer *buffer = dmabuf->priv; in cma_heap_mmap() [all …]
|
D | system_heap.c | 82 static int system_heap_attach(struct dma_buf *dmabuf, in system_heap_attach() argument 85 struct system_heap_buffer *buffer = dmabuf->priv; in system_heap_attach() 113 static void system_heap_detach(struct dma_buf *dmabuf, in system_heap_detach() argument 116 struct system_heap_buffer *buffer = dmabuf->priv; in system_heap_detach() 153 static int system_heap_dma_buf_begin_cpu_access(struct dma_buf *dmabuf, in system_heap_dma_buf_begin_cpu_access() argument 156 struct system_heap_buffer *buffer = dmabuf->priv; in system_heap_dma_buf_begin_cpu_access() 174 static int system_heap_dma_buf_end_cpu_access(struct dma_buf *dmabuf, in system_heap_dma_buf_end_cpu_access() argument 177 struct system_heap_buffer *buffer = dmabuf->priv; in system_heap_dma_buf_end_cpu_access() 195 static int system_heap_mmap(struct dma_buf *dmabuf, struct vm_area_struct *vma) in system_heap_mmap() argument 197 struct system_heap_buffer *buffer = dmabuf->priv; in system_heap_mmap() [all …]
|
/linux-6.12.1/drivers/gpu/drm/ |
D | drm_prime.c | 382 struct dma_buf *dmabuf; in export_and_register_object() local 386 dmabuf = ERR_PTR(-ENOENT); in export_and_register_object() 387 return dmabuf; in export_and_register_object() 391 dmabuf = obj->funcs->export(obj, flags); in export_and_register_object() 393 dmabuf = drm_gem_prime_export(obj, flags); in export_and_register_object() 394 if (IS_ERR(dmabuf)) { in export_and_register_object() 398 return dmabuf; in export_and_register_object() 406 obj->dma_buf = dmabuf; in export_and_register_object() 409 return dmabuf; in export_and_register_object() 440 struct dma_buf *dmabuf; in drm_gem_prime_handle_to_dmabuf() local [all …]
|
/linux-6.12.1/drivers/media/platform/nvidia/tegra-vde/ |
D | dmabuf-cache.c | 34 struct dma_buf *dmabuf = entry->a->dmabuf; in tegra_vde_release_entry() local 42 dma_buf_detach(dmabuf, entry->a); in tegra_vde_release_entry() 43 dma_buf_put(dmabuf); in tegra_vde_release_entry() 64 struct dma_buf *dmabuf, in tegra_vde_dmabuf_cache_map() argument 79 if (entry->a->dmabuf != dmabuf) in tegra_vde_dmabuf_cache_map() 88 dma_buf_put(dmabuf); in tegra_vde_dmabuf_cache_map() 98 attachment = dma_buf_attach(dmabuf, dev); in tegra_vde_dmabuf_cache_map() 125 err = tegra_vde_iommu_map(vde, sgt, &iova, dmabuf->size); in tegra_vde_dmabuf_cache_map() 157 dma_buf_detach(dmabuf, attachment); in tegra_vde_dmabuf_cache_map()
|
/linux-6.12.1/drivers/comedi/drivers/ |
D | addi_apci_3120.c | 150 struct apci3120_dmabuf dmabuf[2]; member 172 struct apci3120_dmabuf *dmabuf) in apci3120_init_dma() argument 189 apci3120_addon_write(dev, dmabuf->hw, AMCC_OP_REG_AMWAR); in apci3120_init_dma() 192 apci3120_addon_write(dev, dmabuf->use_size, AMCC_OP_REG_AMWTC); in apci3120_init_dma() 208 struct apci3120_dmabuf *dmabuf0 = &devpriv->dmabuf[0]; in apci3120_setup_dma() 209 struct apci3120_dmabuf *dmabuf1 = &devpriv->dmabuf[1]; in apci3120_setup_dma() 430 struct apci3120_dmabuf *dmabuf; in apci3120_interrupt_dma() local 434 dmabuf = &devpriv->dmabuf[devpriv->cur_dmabuf]; in apci3120_interrupt_dma() 436 nbytes = dmabuf->use_size - inl(devpriv->amcc + AMCC_OP_REG_MWTC); in apci3120_interrupt_dma() 438 if (nbytes < dmabuf->use_size) in apci3120_interrupt_dma() [all …]
|
D | adl_pci9118.c | 227 struct pci9118_dmabuf dmabuf[2]; member 246 struct pci9118_dmabuf *dmabuf = &devpriv->dmabuf[buf]; in pci9118_amcc_setup_dma() local 249 outl(dmabuf->hw, devpriv->iobase_a + AMCC_OP_REG_MWAR); in pci9118_amcc_setup_dma() 250 outl(dmabuf->use_size, devpriv->iobase_a + AMCC_OP_REG_MWTC); in pci9118_amcc_setup_dma() 393 struct pci9118_dmabuf *dmabuf = &devpriv->dmabuf[next_buf]; in pci9118_ai_mode4_switch() local 398 comedi_8254_load(dev->pacer, 0, dmabuf->hw >> 1, in pci9118_ai_mode4_switch() 640 struct pci9118_dmabuf *dmabuf = &devpriv->dmabuf[devpriv->dma_actbuf]; in pci9118_ai_get_dma() local 641 unsigned int n_all = comedi_bytes_to_samples(s, dmabuf->use_size); in pci9118_ai_get_dma() 658 pci9118_ai_dma_xfer(dev, s, dmabuf->virt, n_all); in pci9118_ai_get_dma() 803 struct pci9118_dmabuf *dmabuf0 = &devpriv->dmabuf[0]; in pci9118_ai_setup_dma() [all …]
|
/linux-6.12.1/drivers/gpu/drm/xe/tests/ |
D | xe_dma_buf.c | 30 struct xe_bo *imported, struct dma_buf *dmabuf) in check_residency() argument 67 swap(exported->ttm.base.dma_buf, dmabuf); in check_residency() 69 swap(exported->ttm.base.dma_buf, dmabuf); in check_residency() 113 struct dma_buf *dmabuf; in xe_test_dmabuf_import_same_driver() local 136 dmabuf = xe_gem_prime_export(&bo->ttm.base, 0); in xe_test_dmabuf_import_same_driver() 137 if (IS_ERR(dmabuf)) { in xe_test_dmabuf_import_same_driver() 139 PTR_ERR(dmabuf)); in xe_test_dmabuf_import_same_driver() 143 import = xe_gem_prime_import(&xe->drm, dmabuf); in xe_test_dmabuf_import_same_driver() 173 check_residency(test, bo, import_bo, dmabuf); in xe_test_dmabuf_import_same_driver() 189 dma_buf_put(dmabuf); in xe_test_dmabuf_import_same_driver()
|
/linux-6.12.1/net/core/ |
D | devmem.c | 63 dma_buf_detach(binding->dmabuf, binding->attachment); in __net_devmem_dmabuf_binding_free() 64 dma_buf_put(binding->dmabuf); in __net_devmem_dmabuf_binding_free() 183 struct dma_buf *dmabuf; in net_devmem_bind_dmabuf() local 188 dmabuf = dma_buf_get(dmabuf_fd); in net_devmem_bind_dmabuf() 189 if (IS_ERR(dmabuf)) in net_devmem_bind_dmabuf() 190 return ERR_CAST(dmabuf); in net_devmem_bind_dmabuf() 211 binding->dmabuf = dmabuf; in net_devmem_bind_dmabuf() 213 binding->attachment = dma_buf_attach(binding->dmabuf, dev->dev.parent); in net_devmem_bind_dmabuf() 295 dma_buf_detach(dmabuf, binding->attachment); in net_devmem_bind_dmabuf() 301 dma_buf_put(dmabuf); in net_devmem_bind_dmabuf()
|
/linux-6.12.1/Documentation/ABI/testing/ |
D | sysfs-kernel-dmabuf-buffers | 1 What: /sys/kernel/dmabuf/buffers 5 Description: The /sys/kernel/dmabuf/buffers directory contains a 7 /sys/kernel/dmabuf/buffers/<inode_number> will contain the 12 What: /sys/kernel/dmabuf/buffers/<inode_number>/exporter_name 19 What: /sys/kernel/dmabuf/buffers/<inode_number>/size
|
/linux-6.12.1/drivers/scsi/lpfc/ |
D | lpfc_bsg.c | 893 struct lpfc_dmabuf *dmabuf = NULL; in lpfc_bsg_ct_unsol_event() local 983 dmabuf = bdeBuf1; in lpfc_bsg_ct_unsol_event() 986 dmabuf = bdeBuf2; in lpfc_bsg_ct_unsol_event() 996 dmabuf = lpfc_sli_ringpostbuf_get(phba, in lpfc_bsg_ct_unsol_event() 999 if (!dmabuf) { in lpfc_bsg_ct_unsol_event() 1014 dmabuf->virt, size); in lpfc_bsg_ct_unsol_event() 1020 dmabuf); in lpfc_bsg_ct_unsol_event() 1028 *)dmabuf); in lpfc_bsg_ct_unsol_event() 1037 dmabuf); in lpfc_bsg_ct_unsol_event() 1133 lpfc_bsg_ct_unsol_abort(struct lpfc_hba *phba, struct hbq_dmabuf *dmabuf) in lpfc_bsg_ct_unsol_abort() argument [all …]
|
/linux-6.12.1/drivers/iio/ |
D | industrialio-buffer.c | 1564 struct dma_buf *dmabuf = attach->dmabuf; in iio_buffer_dmabuf_release() local 1566 dma_resv_lock(dmabuf->resv, NULL); in iio_buffer_dmabuf_release() 1568 dma_resv_unlock(dmabuf->resv); in iio_buffer_dmabuf_release() 1572 dma_buf_detach(attach->dmabuf, attach); in iio_buffer_dmabuf_release() 1573 dma_buf_put(dmabuf); in iio_buffer_dmabuf_release() 1615 static int iio_dma_resv_lock(struct dma_buf *dmabuf, bool nonblock) in iio_dma_resv_lock() argument 1618 return dma_resv_lock_interruptible(dmabuf->resv, NULL); in iio_dma_resv_lock() 1620 if (!dma_resv_trylock(dmabuf->resv)) in iio_dma_resv_lock() 1628 struct dma_buf *dmabuf, bool nonblock) in iio_buffer_find_attachment() argument 1639 && priv->attach->dmabuf == dmabuf) { in iio_buffer_find_attachment() [all …]
|
/linux-6.12.1/Documentation/networking/ |
D | devmem.rst | 12 memory (dmabuf). The feature is currently implemented for TCP sockets. 102 The user must bind a dmabuf to any number of RX queues on a given NIC using 105 /* Bind dmabuf to NIC RX queue 15 */ 126 The netlink API returns a dmabuf_id: a unique ID that refers to this dmabuf 129 The user can unbind the dmabuf from the netdevice by closing the netlink socket 133 Note that any reasonably well-behaved dmabuf from any exporter should work with 134 devmem TCP, even if the dmabuf is not actually backed by devmem. An example of 135 this is udmabuf, which wraps user memory (non-devmem) in a dmabuf. 141 The socket must be flow steered to the dmabuf bound RX queue:: 157 Devmem data is received directly into the dmabuf bound to the NIC in 'NIC [all …]
|
/linux-6.12.1/drivers/gpu/drm/xe/ |
D | xe_dma_buf.c | 25 static int xe_dma_buf_attach(struct dma_buf *dmabuf, in xe_dma_buf_attach() argument 28 struct drm_gem_object *obj = attach->dmabuf->priv; in xe_dma_buf_attach() 41 static void xe_dma_buf_detach(struct dma_buf *dmabuf, in xe_dma_buf_detach() argument 44 struct drm_gem_object *obj = attach->dmabuf->priv; in xe_dma_buf_detach() 51 struct drm_gem_object *obj = attach->dmabuf->priv; in xe_dma_buf_pin() 83 struct drm_gem_object *obj = attach->dmabuf->priv; in xe_dma_buf_unpin() 92 struct dma_buf *dma_buf = attach->dmabuf; in xe_dma_buf_map() 148 struct dma_buf *dma_buf = attach->dmabuf; in xe_dma_buf_unmap()
|
/linux-6.12.1/sound/ppc/ |
D | beep.c | 213 void *dmabuf; in snd_pmac_attach_beep() local 219 dmabuf = dma_alloc_coherent(&chip->pdev->dev, BEEP_BUFLEN * 4, in snd_pmac_attach_beep() 222 if (! dmabuf || ! input_dev) in snd_pmac_attach_beep() 240 beep->buf = dmabuf; in snd_pmac_attach_beep() 259 if (dmabuf) in snd_pmac_attach_beep() 261 dmabuf, beep->addr); in snd_pmac_attach_beep()
|
/linux-6.12.1/drivers/xen/ |
D | gntdev-dmabuf.c | 30 struct dma_buf *dmabuf; member 262 struct gntdev_dmabuf *gntdev_dmabuf = attach->dmabuf->priv; in dmabuf_exp_ops_map_dma_buf() 385 gntdev_dmabuf->dmabuf = dma_buf_export(&exp_info); in dmabuf_exp_from_pages() 386 if (IS_ERR(gntdev_dmabuf->dmabuf)) { in dmabuf_exp_from_pages() 387 ret = PTR_ERR(gntdev_dmabuf->dmabuf); in dmabuf_exp_from_pages() 388 gntdev_dmabuf->dmabuf = NULL; in dmabuf_exp_from_pages() 392 ret = dma_buf_fd(gntdev_dmabuf->dmabuf, O_CLOEXEC); in dmabuf_exp_from_pages() 408 if (gntdev_dmabuf->dmabuf) in dmabuf_exp_from_pages() 409 dma_buf_put(gntdev_dmabuf->dmabuf); in dmabuf_exp_from_pages() 613 if (attach->dmabuf->size != gntdev_dmabuf->nr_pages << PAGE_SHIFT) { in dmabuf_imp_to_refs() [all …]
|