/device/soc/rockchip/common/sdk_linux/drivers/dma-buf/ |
H A D | dma-buf.c | 789 * @attach: [in] attachment which should be pinned 794 int dma_buf_pin(struct dma_buf_attachment *attach) in dma_buf_pin() argument 796 struct dma_buf *dmabuf = attach->dmabuf; in dma_buf_pin() 802 ret = dmabuf->ops->pin(attach); in dma_buf_pin() 811 * calls attach() of dma_buf_ops to allow device-specific attach functionality 812 * @dmabuf: [in] buffer to attach device to. 832 struct dma_buf_attachment *attach; in dma_buf_dynamic_attach() local 843 attach = kzalloc(sizeof(*attach), GFP_KERNE in dma_buf_dynamic_attach() 939 dma_buf_detach(struct dma_buf *dmabuf, struct dma_buf_attachment *attach) dma_buf_detach() argument 974 dma_buf_unpin(struct dma_buf_attachment *attach) dma_buf_unpin() argument 1001 dma_buf_map_attachment(struct dma_buf_attachment *attach, enum dma_data_direction direction) dma_buf_map_attachment() argument 1066 dma_buf_unmap_attachment(struct dma_buf_attachment *attach, struct sg_table *sg_table, enum dma_data_direction direction) dma_buf_unmap_attachment() argument 1105 struct dma_buf_attachment *attach; dma_buf_move_notify() local [all...] |
/device/soc/rockchip/common/kernel/drivers/gpu/arm/mali400/ump/linux/ |
H A D | ump_ukk_ref_wrappers.c | 83 struct dma_buf_attachment *attach; in get_ump_handle_from_dmabuf() local 94 attach = session_mem->mem->import_attach; in get_ump_handle_from_dmabuf() 95 if (attach->dmabuf == dmabuf) { in get_ump_handle_from_dmabuf() 116 struct dma_buf_attachment *attach = NULL; in ump_dmabuf_import_wrapper() local 150 attach = dma_buf_attach(dma_buf, ump_global_mdev); in ump_dmabuf_import_wrapper() 151 if (IS_ERR(attach)) { in ump_dmabuf_import_wrapper() 152 ret = PTR_ERR(attach); in ump_dmabuf_import_wrapper() 156 sgt = dma_buf_map_attachment(attach, DMA_BIDIRECTIONAL); in ump_dmabuf_import_wrapper() 192 session->mem->import_attach = attach; in ump_dmabuf_import_wrapper() 223 dma_buf_unmap_attachment(attach, sg in ump_dmabuf_import_wrapper() [all...] |
H A D | ump_kernel_random_mapping.c | 191 struct dma_buf_attachment *attach = mem->import_attach; in ump_random_mapping_put() local 195 dma_buf_unmap_attachment(attach, mem->sgt, in ump_random_mapping_put() 198 dma_buf = attach->dmabuf; in ump_random_mapping_put() 199 dma_buf_detach(attach->dmabuf, attach); in ump_random_mapping_put()
|
/device/soc/rockchip/common/vendor/drivers/media/platform/rockchip/isp/ |
H A D | videobuf2-rdma-sg.c | 318 struct vb2_dma_sg_attachment *attach;
in vb2_dma_sg_dmabuf_ops_attach() local 325 attach = kzalloc(sizeof(*attach), GFP_KERNEL);
in vb2_dma_sg_dmabuf_ops_attach() 326 if (!attach) {
in vb2_dma_sg_dmabuf_ops_attach() 330 sgt = &attach->sgt;
in vb2_dma_sg_dmabuf_ops_attach() 336 kfree(attach);
in vb2_dma_sg_dmabuf_ops_attach() 348 attach->dma_dir = DMA_NONE;
in vb2_dma_sg_dmabuf_ops_attach() 349 dbuf_attach->priv = attach;
in vb2_dma_sg_dmabuf_ops_attach() 356 struct vb2_dma_sg_attachment *attach = db_attach->priv;
in vb2_dma_sg_dmabuf_ops_detach() local 359 if (!attach) {
in vb2_dma_sg_dmabuf_ops_detach() 376 struct vb2_dma_sg_attachment *attach = db_attach->priv; vb2_dma_sg_dmabuf_ops_map() local [all...] |
/device/soc/rockchip/rk3588/kernel/drivers/media/platform/rockchip/isp/ |
H A D | videobuf2-rdma-sg.c | 309 struct vb2_dma_sg_attachment *attach; in vb2_dma_sg_dmabuf_ops_attach() local 316 attach = kzalloc(sizeof(*attach), GFP_KERNEL); in vb2_dma_sg_dmabuf_ops_attach() 317 if (!attach) in vb2_dma_sg_dmabuf_ops_attach() 320 sgt = &attach->sgt; in vb2_dma_sg_dmabuf_ops_attach() 326 kfree(attach); in vb2_dma_sg_dmabuf_ops_attach() 338 attach->dma_dir = DMA_NONE; in vb2_dma_sg_dmabuf_ops_attach() 339 dbuf_attach->priv = attach; in vb2_dma_sg_dmabuf_ops_attach() 347 struct vb2_dma_sg_attachment *attach = db_attach->priv; in vb2_dma_sg_dmabuf_ops_detach() local 350 if (!attach) in vb2_dma_sg_dmabuf_ops_detach() 366 struct vb2_dma_sg_attachment *attach = db_attach->priv; vb2_dma_sg_dmabuf_ops_map() local [all...] |
/device/soc/rockchip/common/sdk_linux/include/linux/ |
H A D | dma-buf.h | 46 * @attach 53 * device), and otherwise need to fail the attach operation. 58 * fail the attach operation. 71 int (*attach)(struct dma_buf *, struct dma_buf_attachment *); member 100 int (*pin)(struct dma_buf_attachment *attach); 113 void (*unpin)(struct dma_buf_attachment *attach); 120 * can only be called if @attach has been called successfully. 128 * &device.dma_params from the &dma_buf_attachment. The @attach callback 360 * @lock: used internally to serialize list manipulation, attach/detach and 465 void (*move_notify)(struct dma_buf_attachment *attach); 581 dma_buf_attachment_is_dynamic(struct dma_buf_attachment *attach) dma_buf_attachment_is_dynamic() argument [all...] |
H A D | dma-buf-cache.h | 10 extern void dma_buf_cache_detach(struct dma_buf *dmabuf, struct dma_buf_attachment *attach); 12 extern void dma_buf_cache_unmap_attachment(struct dma_buf_attachment *attach, struct sg_table *sg_table, 17 extern struct sg_table *dma_buf_cache_map_attachment(struct dma_buf_attachment *attach,
|
/device/soc/rockchip/common/sdk_linux/drivers/gpu/drm/ |
H A D | drm_prime.c | 538 * Optional pinning of buffers is handled at dma-buf attach and detach time in 565 * drm_gem_map_attach - dma_buf attach implementation for GEM 566 * @dma_buf: buffer to attach device to 567 * @attach: buffer attachment data 570 * used as the &dma_buf_ops.attach callback. Must be used together with 575 int drm_gem_map_attach(struct dma_buf *dma_buf, struct dma_buf_attachment *attach) in drm_gem_map_attach() argument 586 * @attach: attachment to be detached 592 void drm_gem_map_detach(struct dma_buf *dma_buf, struct dma_buf_attachment *attach) in drm_gem_map_detach() argument 602 * @attach: attachment whose scatterlist is to be returned 612 struct sg_table *drm_gem_map_dma_buf(struct dma_buf_attachment *attach, enu argument 647 drm_gem_unmap_dma_buf(struct dma_buf_attachment *attach, struct sg_table *sgt, enum dma_data_direction dir) drm_gem_unmap_dma_buf() argument 933 struct dma_buf_attachment *attach; drm_gem_prime_import_dev() local 1060 struct dma_buf_attachment *attach; drm_prime_gem_destroy() local [all...] |
/device/soc/rockchip/rk3588/kernel/include/linux/ |
H A D | dma-buf-cache.h | 11 struct dma_buf_attachment *attach); 13 extern void dma_buf_cache_unmap_attachment(struct dma_buf_attachment *attach, 21 dma_buf_cache_map_attachment(struct dma_buf_attachment *attach,
|
/device/soc/rockchip/common/sdk_linux/include/drm/ |
H A D | drm_prime.h | 73 int drm_gem_map_attach(struct dma_buf *dma_buf, struct dma_buf_attachment *attach); 74 void drm_gem_map_detach(struct dma_buf *dma_buf, struct dma_buf_attachment *attach); 75 struct sg_table *drm_gem_map_dma_buf(struct dma_buf_attachment *attach, enum dma_data_direction dir); 76 void drm_gem_unmap_dma_buf(struct dma_buf_attachment *attach, struct sg_table *sgt, enum dma_data_direction dir);
|
/device/soc/rockchip/rk3588/kernel/drivers/video/rockchip/rga3/ |
H A D | rga_dma_buf.c | 799 struct dma_buf_attachment *attach = NULL; in rga_dma_map_fd() local 810 attach = dma_buf_attach(dma_buf, rga_dev); in rga_dma_map_fd() 811 if (IS_ERR(attach)) { in rga_dma_map_fd() 812 pr_err("Failed to attach dma_buf\n"); in rga_dma_map_fd() 817 sgt = dma_buf_map_attachment(attach, dir); in rga_dma_map_fd() 825 rga_dma_buffer->attach = attach; in rga_dma_map_fd() 834 if (attach) in rga_dma_map_fd() 835 dma_buf_detach(dma_buf, attach); in rga_dma_map_fd() 845 if (rga_dma_buffer->attach in rga_dma_unmap_fd() 860 struct dma_buf_attachment *attach = NULL; rga_dma_map_buffer() local [all...] |
/device/soc/rockchip/common/vendor/drivers/video/rockchip/mpp/ |
H A D | mpp_iommu.c | 66 dma_buf_unmap_attachment(buffer->attach, buffer->sgt, buffer->dir); in mpp_dma_release_buffer() 67 dma_buf_detach(buffer->dmabuf, buffer->attach); in mpp_dma_release_buffer() 169 struct dma_buf_attachment *attach; in mpp_dma_import_fd() local 209 attach = dma_buf_attach(buffer->dmabuf, dma->dev); in mpp_dma_import_fd() 210 if (IS_ERR(attach)) { in mpp_dma_import_fd() 212 ret = PTR_ERR(attach); in mpp_dma_import_fd() 216 sgt = dma_buf_map_attachment(attach, buffer->dir); in mpp_dma_import_fd() 224 buffer->attach = attach; in mpp_dma_import_fd() 243 dma_buf_detach(buffer->dmabuf, attach); in mpp_dma_import_fd() [all...] |
H A D | mpp_iommu.h | 25 struct dma_buf_attachment *attach; member
|
/device/soc/rockchip/rk3588/kernel/drivers/video/rockchip/mpp/ |
H A D | mpp_iommu.c | 67 dma_buf_unmap_attachment(buffer->attach, buffer->sgt, buffer->dir); in mpp_dma_release_buffer() 68 dma_buf_detach(buffer->dmabuf, buffer->attach); in mpp_dma_release_buffer() 175 struct dma_buf_attachment *attach; in mpp_dma_import_fd() local 217 attach = dma_buf_attach(buffer->dmabuf, dma->dev); in mpp_dma_import_fd() 218 if (IS_ERR(attach)) { in mpp_dma_import_fd() 220 ret = PTR_ERR(attach); in mpp_dma_import_fd() 224 sgt = dma_buf_map_attachment(attach, buffer->dir); in mpp_dma_import_fd() 232 buffer->attach = attach; in mpp_dma_import_fd() 248 dma_buf_detach(buffer->dmabuf, attach); in mpp_dma_import_fd() [all...] |
/device/soc/rockchip/common/sdk_linux/drivers/gpu/drm/rockchip/ |
H A D | rockchip_drm_gem.c | 658 struct dma_buf_attachment *attach; in rockchip_gem_destroy() local 661 attach = obj->import_attach; in rockchip_gem_destroy() 663 dma_buf_unmap_attachment(attach, sg, DMA_BIDIRECTIONAL); in rockchip_gem_destroy() 665 dma_buf = attach->dmabuf; in rockchip_gem_destroy() 666 dma_buf_detach(attach->dmabuf, attach); in rockchip_gem_destroy() 798 static int rockchip_gem_iommu_map_sg(struct drm_device *drm, struct dma_buf_attachment *attach, struct sg_table *sg, in rockchip_gem_iommu_map_sg() argument 805 static int rockchip_gem_dma_map_sg(struct drm_device *drm, struct dma_buf_attachment *attach, struct sg_table *sg, in rockchip_gem_dma_map_sg() argument 813 if (drm_prime_get_contiguous_size(sg) < attach->dmabuf->size) { in rockchip_gem_dma_map_sg() 824 struct drm_gem_object *rockchip_gem_prime_import_sg_table(struct drm_device *drm, struct dma_buf_attachment *attach, in rockchip_gem_prime_import_sg_table() argument [all...] |
H A D | rockchip_drm_gem.h | 40 struct drm_gem_object *rockchip_gem_prime_import_sg_table(struct drm_device *dev, struct dma_buf_attachment *attach,
|
H A D | rockchip_drm_drv.c | 892 DRM_DEV_ERROR(dev, "Failed to attach iommu device\n"); in rockchip_drm_dma_attach_device() 1503 .attach = drm_gem_map_attach, 1521 struct dma_buf_attachment *attach; in rockchip_drm_gem_prime_import_dev() local 1542 attach = dma_buf_attach(dma_buf, attach_dev); in rockchip_drm_gem_prime_import_dev() 1543 if (IS_ERR(attach)) { in rockchip_drm_gem_prime_import_dev() 1544 return ERR_CAST(attach); in rockchip_drm_gem_prime_import_dev() 1549 sgt = dma_buf_map_attachment(attach, DMA_BIDIRECTIONAL); in rockchip_drm_gem_prime_import_dev() 1555 obj = dev->driver->gem_prime_import_sg_table(dev, attach, sgt); in rockchip_drm_gem_prime_import_dev() 1561 obj->import_attach = attach; in rockchip_drm_gem_prime_import_dev() 1567 dma_buf_unmap_attachment(attach, sg in rockchip_drm_gem_prime_import_dev() [all...] |
/device/soc/rockchip/common/sdk_linux/include/drm/bridge/ |
H A D | analogix_dp.h | 51 int (*attach)(struct analogix_dp_plat_data *, struct drm_bridge *, struct drm_connector *); member
|
H A D | dw_mipi_dsi.h | 40 int (*attach)(void *priv_data, struct mipi_dsi_device *dsi); member
|
/device/soc/rockchip/common/hardware/mpp/include/ |
H A D | mpp_device.h | 80 MPP_RET (*attach)(void *ctx); member
|
/device/soc/rockchip/common/vendor/drivers/video/rockchip/rga2/ |
H A D | rga2_mmu_info.c | 265 struct dma_buf_attachment *attach = NULL;
in rga2_map_dma_buffer() local 278 attach = dma_buf_attach(dma_buf, rga_dev);
in rga2_map_dma_buffer() 279 if (IS_ERR(attach)) {
in rga2_map_dma_buffer() 281 pr_err("Failed to attach dma_buf\n");
in rga2_map_dma_buffer() 285 sgt = dma_buf_map_attachment(attach, dir);
in rga2_map_dma_buffer() 293 rga_dma_buffer->attach = attach;
in rga2_map_dma_buffer() 301 if (attach) {
in rga2_map_dma_buffer() 302 dma_buf_detach(dma_buf, attach);
in rga2_map_dma_buffer() 314 if (rga_dma_buffer->attach in rga2_unmap_dma_buffer() [all...] |
/device/soc/rockchip/rk3399/hardware/mpp/include/ |
H A D | mpp_device.h | 80 MPP_RET (*attach)(void *ctx); member
|
/device/soc/rockchip/rk3568/hardware/mpp/include/ |
H A D | mpp_device.h | 80 MPP_RET (*attach)(void *ctx); member
|
/device/soc/rockchip/rk3588/kernel/drivers/gpu/drm/rockchip/ |
H A D | rockchip_drm_gem.h | 42 struct dma_buf_attachment *attach,
|
/device/soc/rockchip/rk3588/kernel/drivers/video/rockchip/rga3/include/ |
H A D | rga_drv.h | 144 struct dma_buf_attachment *attach; member 173 struct dma_buf_attachment *attach; member
|