/kernel/linux/linux-5.10/drivers/dma-buf/ |
D | dma-buf.c | 46 struct dma_buf *dmabuf; in dmabuffs_dname() local 50 dmabuf = dentry->d_fsdata; in dmabuffs_dname() 51 spin_lock(&dmabuf->name_lock); in dmabuffs_dname() 52 if (dmabuf->name) in dmabuffs_dname() 53 ret = strlcpy(name, dmabuf->name, DMA_BUF_NAME_LEN); in dmabuffs_dname() 54 spin_unlock(&dmabuf->name_lock); in dmabuffs_dname() 62 struct dma_buf *dmabuf; in dma_buf_release() local 64 dmabuf = dentry->d_fsdata; in dma_buf_release() 65 if (unlikely(!dmabuf)) in dma_buf_release() 68 BUG_ON(dmabuf->vmapping_counter); in dma_buf_release() [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); 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() argument 33 static inline void dma_buf_stats_teardown(struct dma_buf *dmabuf) {} in dma_buf_stats_teardown() argument
|
D | Kconfig | 34 bool "userspace dmabuf misc driver" 60 bool "Show dmabuf usage of all processes" 65 Choose this option to show dmabuf objects usage of all processes. 66 Firstly, with this option, when a process creates a dmabuf object, 67 its pid and task_comm will be recorded in the dmabuf. 70 (if PROC_FS enabled) to show dmabuf objects usage of all processes. 86 in location /sys/kernel/dmabuf/buffers. 88 /sys/kernel/dmabuf/buffers/<inode_number> will contain
|
/kernel/linux/linux-5.10/drivers/gpu/drm/i915/gem/selftests/ |
D | i915_gem_dmabuf.c | 17 struct dma_buf *dmabuf; in igt_dmabuf_export() local 23 dmabuf = i915_gem_prime_export(&obj->base, 0); in igt_dmabuf_export() 25 if (IS_ERR(dmabuf)) { in igt_dmabuf_export() 27 (int)PTR_ERR(dmabuf)); in igt_dmabuf_export() 28 return PTR_ERR(dmabuf); in igt_dmabuf_export() 31 dma_buf_put(dmabuf); in igt_dmabuf_export() 40 struct dma_buf *dmabuf; in igt_dmabuf_import_self() local 47 dmabuf = i915_gem_prime_export(&obj->base, 0); in igt_dmabuf_import_self() 48 if (IS_ERR(dmabuf)) { in igt_dmabuf_import_self() 50 (int)PTR_ERR(dmabuf)); in igt_dmabuf_import_self() [all …]
|
D | mock_dmabuf.c | 12 struct mock_dmabuf *mock = to_mock(attachment->dmabuf); in mock_map_dma_buf() 96 struct dma_buf *dmabuf; in mock_dmabuf() local 116 dmabuf = dma_buf_export(&exp_info); in mock_dmabuf() 117 if (IS_ERR(dmabuf)) in mock_dmabuf() 120 return dmabuf; in mock_dmabuf()
|
/kernel/linux/linux-5.10/samples/vfio-mdev/ |
D | mbochs.c | 789 struct mbochs_dmabuf *dmabuf = vma->vm_private_data; in mbochs_dmabuf_vm_fault() local 791 if (WARN_ON(vmf->pgoff >= dmabuf->pagecount)) in mbochs_dmabuf_vm_fault() 794 vmf->page = dmabuf->pages[vmf->pgoff]; in mbochs_dmabuf_vm_fault() 805 struct mbochs_dmabuf *dmabuf = buf->priv; in mbochs_mmap_dmabuf() local 806 struct device *dev = mdev_dev(dmabuf->mdev_state->mdev); in mbochs_mmap_dmabuf() 808 dev_dbg(dev, "%s: %d\n", __func__, dmabuf->id); in mbochs_mmap_dmabuf() 814 vma->vm_private_data = dmabuf; in mbochs_mmap_dmabuf() 818 static void mbochs_print_dmabuf(struct mbochs_dmabuf *dmabuf, in mbochs_print_dmabuf() argument 821 struct device *dev = mdev_dev(dmabuf->mdev_state->mdev); in mbochs_print_dmabuf() 822 u32 fourcc = dmabuf->mode.drm_format; in mbochs_print_dmabuf() [all …]
|
/kernel/linux/linux-5.10/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 …]
|
/kernel/linux/linux-5.10/drivers/dma-buf/heaps/ |
D | heap-helpers.c | 93 static int dma_heap_attach(struct dma_buf *dmabuf, in dma_heap_attach() argument 97 struct heap_helper_buffer *buffer = dmabuf->priv; in dma_heap_attach() 125 static void dma_heap_detach(struct dma_buf *dmabuf, in dma_heap_detach() argument 129 struct heap_helper_buffer *buffer = dmabuf->priv; in dma_heap_detach() 178 static int dma_heap_mmap(struct dma_buf *dmabuf, struct vm_area_struct *vma) in dma_heap_mmap() argument 180 struct heap_helper_buffer *buffer = dmabuf->priv; in dma_heap_mmap() 191 static void dma_heap_dma_buf_release(struct dma_buf *dmabuf) in dma_heap_dma_buf_release() argument 193 struct heap_helper_buffer *buffer = dmabuf->priv; in dma_heap_dma_buf_release() 198 static int dma_heap_dma_buf_begin_cpu_access(struct dma_buf *dmabuf, in dma_heap_dma_buf_begin_cpu_access() argument 201 struct heap_helper_buffer *buffer = dmabuf->priv; in dma_heap_dma_buf_begin_cpu_access() [all …]
|
D | system_heap.c | 41 struct dma_buf *dmabuf; in system_heap_allocate() local 76 dmabuf = heap_helper_export_dmabuf(helper_buffer, fd_flags); in system_heap_allocate() 77 if (IS_ERR(dmabuf)) { in system_heap_allocate() 78 ret = PTR_ERR(dmabuf); in system_heap_allocate() 82 helper_buffer->dmabuf = dmabuf; in system_heap_allocate() 84 ret = dma_buf_fd(dmabuf, fd_flags); in system_heap_allocate() 86 dma_buf_put(dmabuf); in system_heap_allocate()
|
D | cma_heap.c | 54 struct dma_buf *dmabuf; in cma_heap_allocate() local 109 dmabuf = heap_helper_export_dmabuf(helper_buffer, fd_flags); in cma_heap_allocate() 110 if (IS_ERR(dmabuf)) { in cma_heap_allocate() 111 ret = PTR_ERR(dmabuf); in cma_heap_allocate() 115 helper_buffer->dmabuf = dmabuf; in cma_heap_allocate() 118 ret = dma_buf_fd(dmabuf, fd_flags); in cma_heap_allocate() 120 dma_buf_put(dmabuf); in cma_heap_allocate()
|
/kernel/linux/linux-5.10/include/linux/ |
D | dma-buf.h | 343 struct dma_buf *dmabuf; member 406 struct dma_buf *dmabuf; member 460 static inline void get_dma_buf(struct dma_buf *dmabuf) in get_dma_buf() argument 462 get_file(dmabuf->file); in get_dma_buf() 473 static inline bool dma_buf_is_dynamic(struct dma_buf *dmabuf) in dma_buf_is_dynamic() argument 475 return !!dmabuf->ops->pin; in dma_buf_is_dynamic() 492 struct dma_buf_attachment *dma_buf_attach(struct dma_buf *dmabuf, 495 dma_buf_dynamic_attach(struct dma_buf *dmabuf, struct device *dev, 498 void dma_buf_detach(struct dma_buf *dmabuf, 505 int dma_buf_fd(struct dma_buf *dmabuf, int flags); [all …]
|
/kernel/linux/linux-5.10/drivers/gpu/drm/ |
D | drm_prime.c | 379 struct dma_buf *dmabuf; in export_and_register_object() local 383 dmabuf = ERR_PTR(-ENOENT); in export_and_register_object() 384 return dmabuf; in export_and_register_object() 388 dmabuf = obj->funcs->export(obj, flags); in export_and_register_object() 390 dmabuf = dev->driver->gem_prime_export(obj, flags); in export_and_register_object() 392 dmabuf = drm_gem_prime_export(obj, flags); in export_and_register_object() 393 if (IS_ERR(dmabuf)) { in export_and_register_object() 397 return dmabuf; in export_and_register_object() 405 obj->dma_buf = dmabuf; in export_and_register_object() 408 return dmabuf; in export_and_register_object() [all …]
|
D | drm_gem_cma_helper.c | 184 dma_buf_vunmap(gem_obj->import_attach->dmabuf, cma_obj->vaddr); in drm_gem_cma_free_object() 475 if (drm_prime_get_contiguous_size(sgt) < attach->dmabuf->size) in drm_gem_cma_prime_import_sg_table() 479 cma_obj = __drm_gem_cma_create(dev, attach->dmabuf->size); in drm_gem_cma_prime_import_sg_table() 486 DRM_DEBUG_PRIME("dma_addr = %pad, size = %zu\n", &cma_obj->paddr, attach->dmabuf->size); in drm_gem_cma_prime_import_sg_table() 622 vaddr = dma_buf_vmap(attach->dmabuf); in drm_gem_cma_prime_import_sg_table_vmap() 630 dma_buf_vunmap(attach->dmabuf, vaddr); in drm_gem_cma_prime_import_sg_table_vmap()
|
/kernel/linux/linux-5.10/drivers/staging/media/tegra-vde/ |
D | dmabuf-cache.c | 31 struct dma_buf *dmabuf = entry->a->dmabuf; in tegra_vde_release_entry() local 39 dma_buf_detach(dmabuf, entry->a); in tegra_vde_release_entry() 40 dma_buf_put(dmabuf); in tegra_vde_release_entry() 61 struct dma_buf *dmabuf, in tegra_vde_dmabuf_cache_map() argument 76 if (entry->a->dmabuf != dmabuf) in tegra_vde_dmabuf_cache_map() 85 dma_buf_put(dmabuf); in tegra_vde_dmabuf_cache_map() 95 attachment = dma_buf_attach(dmabuf, dev); in tegra_vde_dmabuf_cache_map() 122 err = tegra_vde_iommu_map(vde, sgt, &iova, dmabuf->size); in tegra_vde_dmabuf_cache_map() 154 dma_buf_detach(dmabuf, attachment); in tegra_vde_dmabuf_cache_map()
|
/kernel/linux/linux-5.10/drivers/staging/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 | 228 struct pci9118_dmabuf dmabuf[2]; member 247 struct pci9118_dmabuf *dmabuf = &devpriv->dmabuf[buf]; in pci9118_amcc_setup_dma() local 250 outl(dmabuf->hw, devpriv->iobase_a + AMCC_OP_REG_MWAR); in pci9118_amcc_setup_dma() 251 outl(dmabuf->use_size, devpriv->iobase_a + AMCC_OP_REG_MWTC); in pci9118_amcc_setup_dma() 394 struct pci9118_dmabuf *dmabuf = &devpriv->dmabuf[next_buf]; in pci9118_ai_mode4_switch() local 399 comedi_8254_load(dev->pacer, 0, dmabuf->hw >> 1, in pci9118_ai_mode4_switch() 641 struct pci9118_dmabuf *dmabuf = &devpriv->dmabuf[devpriv->dma_actbuf]; in pci9118_ai_get_dma() local 642 unsigned int n_all = comedi_bytes_to_samples(s, dmabuf->use_size); in pci9118_ai_get_dma() 659 pci9118_ai_dma_xfer(dev, s, dmabuf->virt, n_all); in pci9118_ai_get_dma() 804 struct pci9118_dmabuf *dmabuf0 = &devpriv->dmabuf[0]; in pci9118_ai_setup_dma() [all …]
|
/kernel/linux/linux-5.10/drivers/staging/android/ion/ |
D | ion.c | 178 static int ion_dma_buf_attach(struct dma_buf *dmabuf, in ion_dma_buf_attach() argument 183 struct ion_buffer *buffer = dmabuf->priv; in ion_dma_buf_attach() 208 static void ion_dma_buf_detach(struct dma_buf *dmabuf, in ion_dma_buf_detach() argument 212 struct ion_buffer *buffer = dmabuf->priv; in ion_dma_buf_detach() 245 static int ion_mmap(struct dma_buf *dmabuf, struct vm_area_struct *vma) in ion_mmap() argument 247 struct ion_buffer *buffer = dmabuf->priv; in ion_mmap() 271 static void ion_dma_buf_release(struct dma_buf *dmabuf) in ion_dma_buf_release() argument 273 struct ion_buffer *buffer = dmabuf->priv; in ion_dma_buf_release() 278 static int ion_dma_buf_begin_cpu_access(struct dma_buf *dmabuf, in ion_dma_buf_begin_cpu_access() argument 281 struct ion_buffer *buffer = dmabuf->priv; in ion_dma_buf_begin_cpu_access() [all …]
|
/kernel/linux/linux-5.10/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
|
/kernel/linux/patches/linux-5.10/zhiyuan_patch/ |
D | kernel.patch | 76 - bool "Show dmabuf usage of all processes" 81 - Choose this option to show dmabuf objects usage of all processes. 82 - Firstly, with this option, when a process creates a dmabuf object, 83 - its pid and task_comm will be recorded in the dmabuf. 86 - (if PROC_FS enabled) to show dmabuf objects usage of all processes. 100 - in location /sys/kernel/dmabuf/buffers. 102 - /sys/kernel/dmabuf/buffers/<inode_number> will contain 142 if (dmabuf->resv == (struct dma_resv *)&dmabuf[1]) 143 dma_resv_fini(dmabuf->resv); 145 - dma_buf_stats_teardown(dmabuf); [all …]
|
/kernel/linux/linux-5.10/drivers/gpu/drm/savage/ |
D | savage_state.c | 287 const struct drm_buf * dmabuf) in savage_dispatch_dma_prim() argument 297 if (!dmabuf) { in savage_dispatch_dma_prim() 350 if (start + n > dmabuf->total / 32) { in savage_dispatch_dma_prim() 352 start, start + n - 1, dmabuf->total / 32); in savage_dispatch_dma_prim() 361 if (dmabuf->bus_address != dev_priv->state.common.vbaddr) { in savage_dispatch_dma_prim() 364 BCI_WRITE(dmabuf->bus_address | dev_priv->dma_type); in savage_dispatch_dma_prim() 365 dev_priv->state.common.vbaddr = dmabuf->bus_address; in savage_dispatch_dma_prim() 548 const struct drm_buf * dmabuf) in savage_dispatch_dma_idx() argument 557 if (!dmabuf) { in savage_dispatch_dma_idx() 613 if (dmabuf->bus_address != dev_priv->state.common.vbaddr) { in savage_dispatch_dma_idx() [all …]
|
/kernel/linux/linux-5.10/drivers/scsi/lpfc/ |
D | lpfc_bsg.c | 920 struct lpfc_dmabuf *dmabuf = NULL; in lpfc_bsg_ct_unsol_event() local 951 dmabuf = bdeBuf1; in lpfc_bsg_ct_unsol_event() 955 dmabuf = lpfc_sli_ringpostbuf_get(phba, pring, dma_addr); in lpfc_bsg_ct_unsol_event() 957 if (dmabuf == NULL) in lpfc_bsg_ct_unsol_event() 959 ct_req = (struct lpfc_sli_ct_request *)dmabuf->virt; in lpfc_bsg_ct_unsol_event() 963 lpfc_sli_ringpostbuf_put(phba, pring, dmabuf); in lpfc_bsg_ct_unsol_event() 1021 dmabuf = bdeBuf1; in lpfc_bsg_ct_unsol_event() 1027 dmabuf = bdeBuf2; in lpfc_bsg_ct_unsol_event() 1037 dmabuf = lpfc_sli_ringpostbuf_get(phba, in lpfc_bsg_ct_unsol_event() 1040 if (!dmabuf) { in lpfc_bsg_ct_unsol_event() [all …]
|
/kernel/linux/linux-5.10/sound/ppc/ |
D | beep.c | 210 void *dmabuf; in snd_pmac_attach_beep() local 216 dmabuf = dma_alloc_coherent(&chip->pdev->dev, BEEP_BUFLEN * 4, in snd_pmac_attach_beep() 219 if (! dmabuf || ! input_dev) in snd_pmac_attach_beep() 237 beep->buf = dmabuf; in snd_pmac_attach_beep() 256 if (dmabuf) in snd_pmac_attach_beep() 258 dmabuf, beep->addr); in snd_pmac_attach_beep()
|
/kernel/linux/linux-5.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() argument 179 struct drm_gem_object *obj = dmabuf->priv; in amdgpu_dma_buf_attach() 219 static void amdgpu_dma_buf_detach(struct dma_buf *dmabuf, in amdgpu_dma_buf_detach() argument 222 struct drm_gem_object *obj = dmabuf->priv; in amdgpu_dma_buf_detach() 239 struct drm_gem_object *obj = attach->dmabuf->priv; in amdgpu_dma_buf_pin() 267 struct drm_gem_object *obj = attach->dmabuf->priv; in amdgpu_dma_buf_unpin() 289 struct dma_buf *dma_buf = attach->dmabuf; in amdgpu_dma_buf_map() 360 struct dma_buf *dma_buf = attach->dmabuf; in amdgpu_dma_buf_unmap() 633 struct dma_buf *dma_buf = obj->import_attach->dmabuf; in amdgpu_dmabuf_is_xgmi_accessible()
|
/kernel/linux/linux-5.10/drivers/xen/ |
D | gntdev-dmabuf.c | 35 struct dma_buf *dmabuf; member 267 struct gntdev_dmabuf *gntdev_dmabuf = attach->dmabuf->priv; in dmabuf_exp_ops_map_dma_buf() 390 gntdev_dmabuf->dmabuf = dma_buf_export(&exp_info); in dmabuf_exp_from_pages() 391 if (IS_ERR(gntdev_dmabuf->dmabuf)) { in dmabuf_exp_from_pages() 392 ret = PTR_ERR(gntdev_dmabuf->dmabuf); in dmabuf_exp_from_pages() 393 gntdev_dmabuf->dmabuf = NULL; in dmabuf_exp_from_pages() 397 ret = dma_buf_fd(gntdev_dmabuf->dmabuf, O_CLOEXEC); in dmabuf_exp_from_pages() 413 if (gntdev_dmabuf->dmabuf) in dmabuf_exp_from_pages() 414 dma_buf_put(gntdev_dmabuf->dmabuf); in dmabuf_exp_from_pages() 624 if (attach->dmabuf->size != gntdev_dmabuf->nr_pages << PAGE_SHIFT) { in dmabuf_imp_to_refs() [all …]
|