Home
last modified time | relevance | path

Searched refs:dmabuf (Results 1 – 25 of 56) sorted by relevance

123

/drivers/dma-buf/
Ddma-buf.c51 struct dma_buf *dmabuf; in dma_buf_release() local
56 dmabuf = file->private_data; in dma_buf_release()
58 BUG_ON(dmabuf->vmapping_counter); in dma_buf_release()
68 BUG_ON(dmabuf->cb_shared.active || dmabuf->cb_excl.active); in dma_buf_release()
70 dmabuf->ops->release(dmabuf); in dma_buf_release()
73 list_del(&dmabuf->list_node); in dma_buf_release()
76 if (dmabuf->resv == (struct reservation_object *)&dmabuf[1]) in dma_buf_release()
77 reservation_object_fini(dmabuf->resv); in dma_buf_release()
79 module_put(dmabuf->owner); in dma_buf_release()
80 kfree(dmabuf); in dma_buf_release()
[all …]
/drivers/gpu/drm/
Ddrm_prime.c246 struct drm_gem_object *obj = attach->dmabuf->priv; in drm_gem_map_dma_buf()
452 struct dma_buf *dmabuf; in export_and_register_object() local
456 dmabuf = ERR_PTR(-ENOENT); in export_and_register_object()
457 return dmabuf; in export_and_register_object()
460 dmabuf = dev->driver->gem_prime_export(dev, obj, flags); in export_and_register_object()
461 if (IS_ERR(dmabuf)) { in export_and_register_object()
465 return dmabuf; in export_and_register_object()
473 obj->dma_buf = dmabuf; in export_and_register_object()
478 return dmabuf; in export_and_register_object()
501 struct dma_buf *dmabuf; in drm_gem_prime_handle_to_fd() local
[all …]
/drivers/staging/android/ion/
Dion.c806 struct dma_buf *dmabuf = attachment->dmabuf; in ion_map_dma_buf() local
807 struct ion_buffer *buffer = dmabuf->priv; in ion_map_dma_buf()
925 static int ion_mmap(struct dma_buf *dmabuf, struct vm_area_struct *vma) in ion_mmap() argument
927 struct ion_buffer *buffer = dmabuf->priv; in ion_mmap()
960 static void ion_dma_buf_release(struct dma_buf *dmabuf) in ion_dma_buf_release() argument
962 struct ion_buffer *buffer = dmabuf->priv; in ion_dma_buf_release()
967 static void *ion_dma_buf_kmap(struct dma_buf *dmabuf, unsigned long offset) in ion_dma_buf_kmap() argument
969 struct ion_buffer *buffer = dmabuf->priv; in ion_dma_buf_kmap()
974 static void ion_dma_buf_kunmap(struct dma_buf *dmabuf, unsigned long offset, in ion_dma_buf_kunmap() argument
979 static int ion_dma_buf_begin_cpu_access(struct dma_buf *dmabuf, in ion_dma_buf_begin_cpu_access() argument
[all …]
/drivers/tee/
Dtee_shm.c76 static void tee_shm_op_release(struct dma_buf *dmabuf) in tee_shm_op_release() argument
78 struct tee_shm *shm = dmabuf->priv; in tee_shm_op_release()
83 static void *tee_shm_op_kmap_atomic(struct dma_buf *dmabuf, unsigned long pgnum) in tee_shm_op_kmap_atomic() argument
88 static void *tee_shm_op_kmap(struct dma_buf *dmabuf, unsigned long pgnum) in tee_shm_op_kmap() argument
93 static int tee_shm_op_mmap(struct dma_buf *dmabuf, struct vm_area_struct *vma) in tee_shm_op_mmap() argument
95 struct tee_shm *shm = dmabuf->priv; in tee_shm_op_mmap()
185 shm->dmabuf = dma_buf_export(&exp_info); in __tee_shm_alloc()
186 if (IS_ERR(shm->dmabuf)) { in __tee_shm_alloc()
187 ret = ERR_CAST(shm->dmabuf); in __tee_shm_alloc()
316 shm->dmabuf = dma_buf_export(&exp_info); in tee_shm_register()
[all …]
/drivers/staging/comedi/drivers/
Daddi_apci_3120.c159 struct apci3120_dmabuf dmabuf[2]; member
181 struct apci3120_dmabuf *dmabuf) in apci3120_init_dma() argument
198 apci3120_addon_write(dev, dmabuf->hw, AMCC_OP_REG_AMWAR); in apci3120_init_dma()
201 apci3120_addon_write(dev, dmabuf->use_size, AMCC_OP_REG_AMWTC); in apci3120_init_dma()
217 struct apci3120_dmabuf *dmabuf0 = &devpriv->dmabuf[0]; in apci3120_setup_dma()
218 struct apci3120_dmabuf *dmabuf1 = &devpriv->dmabuf[1]; in apci3120_setup_dma()
439 struct apci3120_dmabuf *dmabuf; in apci3120_interrupt_dma() local
443 dmabuf = &devpriv->dmabuf[devpriv->cur_dmabuf]; in apci3120_interrupt_dma()
445 nbytes = dmabuf->use_size - inl(devpriv->amcc + AMCC_OP_REG_MWTC); in apci3120_interrupt_dma()
447 if (nbytes < dmabuf->use_size) in apci3120_interrupt_dma()
[all …]
Dadl_pci9118.c227 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 …]
/drivers/scsi/lpfc/
Dlpfc_bsg.c907 struct lpfc_dmabuf *dmabuf = NULL; in lpfc_bsg_ct_unsol_event() local
937 dmabuf = bdeBuf1; in lpfc_bsg_ct_unsol_event()
941 dmabuf = lpfc_sli_ringpostbuf_get(phba, pring, dma_addr); in lpfc_bsg_ct_unsol_event()
943 if (dmabuf == NULL) in lpfc_bsg_ct_unsol_event()
945 ct_req = (struct lpfc_sli_ct_request *)dmabuf->virt; in lpfc_bsg_ct_unsol_event()
949 lpfc_sli_ringpostbuf_put(phba, pring, dmabuf); in lpfc_bsg_ct_unsol_event()
1007 dmabuf = bdeBuf1; in lpfc_bsg_ct_unsol_event()
1013 dmabuf = bdeBuf2; in lpfc_bsg_ct_unsol_event()
1023 dmabuf = lpfc_sli_ringpostbuf_get(phba, in lpfc_bsg_ct_unsol_event()
1026 if (!dmabuf) { in lpfc_bsg_ct_unsol_event()
[all …]
Dlpfc_sli.c1716 struct lpfc_dmabuf *dmabuf, *next_dmabuf; in lpfc_sli_hbqbuf_free_all() local
1726 list_for_each_entry_safe(dmabuf, next_dmabuf, in lpfc_sli_hbqbuf_free_all()
1728 hbq_buf = container_of(dmabuf, struct hbq_dmabuf, dbuf); in lpfc_sli_hbqbuf_free_all()
1735 list_for_each_entry_safe(dmabuf, next_dmabuf, &phba->rb_pend_list, in lpfc_sli_hbqbuf_free_all()
1737 hbq_buf = container_of(dmabuf, struct hbq_dmabuf, dbuf); in lpfc_sli_hbqbuf_free_all()
3510 struct hbq_dmabuf *dmabuf; in lpfc_sli_handle_slow_ring_event_s4() local
3537 dmabuf = container_of(cq_event, struct hbq_dmabuf, in lpfc_sli_handle_slow_ring_event_s4()
3539 lpfc_sli4_handle_received_buffer(phba, dmabuf); in lpfc_sli_handle_slow_ring_event_s4()
4895 struct lpfc_dmabuf *dmabuf; in lpfc_sli4_read_rev() local
4898 dmabuf = kzalloc(sizeof(struct lpfc_dmabuf), GFP_KERNEL); in lpfc_sli4_read_rev()
[all …]
/drivers/gpu/drm/savage/
Dsavage_state.c280 const struct drm_buf * dmabuf) in savage_dispatch_dma_prim() argument
290 if (!dmabuf) { in savage_dispatch_dma_prim()
342 if (start + n > dmabuf->total / 32) { in savage_dispatch_dma_prim()
344 start, start + n - 1, dmabuf->total / 32); in savage_dispatch_dma_prim()
353 if (dmabuf->bus_address != dev_priv->state.common.vbaddr) { in savage_dispatch_dma_prim()
356 BCI_WRITE(dmabuf->bus_address | dev_priv->dma_type); in savage_dispatch_dma_prim()
357 dev_priv->state.common.vbaddr = dmabuf->bus_address; in savage_dispatch_dma_prim()
539 const struct drm_buf * dmabuf) in savage_dispatch_dma_idx() argument
548 if (!dmabuf) { in savage_dispatch_dma_idx()
603 if (dmabuf->bus_address != dev_priv->state.common.vbaddr) { in savage_dispatch_dma_idx()
[all …]
/drivers/gpu/drm/udl/
Dudl_dmabuf.c31 static int udl_attach_dma_buf(struct dma_buf *dmabuf, in udl_attach_dma_buf() argument
38 attach->dmabuf->size); in udl_attach_dma_buf()
50 static void udl_detach_dma_buf(struct dma_buf *dmabuf, in udl_detach_dma_buf() argument
60 attach->dmabuf->size); in udl_detach_dma_buf()
77 struct udl_gem_object *obj = to_udl_bo(attach->dmabuf->priv); in udl_map_dma_buf()
86 attach->dmabuf->size, dir); in udl_map_dma_buf()
150 attach->dmabuf->size, dir); in udl_unmap_dma_buf()
Dudl_gem.c164 obj->vmapping = dma_buf_vmap(obj->base.import_attach->dmabuf); in udl_gem_vmap()
183 dma_buf_vunmap(obj->base.import_attach->dmabuf, obj->vmapping); in udl_gem_vunmap()
/drivers/gpu/drm/etnaviv/
Detnaviv_gem_prime.c68 dma_buf_vunmap(etnaviv_obj->base.import_attach->dmabuf, in etnaviv_gem_prime_release()
84 return dma_buf_vmap(etnaviv_obj->base.import_attach->dmabuf); in etnaviv_gem_prime_vmap_impl()
104 size_t size = PAGE_ALIGN(attach->dmabuf->size); in etnaviv_gem_prime_import_sg_table()
108 attach->dmabuf->resv, in etnaviv_gem_prime_import_sg_table()
/drivers/gpu/drm/vgem/
Dvgem_fence.c118 struct dma_buf *dmabuf; in attach_dmabuf() local
123 dmabuf = dev->driver->gem_prime_export(dev, obj, 0); in attach_dmabuf()
124 if (IS_ERR(dmabuf)) in attach_dmabuf()
125 return PTR_ERR(dmabuf); in attach_dmabuf()
127 obj->dma_buf = dmabuf; in attach_dmabuf()
/drivers/usb/serial/
Dcp210x.c389 void *dmabuf; in cp210x_read_reg_block() local
392 dmabuf = kmalloc(bufsize, GFP_KERNEL); in cp210x_read_reg_block()
393 if (!dmabuf) { in cp210x_read_reg_block()
404 port_priv->bInterfaceNumber, dmabuf, bufsize, in cp210x_read_reg_block()
407 memcpy(buf, dmabuf, bufsize); in cp210x_read_reg_block()
422 kfree(dmabuf); in cp210x_read_reg_block()
506 void *dmabuf; in cp210x_write_reg_block() local
509 dmabuf = kmemdup(buf, bufsize, GFP_KERNEL); in cp210x_write_reg_block()
510 if (!dmabuf) in cp210x_write_reg_block()
515 port_priv->bInterfaceNumber, dmabuf, bufsize, in cp210x_write_reg_block()
[all …]
/drivers/gpu/drm/vmwgfx/
Dvmwgfx_kms.c86 struct vmw_dma_buffer *dmabuf, in vmw_cursor_update_dmabuf() argument
100 ret = ttm_bo_reserve(&dmabuf->base, true, false, NULL); in vmw_cursor_update_dmabuf()
106 ret = ttm_bo_kmap(&dmabuf->base, kmap_offset, kmap_num, &map); in vmw_cursor_update_dmabuf()
116 ttm_bo_unreserve(&dmabuf->base); in vmw_cursor_update_dmabuf()
146 struct vmw_dma_buffer *dmabuf = NULL; in vmw_du_crtc_cursor_set2() local
172 handle, &surface, &dmabuf); in vmw_du_crtc_cursor_set2()
206 } else if (dmabuf) { in vmw_du_crtc_cursor_set2()
208 du->cursor_dmabuf = dmabuf; in vmw_du_crtc_cursor_set2()
210 ret = vmw_cursor_update_dmabuf(dev_priv, dmabuf, width, height, in vmw_du_crtc_cursor_set2()
700 buf = vfb->dmabuf ? vmw_framebuffer_to_vfbd(&vfb->base)->buffer : in vmw_framebuffer_pin()
[all …]
Dvmwgfx_kms.h100 bool dmabuf; member
134 struct vmw_dma_buffer *dmabuf,
254 struct vmw_dma_buffer *dmabuf,
/drivers/mtd/nand/
Dcafe_nand.c71 unsigned char *dmabuf; member
125 memcpy(cafe->dmabuf + cafe->datalen, buf, len); in cafe_write_buf()
141 memcpy(buf, cafe->dmabuf + cafe->datalen, len); in cafe_read_buf()
733 cafe->dmabuf = dma_alloc_coherent(&cafe->pdev->dev, in cafe_nand_probe()
737 if (!cafe->dmabuf) { in cafe_nand_probe()
741 cafe->nand.buffers = nbuf = (void *)cafe->dmabuf + 2112; in cafe_nand_probe()
752 cafe_readl(cafe, NAND_DMA_ADDR0), cafe->dmabuf); in cafe_nand_probe()
806 cafe->dmabuf, cafe->dmaaddr); in cafe_nand_probe()
834 cafe->dmabuf, cafe->dmaaddr); in cafe_nand_remove()
/drivers/gpu/drm/nouveau/
Dnouveau_prime.c64 struct reservation_object *robj = attach->dmabuf->resv; in nouveau_gem_prime_import_sg_table()
71 ret = nouveau_bo_new(dev, attach->dmabuf->size, 0, flags, 0, 0, in nouveau_gem_prime_import_sg_table()
/drivers/gpu/drm/radeon/
Dradeon_prime.c64 struct reservation_object *resv = attach->dmabuf->resv; in radeon_gem_prime_import_sg_table()
70 ret = radeon_bo_create(rdev, attach->dmabuf->size, PAGE_SIZE, false, in radeon_gem_prime_import_sg_table()
/drivers/gpu/drm/amd/amdgpu/
Damdgpu_prime.c65 struct reservation_object *resv = attach->dmabuf->resv; in amdgpu_gem_prime_import_sg_table()
71 ret = amdgpu_bo_create(adev, attach->dmabuf->size, PAGE_SIZE, false, in amdgpu_gem_prime_import_sg_table()
/drivers/net/irda/
Dmcs7780.c144 void *dmabuf; in mcs_get_reg() local
147 dmabuf = kmalloc(sizeof(__u16), GFP_KERNEL); in mcs_get_reg()
148 if (!dmabuf) in mcs_get_reg()
152 MCS_RD_RTYPE, 0, reg, dmabuf, 2, in mcs_get_reg()
155 memcpy(val, dmabuf, sizeof(__u16)); in mcs_get_reg()
156 kfree(dmabuf); in mcs_get_reg()
/drivers/media/platform/omap/
Domap_vout_vrfb.c223 dma_addr_t dmabuf; in omap_vout_prepare_vrfb() local
233 dmabuf = vout->buf_phy_addr[vb->i]; in omap_vout_prepare_vrfb()
262 dmabuf, src_element_index, src_frame_index); in omap_vout_prepare_vrfb()
/drivers/gpu/drm/omapdrm/
Domap_gem_dmabuf.c32 struct drm_gem_object *obj = attachment->dmabuf->priv; in omap_gem_map_dma_buf()
69 struct drm_gem_object *obj = attachment->dmabuf->priv; in omap_gem_unmap_dma_buf()
/drivers/gpu/drm/i915/
Di915_gem_dmabuf.h38 dma_buf = obj->base.import_attach->dmabuf; in i915_gem_object_get_dmabuf_resv()
/drivers/media/v4l2-core/
Dvideobuf2-dma-sg.c309 buf->vaddr = dma_buf_vmap(buf->db_attach->dmabuf); in vb2_dma_sg_vaddr()
435 struct mutex *lock = &db_attach->dmabuf->lock; in vb2_dma_sg_dmabuf_ops_map()
586 dma_buf_vunmap(buf->db_attach->dmabuf, buf->vaddr); in vb2_dma_sg_unmap_dmabuf()
603 dma_buf_detach(buf->db_attach->dmabuf, buf->db_attach); in vb2_dma_sg_detach_dmabuf()

123