Home
last modified time | relevance | path

Searched refs:dmabuf (Results 1 - 22 of 22) sorted by relevance

/device/soc/rockchip/common/sdk_linux/drivers/dma-buf/
H A Ddma-buf.c45 * dmabuf.
47 int get_each_dmabuf(int (*callback)(const struct dma_buf *dmabuf, void *private), void *private) in get_each_dmabuf() argument
69 struct dma_buf *dmabuf; in dmabuffs_dname() local
73 dmabuf = dentry->d_fsdata; in dmabuffs_dname()
74 spin_lock(&dmabuf->name_lock); in dmabuffs_dname()
75 if (dmabuf->name) { in dmabuffs_dname()
76 ret = strlcpy(name, dmabuf->name, DMA_BUF_NAME_LEN); in dmabuffs_dname()
78 spin_unlock(&dmabuf->name_lock); in dmabuffs_dname()
85 struct dma_buf *dmabuf; in dma_buf_release() local
87 dmabuf in dma_buf_release()
119 struct dma_buf *dmabuf; dma_buf_file_release() local
162 struct dma_buf *dmabuf = vma->vm_file->private_data; dma_buf_vma_open() local
173 struct dma_buf *dmabuf = vma->vm_file->private_data; dma_buf_vma_close() local
184 dma_buf_do_mmap(struct dma_buf *dmabuf, struct vm_area_struct *vma) dma_buf_do_mmap() argument
204 dma_buf_do_mmap(struct dma_buf *dmabuf, struct vm_area_struct *vma) dma_buf_do_mmap() argument
212 struct dma_buf *dmabuf; dma_buf_mmap_internal() local
235 struct dma_buf *dmabuf; dma_buf_llseek() local
297 struct dma_buf *dmabuf; dma_buf_poll() local
436 dma_buf_set_name(struct dma_buf *dmabuf, const char __user *buf) dma_buf_set_name() argument
463 struct dma_buf *dmabuf; dma_buf_ioctl() local
513 struct dma_buf *dmabuf = file->private_data; dma_buf_show_fdinfo() local
545 dma_buf_getfile(struct dma_buf *dmabuf, int flags) dma_buf_getfile() argument
622 struct dma_buf *dmabuf; dma_buf_export() local
721 dma_buf_fd(struct dma_buf *dmabuf, int flags) dma_buf_fd() argument
776 dma_buf_put(struct dma_buf *dmabuf) dma_buf_put() argument
796 struct dma_buf *dmabuf = attach->dmabuf; dma_buf_pin() local
829 dma_buf_dynamic_attach(struct dma_buf *dmabuf, struct device *dev, const struct dma_buf_attach_ops *importer_ops, void *importer_priv) dma_buf_dynamic_attach() argument
925 dma_buf_attach(struct dma_buf *dmabuf, struct device *dev) dma_buf_attach() argument
939 dma_buf_detach(struct dma_buf *dmabuf, struct dma_buf_attachment *attach) dma_buf_detach() argument
976 struct dma_buf *dmabuf = attach->dmabuf; dma_buf_unpin() local
1103 dma_buf_move_notify(struct dma_buf *dmabuf) dma_buf_move_notify() argument
1198 _dma_buf_begin_cpu_access(struct dma_buf *dmabuf, enum dma_data_direction direction) _dma_buf_begin_cpu_access() argument
1227 dma_buf_begin_cpu_access(struct dma_buf *dmabuf, enum dma_data_direction direction) dma_buf_begin_cpu_access() argument
1251 dma_buf_begin_cpu_access_partial(struct dma_buf *dmabuf, enum dma_data_direction direction, unsigned int offset, unsigned int len) dma_buf_begin_cpu_access_partial() argument
1288 dma_buf_end_cpu_access(struct dma_buf *dmabuf, enum dma_data_direction direction) dma_buf_end_cpu_access() argument
1302 dma_buf_end_cpu_access_partial(struct dma_buf *dmabuf, enum dma_data_direction direction, unsigned int offset, unsigned int len) dma_buf_end_cpu_access_partial() argument
1331 dma_buf_mmap(struct dma_buf *dmabuf, struct vm_area_struct *vma, unsigned long pgoff) dma_buf_mmap() argument
1387 dma_buf_vmap(struct dma_buf *dmabuf) dma_buf_vmap() argument
1431 dma_buf_vunmap(struct dma_buf *dmabuf, void *vaddr) dma_buf_vunmap() argument
1452 dma_buf_get_flags(struct dma_buf *dmabuf, unsigned long *flags) dma_buf_get_flags() argument
1468 dma_buf_get_uuid(struct dma_buf *dmabuf, uuid_t *uuid) dma_buf_get_uuid() argument
[all...]
H A Ddma-heap.c28 * struct dma_heap - represents a dmabuf heap in the system
73 void dma_heap_buffer_free(struct dma_buf *dmabuf) in dma_heap_buffer_free() argument
75 dma_buf_put(dmabuf); in dma_heap_buffer_free()
103 struct dma_buf *dmabuf; in dma_heap_bufferfd_alloc() local
106 dmabuf = dma_heap_buffer_alloc(heap, len, fd_flags, heap_flags); in dma_heap_bufferfd_alloc()
107 if (IS_ERR(dmabuf)) { in dma_heap_bufferfd_alloc()
108 return PTR_ERR(dmabuf); in dma_heap_bufferfd_alloc()
111 fd = dma_buf_fd(dmabuf, fd_flags); in dma_heap_bufferfd_alloc()
113 dma_buf_put(dmabuf); in dma_heap_bufferfd_alloc()
/device/soc/rockchip/common/sdk_linux/include/linux/
H A Ddma-buf.h90 * This is called with the dmabuf->resv object locked and is mutual
108 * This is called with the dmabuf->resv object locked and is mutual
141 * This is always called with the dmabuf->resv object locked when
240 int (*begin_cpu_access_partial)(struct dma_buf *dmabuf, enum dma_data_direction, unsigned int offset,
280 int (*end_cpu_access_partial)(struct dma_buf *dmabuf, enum dma_data_direction, unsigned int offset,
336 int (*get_uuid)(struct dma_buf *dmabuf, uuid_t *uuid);
350 int (*get_flags)(struct dma_buf *dmabuf, unsigned long *flags);
425 struct dma_buf *dmabuf; member
470 * @dmabuf: buffer for this attachment.
472 * @node: list of dma_buf_attachment, protected by dma_resv lock of the dmabuf
494 struct dma_buf *dmabuf; global() member
555 get_dma_buf(struct dma_buf *dmabuf) get_dma_buf() argument
568 dma_buf_is_dynamic(struct dma_buf *dmabuf) dma_buf_is_dynamic() argument
[all...]
H A Ddma-buf-cache.h10 extern void dma_buf_cache_detach(struct dma_buf *dmabuf, struct dma_buf_attachment *attach);
15 extern struct dma_buf_attachment *dma_buf_cache_attach(struct dma_buf *dmabuf, struct device *dev);
/device/soc/rockchip/common/vendor/drivers/video/rockchip/mpp/
H A Dmpp_iommu.c31 struct dma_buf *dmabuf; in mpp_dma_find_buffer_fd() local
35 dmabuf = dma_buf_get(fd); in mpp_dma_find_buffer_fd()
36 if (IS_ERR(dmabuf)) { in mpp_dma_find_buffer_fd()
45 * thus, here should be distinguish with the dmabuf. in mpp_dma_find_buffer_fd()
47 if (buffer->dmabuf == dmabuf) { in mpp_dma_find_buffer_fd()
53 dma_buf_put(dmabuf); in mpp_dma_find_buffer_fd()
67 dma_buf_detach(buffer->dmabuf, buffer->attach); in mpp_dma_release_buffer()
68 dma_buf_put(buffer->dmabuf); in mpp_dma_release_buffer()
167 struct dma_buf *dmabuf; in mpp_dma_import_fd() local
256 struct dma_buf *dmabuf = buffer->dmabuf; mpp_dma_unmap_kernel() local
274 struct dma_buf *dmabuf = buffer->dmabuf; mpp_dma_map_kernel() local
[all...]
H A Dmpp_iommu.h24 struct dma_buf *dmabuf; member
H A Dmpp_rkvdec.c525 struct dma_buf *dmabuf = NULL; in fill_scaling_list_pps() local
532 dmabuf = dma_buf_get(fd); in fill_scaling_list_pps()
533 if (IS_ERR_OR_NULL(dmabuf)) { in fill_scaling_list_pps()
538 ret = dma_buf_begin_cpu_access(dmabuf, DMA_FROM_DEVICE); in fill_scaling_list_pps()
544 vaddr = dma_buf_vmap(dmabuf); in fill_scaling_list_pps()
577 dma_buf_vunmap(dmabuf, vaddr); in fill_scaling_list_pps()
578 dma_buf_end_cpu_access(dmabuf, DMA_FROM_DEVICE); in fill_scaling_list_pps()
579 dma_buf_put(dmabuf); in fill_scaling_list_pps()
/device/soc/rockchip/rk3588/kernel/drivers/video/rockchip/mpp/
H A Dmpp_iommu.c32 struct dma_buf *dmabuf; in mpp_dma_find_buffer_fd() local
36 dmabuf = dma_buf_get(fd); in mpp_dma_find_buffer_fd()
37 if (IS_ERR(dmabuf)) in mpp_dma_find_buffer_fd()
45 * thus, here should be distinguish with the dmabuf. in mpp_dma_find_buffer_fd()
47 if (buffer->dmabuf == dmabuf) { in mpp_dma_find_buffer_fd()
53 dma_buf_put(dmabuf); in mpp_dma_find_buffer_fd()
68 dma_buf_detach(buffer->dmabuf, buffer->attach); in mpp_dma_release_buffer()
69 dma_buf_put(buffer->dmabuf); in mpp_dma_release_buffer()
173 struct dma_buf *dmabuf; in mpp_dma_import_fd() local
262 struct dma_buf *dmabuf = buffer->dmabuf; mpp_dma_unmap_kernel() local
281 struct dma_buf *dmabuf = buffer->dmabuf; mpp_dma_map_kernel() local
[all...]
H A Dmpp_iommu.h24 struct dma_buf *dmabuf; member
H A Dmpp_rkvdec.c559 struct dma_buf *dmabuf = NULL; in fill_scaling_list_pps() local
566 dmabuf = dma_buf_get(fd); in fill_scaling_list_pps()
567 if (IS_ERR_OR_NULL(dmabuf)) { in fill_scaling_list_pps()
572 ret = dma_buf_begin_cpu_access(dmabuf, DMA_FROM_DEVICE); in fill_scaling_list_pps()
578 vaddr = dma_buf_vmap(dmabuf); in fill_scaling_list_pps()
612 dma_buf_vunmap(dmabuf, vaddr); in fill_scaling_list_pps()
613 dma_buf_end_cpu_access(dmabuf, DMA_FROM_DEVICE); in fill_scaling_list_pps()
614 dma_buf_put(dmabuf); in fill_scaling_list_pps()
/device/soc/rockchip/rk3568/hardware/mpp/mpp/legacy/
H A Dvpu_mem_legacy.c60 VPUMemLinear_t *dmabuf = (*(mRKMppApi.Hdimpp_osal_calloc))(__FUNCTION__, sizeof(VPUMemLinear_t)); in get_free_memory_vpumem() local
62 if (dmabuf == NULL) { in get_free_memory_vpumem()
68 (*(mRKMppApi.Hdimpp_osal_free))(__FUNCTION__, dmabuf); in get_free_memory_vpumem()
71 dmabuf->phy_addr = (RK_U32)(*(mRKMppApi.HdiMppBufferGetFdWithCaller))(buffer, __FUNCTION__); in get_free_memory_vpumem()
72 dmabuf->vir_addr = (RK_U32*)(*(mRKMppApi.HdiMppBufferGetPtrWithCaller))(buffer, __FUNCTION__); in get_free_memory_vpumem()
73 dmabuf->size = p_mempool->size; in get_free_memory_vpumem()
74 dmabuf->offset = (RK_U32*)buffer; in get_free_memory_vpumem()
75 HDF_LOGD("out pool %p ret %p fd %d size %d buffer %p", p, dmabuf, \ in get_free_memory_vpumem()
76 dmabuf->phy_addr, dmabuf in get_free_memory_vpumem()
82 VPUMemLinear_t *dmabuf = (VPUMemLinear_t *)hdl; inc_used_memory_handle_ref() local
95 VPUMemLinear_t *dmabuf = (VPUMemLinear_t *)hdl; put_used_memory_handle() local
[all...]
/device/soc/rockchip/common/sdk_linux/drivers/gpu/drm/
H A Ddrm_prime.c232 * @dev: parent device for the exported dmabuf
240 * Returns the new dmabuf.
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()
394 if (IS_ERR(dmabuf)) { in export_and_register_object()
398 return dmabuf; in export_and_register_object()
430 struct dma_buf *dmabuf; drm_gem_prime_handle_to_fd() local
[all...]
/device/soc/rockchip/common/sdk_linux/drivers/dma-buf/heaps/
H A Dsystem_heap.c92 static int system_heap_attach(struct dma_buf *dmabuf, struct dma_buf_attachment *attachment) in system_heap_attach() argument
94 struct system_heap_buffer *buffer = dmabuf->priv; in system_heap_attach()
123 static void system_heap_detach(struct dma_buf *dmabuf, struct dma_buf_attachment *attachment) in system_heap_detach() argument
125 struct system_heap_buffer *buffer = dmabuf->priv; in system_heap_detach()
171 static int system_heap_dma_buf_begin_cpu_access(struct dma_buf *dmabuf, enum dma_data_direction direction) in system_heap_dma_buf_begin_cpu_access() argument
173 struct system_heap_buffer *buffer = dmabuf->priv; in system_heap_dma_buf_begin_cpu_access()
196 static int system_heap_dma_buf_end_cpu_access(struct dma_buf *dmabuf, enum dma_data_direction direction) in system_heap_dma_buf_end_cpu_access() argument
198 struct system_heap_buffer *buffer = dmabuf->priv; in system_heap_dma_buf_end_cpu_access()
221 static int system_heap_mmap(struct dma_buf *dmabuf, struct vm_area_struct *vma) in system_heap_mmap() argument
223 struct system_heap_buffer *buffer = dmabuf in system_heap_mmap()
283 system_heap_vmap(struct dma_buf *dmabuf) system_heap_vmap() argument
308 system_heap_vunmap(struct dma_buf *dmabuf, void *vaddr) system_heap_vunmap() argument
374 system_heap_dma_buf_release(struct dma_buf *dmabuf) system_heap_dma_buf_release() argument
423 struct dma_buf *dmabuf; system_heap_do_allocate() local
[all...]
H A Dcma_heap.c49 static int cma_heap_attach(struct dma_buf *dmabuf, struct dma_buf_attachment *attachment) in cma_heap_attach() argument
51 struct cma_heap_buffer *buffer = dmabuf->priv; in cma_heap_attach()
80 static void cma_heap_detach(struct dma_buf *dmabuf, struct dma_buf_attachment *attachment) in cma_heap_detach() argument
82 struct cma_heap_buffer *buffer = dmabuf->priv; in cma_heap_detach()
116 static int cma_heap_dma_buf_begin_cpu_access(struct dma_buf *dmabuf, enum dma_data_direction direction) in cma_heap_dma_buf_begin_cpu_access() argument
118 struct cma_heap_buffer *buffer = dmabuf->priv; in cma_heap_dma_buf_begin_cpu_access()
138 static int cma_heap_dma_buf_end_cpu_access(struct dma_buf *dmabuf, enum dma_data_direction direction) in cma_heap_dma_buf_end_cpu_access() argument
140 struct cma_heap_buffer *buffer = dmabuf->priv; 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() argument
181 struct cma_heap_buffer *buffer = dmabuf in cma_heap_mmap()
205 cma_heap_vmap(struct dma_buf *dmabuf) cma_heap_vmap() argument
230 cma_heap_vunmap(struct dma_buf *dmabuf, void *vaddr) cma_heap_vunmap() argument
242 cma_heap_dma_buf_release(struct dma_buf *dmabuf) cma_heap_dma_buf_release() argument
282 struct dma_buf *dmabuf; cma_heap_allocate() local
[all...]
/device/soc/rockchip/rk3588/kernel/include/linux/
H A Ddma-buf-cache.h10 extern void dma_buf_cache_detach(struct dma_buf *dmabuf,
18 dma_buf_cache_attach(struct dma_buf *dmabuf, struct device *dev);
/device/soc/rockchip/common/sdk_linux/include/trace/hooks/
H A Dcam_heap_hooks.h28 pgoff_t pagecount, unsigned long fd_flags, struct dma_buf *dmabuf,
30 TP_ARGS(buffer, cma_pages, cma_heap, pagecount, fd_flags, dmabuf, pcma_heap_buf_ops, heap, data));
/device/soc/rockchip/common/kernel/drivers/gpu/arm/mali400/ump/linux/
H A Dump_ukk_ref_wrappers.c80 struct dma_buf *dmabuf) in get_ump_handle_from_dmabuf()
95 if (attach->dmabuf == dmabuf) { in get_ump_handle_from_dmabuf()
79 get_ump_handle_from_dmabuf(struct ump_session_data *session_data, struct dma_buf *dmabuf) get_ump_handle_from_dmabuf() argument
H A Dump_kernel_random_mapping.c198 dma_buf = attach->dmabuf; in ump_random_mapping_put()
199 dma_buf_detach(attach->dmabuf, attach); in ump_random_mapping_put()
/device/soc/hisilicon/hi3516dv300/sdk_linux/drv/mpp/component/hifb/src/init/linux/
H A Dhifb_init.c329 /****************************** dmabuf start **************************/
347 if ((buf_attach == HI_NULL) || (buf_attach->dmabuf == HI_NULL) || (buf_attach->dmabuf->priv == HI_NULL)) { in hifb_memblock_map()
351 mem_block_data = buf_attach->dmabuf->priv; in hifb_memblock_map()
374 sg_set_page(fb_table->sgl, fb_page, buf_attach->dmabuf->size, 0); in hifb_memblock_map()
532 /****************************** dmabuf end **************************/
/device/soc/rockchip/common/vendor/drivers/media/platform/rockchip/isp/
H A Dvideobuf2-rdma-sg.c263 buf->vaddr = dma_buf_vmap(buf->db_attach->dmabuf); in vb2_dma_sg_vaddr()
377 /* stealing dmabuf mutex to serialize map/unmap operations */ in vb2_dma_sg_dmabuf_ops_map()
378 struct mutex *lock = &db_attach->dmabuf->lock; in vb2_dma_sg_dmabuf_ops_map()
484 /* dmabuf keeps reference to vb2 buffer */ in vb2_dma_sg_get_dmabuf()
503 pr_err("dmabuf buffer is already pinned\n"); in vb2_dma_sg_map_dmabuf()
510 pr_err("Error getting dmabuf scatterlist\n"); in vb2_dma_sg_map_dmabuf()
531 pr_err("dmabuf buffer is already unpinned\n"); in vb2_dma_sg_unmap_dmabuf()
536 dma_buf_vunmap(buf->db_attach->dmabuf, buf->vaddr); in vb2_dma_sg_unmap_dmabuf()
554 dma_buf_detach(buf->db_attach->dmabuf, buf->db_attach); in vb2_dma_sg_detach_dmabuf()
578 /* create attachment for the dmabuf wit in vb2_dma_sg_attach_dmabuf()
[all...]
/device/soc/rockchip/rk3588/kernel/drivers/media/platform/rockchip/isp/
H A Dvideobuf2-rdma-sg.c254 buf->vaddr = dma_buf_vmap(buf->db_attach->dmabuf); in vb2_dma_sg_vaddr()
367 /* stealing dmabuf mutex to serialize map/unmap operations */ in vb2_dma_sg_dmabuf_ops_map()
368 struct mutex *lock = &db_attach->dmabuf->lock; in vb2_dma_sg_dmabuf_ops_map()
477 /* dmabuf keeps reference to vb2 buffer */ in vb2_dma_sg_get_dmabuf()
498 pr_err("dmabuf buffer is already pinned\n"); in vb2_dma_sg_map_dmabuf()
505 pr_err("Error getting dmabuf scatterlist\n"); in vb2_dma_sg_map_dmabuf()
526 pr_err("dmabuf buffer is already unpinned\n"); in vb2_dma_sg_unmap_dmabuf()
531 dma_buf_vunmap(buf->db_attach->dmabuf, buf->vaddr); in vb2_dma_sg_unmap_dmabuf()
548 dma_buf_detach(buf->db_attach->dmabuf, buf->db_attach); in vb2_dma_sg_detach_dmabuf()
569 /* create attachment for the dmabuf wit in vb2_dma_sg_attach_dmabuf()
[all...]
/device/soc/rockchip/common/sdk_linux/drivers/gpu/drm/rockchip/
H A Drockchip_drm_gem.c665 dma_buf = attach->dmabuf; in rockchip_gem_destroy()
666 dma_buf_detach(attach->dmabuf, attach); in rockchip_gem_destroy()
813 if (drm_prime_get_contiguous_size(sg) < attach->dmabuf->size) { in rockchip_gem_dma_map_sg()
831 rk_obj = rockchip_gem_alloc_object(drm, attach->dmabuf->size); in rockchip_gem_prime_import_sg_table()

Completed in 17 milliseconds