| /OK3568_Linux_fs/kernel/drivers/dma-buf/ |
| H A D | dma-buf-cache.c | 19 struct dma_buf_attachment *attach; member 35 dma_buf_unmap_attachment(cache->attach, in dma_buf_cache_destructor() 39 dma_buf_detach(dmabuf, cache->attach); in dma_buf_cache_destructor() 51 dma_buf_cache_get_cache(struct dma_buf_attachment *attach) in dma_buf_cache_get_cache() argument 55 struct dma_buf *dmabuf = attach->dmabuf; in dma_buf_cache_get_cache() 63 if (cache->attach == attach) in dma_buf_cache_get_cache() 71 struct dma_buf_attachment *attach) in dma_buf_cache_detach() argument 77 cache = dma_buf_cache_get_cache(attach); in dma_buf_cache_detach() 79 dma_buf_detach(dmabuf, attach); in dma_buf_cache_detach() 88 struct dma_buf_attachment *attach; in dma_buf_cache_attach() local [all …]
|
| H A D | dma-buf.c | 865 struct dma_buf_attachment *attach; in dma_buf_dynamic_attach() local 874 attach = kzalloc(sizeof(*attach), GFP_KERNEL); in dma_buf_dynamic_attach() 875 if (!attach) in dma_buf_dynamic_attach() 878 attach->dev = dev; in dma_buf_dynamic_attach() 879 attach->dmabuf = dmabuf; in dma_buf_dynamic_attach() 881 attach->peer2peer = importer_ops->allow_peer2peer; in dma_buf_dynamic_attach() 882 attach->importer_ops = importer_ops; in dma_buf_dynamic_attach() 883 attach->importer_priv = importer_priv; in dma_buf_dynamic_attach() 885 if (dmabuf->ops->attach) { in dma_buf_dynamic_attach() 886 ret = dmabuf->ops->attach(dmabuf, attach); in dma_buf_dynamic_attach() [all …]
|
| /OK3568_Linux_fs/kernel/drivers/media/common/videobuf2/ |
| H A D | videobuf2-vmalloc.c | 213 struct vb2_vmalloc_attachment *attach; in vb2_vmalloc_dmabuf_ops_attach() local 222 attach = kzalloc(sizeof(*attach), GFP_KERNEL); in vb2_vmalloc_dmabuf_ops_attach() 223 if (!attach) in vb2_vmalloc_dmabuf_ops_attach() 226 sgt = &attach->sgt; in vb2_vmalloc_dmabuf_ops_attach() 229 kfree(attach); in vb2_vmalloc_dmabuf_ops_attach() 237 kfree(attach); in vb2_vmalloc_dmabuf_ops_attach() 244 attach->dma_dir = DMA_NONE; in vb2_vmalloc_dmabuf_ops_attach() 245 dbuf_attach->priv = attach; in vb2_vmalloc_dmabuf_ops_attach() 252 struct vb2_vmalloc_attachment *attach = db_attach->priv; in vb2_vmalloc_dmabuf_ops_detach() local 255 if (!attach) in vb2_vmalloc_dmabuf_ops_detach() [all …]
|
| H A D | videobuf2-dma-sg.c | 358 struct vb2_dma_sg_attachment *attach; in vb2_dma_sg_dmabuf_ops_attach() local 365 attach = kzalloc(sizeof(*attach), GFP_KERNEL); in vb2_dma_sg_dmabuf_ops_attach() 366 if (!attach) in vb2_dma_sg_dmabuf_ops_attach() 369 sgt = &attach->sgt; in vb2_dma_sg_dmabuf_ops_attach() 375 kfree(attach); in vb2_dma_sg_dmabuf_ops_attach() 387 attach->dma_dir = DMA_NONE; in vb2_dma_sg_dmabuf_ops_attach() 388 dbuf_attach->priv = attach; in vb2_dma_sg_dmabuf_ops_attach() 396 struct vb2_dma_sg_attachment *attach = db_attach->priv; in vb2_dma_sg_dmabuf_ops_detach() local 399 if (!attach) in vb2_dma_sg_dmabuf_ops_detach() 402 sgt = &attach->sgt; in vb2_dma_sg_dmabuf_ops_detach() [all …]
|
| H A D | videobuf2-dma-contig.c | 218 struct vb2_dc_attachment *attach; in vb2_dc_dmabuf_ops_attach() local 225 attach = kzalloc(sizeof(*attach), GFP_KERNEL); in vb2_dc_dmabuf_ops_attach() 226 if (!attach) in vb2_dc_dmabuf_ops_attach() 229 sgt = &attach->sgt; in vb2_dc_dmabuf_ops_attach() 235 kfree(attach); in vb2_dc_dmabuf_ops_attach() 247 attach->dma_dir = DMA_NONE; in vb2_dc_dmabuf_ops_attach() 248 dbuf_attach->priv = attach; in vb2_dc_dmabuf_ops_attach() 256 struct vb2_dc_attachment *attach = db_attach->priv; in vb2_dc_dmabuf_ops_detach() local 259 if (!attach) in vb2_dc_dmabuf_ops_detach() 262 sgt = &attach->sgt; in vb2_dc_dmabuf_ops_detach() [all …]
|
| H A D | videobuf2-cma-sg.c | 394 struct vb2_cma_sg_attachment *attach; in vb2_cma_sg_dmabuf_ops_attach() local 401 attach = kzalloc(sizeof(*attach), GFP_KERNEL); in vb2_cma_sg_dmabuf_ops_attach() 402 if (!attach) in vb2_cma_sg_dmabuf_ops_attach() 405 sgt = &attach->sgt; in vb2_cma_sg_dmabuf_ops_attach() 411 kfree(attach); in vb2_cma_sg_dmabuf_ops_attach() 423 attach->dma_dir = DMA_NONE; in vb2_cma_sg_dmabuf_ops_attach() 424 dbuf_attach->priv = attach; in vb2_cma_sg_dmabuf_ops_attach() 432 struct vb2_cma_sg_attachment *attach = db_attach->priv; in vb2_cma_sg_dmabuf_ops_detach() local 435 if (!attach) in vb2_cma_sg_dmabuf_ops_detach() 438 sgt = &attach->sgt; in vb2_cma_sg_dmabuf_ops_detach() [all …]
|
| /OK3568_Linux_fs/kernel/drivers/gpu/drm/amd/amdgpu/ |
| H A D | amdgpu_dma_buf.c | 177 struct dma_buf_attachment *attach) in amdgpu_dma_buf_attach() argument 184 if (pci_p2pdma_distance_many(adev->pdev, &attach->dev, 1, true) < 0) in amdgpu_dma_buf_attach() 185 attach->peer2peer = false; in amdgpu_dma_buf_attach() 187 if (attach->dev->driver == adev->dev->driver) in amdgpu_dma_buf_attach() 220 struct dma_buf_attachment *attach) in amdgpu_dma_buf_detach() argument 226 if (attach->dev->driver != adev->dev->driver && bo->prime_shared_count) in amdgpu_dma_buf_detach() 237 static int amdgpu_dma_buf_pin(struct dma_buf_attachment *attach) in amdgpu_dma_buf_pin() argument 239 struct drm_gem_object *obj = attach->dmabuf->priv; in amdgpu_dma_buf_pin() 265 static void amdgpu_dma_buf_unpin(struct dma_buf_attachment *attach) in amdgpu_dma_buf_unpin() argument 267 struct drm_gem_object *obj = attach->dmabuf->priv; in amdgpu_dma_buf_unpin() [all …]
|
| /OK3568_Linux_fs/kernel/drivers/xen/ |
| H A D | gntdev-dmabuf.c | 53 struct dma_buf_attachment *attach; member 226 struct dma_buf_attachment *attach) in dmabuf_exp_ops_attach() argument 236 attach->priv = gntdev_dmabuf_attach; in dmabuf_exp_ops_attach() 241 struct dma_buf_attachment *attach) in dmabuf_exp_ops_detach() argument 243 struct gntdev_dmabuf_attachment *gntdev_dmabuf_attach = attach->priv; in dmabuf_exp_ops_detach() 250 dma_unmap_sgtable(attach->dev, sgt, in dmabuf_exp_ops_detach() 258 attach->priv = NULL; in dmabuf_exp_ops_detach() 263 dmabuf_exp_ops_map_dma_buf(struct dma_buf_attachment *attach, in dmabuf_exp_ops_map_dma_buf() argument 266 struct gntdev_dmabuf_attachment *gntdev_dmabuf_attach = attach->priv; in dmabuf_exp_ops_map_dma_buf() 267 struct gntdev_dmabuf *gntdev_dmabuf = attach->dmabuf->priv; in dmabuf_exp_ops_map_dma_buf() [all …]
|
| /OK3568_Linux_fs/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, sgt, DMA_BIDIRECTIONAL); in ump_dmabuf_import_wrapper() [all …]
|
| /OK3568_Linux_fs/kernel/drivers/video/rockchip/rga3/ |
| H A D | rga_dma_buf.c | 431 struct dma_buf_attachment *attach = NULL; in rga_dma_map_buf() local 443 attach = dma_buf_attach(dma_buf, rga_dev); in rga_dma_map_buf() 444 if (IS_ERR(attach)) { in rga_dma_map_buf() 445 ret = PTR_ERR(attach); in rga_dma_map_buf() 450 sgt = dma_buf_map_attachment(attach, dir); in rga_dma_map_buf() 458 rga_dma_buffer->attach = attach; in rga_dma_map_buf() 469 if (attach) in rga_dma_map_buf() 470 dma_buf_detach(dma_buf, attach); in rga_dma_map_buf() 482 struct dma_buf_attachment *attach = NULL; in rga_dma_map_fd() local 494 attach = dma_buf_attach(dma_buf, rga_dev); in rga_dma_map_fd() [all …]
|
| /OK3568_Linux_fs/kernel/drivers/gpu/drm/ |
| H A D | drm_prime.c | 581 struct dma_buf_attachment *attach) in drm_gem_map_attach() argument 599 struct dma_buf_attachment *attach) in drm_gem_map_detach() argument 619 struct sg_table *drm_gem_map_dma_buf(struct dma_buf_attachment *attach, in drm_gem_map_dma_buf() argument 622 struct drm_gem_object *obj = attach->dmabuf->priv; in drm_gem_map_dma_buf() 634 ret = dma_map_sgtable(attach->dev, sgt, dir, in drm_gem_map_dma_buf() 654 void drm_gem_unmap_dma_buf(struct dma_buf_attachment *attach, in drm_gem_unmap_dma_buf() argument 661 dma_unmap_sgtable(attach->dev, sgt, dir, DMA_ATTR_SKIP_CPU_SYNC); in drm_gem_unmap_dma_buf() 811 .attach = drm_gem_map_attach, 937 struct dma_buf_attachment *attach; in drm_gem_prime_import_dev() local 957 attach = dma_buf_attach(dma_buf, attach_dev); in drm_gem_prime_import_dev() [all …]
|
| H A D | drm_gem_cma_helper.c | 469 struct dma_buf_attachment *attach, in drm_gem_cma_prime_import_sg_table() argument 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() 615 struct dma_buf_attachment *attach, in drm_gem_cma_prime_import_sg_table_vmap() argument 622 vaddr = dma_buf_vmap(attach->dmabuf); in drm_gem_cma_prime_import_sg_table_vmap() 628 obj = drm_gem_cma_prime_import_sg_table(dev, attach, sgt); 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()
|
| /OK3568_Linux_fs/kernel/drivers/gpu/drm/omapdrm/ |
| H A D | omap_gem_dmabuf.c | 129 struct dma_buf_attachment *attach; in omap_gem_prime_import() local 146 attach = dma_buf_attach(dma_buf, dev->dev); in omap_gem_prime_import() 147 if (IS_ERR(attach)) in omap_gem_prime_import() 148 return ERR_CAST(attach); in omap_gem_prime_import() 152 sgt = dma_buf_map_attachment(attach, DMA_TO_DEVICE); in omap_gem_prime_import() 164 obj->import_attach = attach; in omap_gem_prime_import() 169 dma_buf_unmap_attachment(attach, sgt, DMA_TO_DEVICE); in omap_gem_prime_import() 171 dma_buf_detach(dma_buf, attach); in omap_gem_prime_import()
|
| /OK3568_Linux_fs/kernel/include/linux/ |
| H A D | dma-buf.h | 72 int (*attach)(struct dma_buf *, struct dma_buf_attachment *); member 101 int (*pin)(struct dma_buf_attachment *attach); 114 void (*unpin)(struct dma_buf_attachment *attach); 484 void (*move_notify)(struct dma_buf_attachment *attach); 600 dma_buf_attachment_is_dynamic(struct dma_buf_attachment *attach) in dma_buf_attachment_is_dynamic() argument 602 return !!attach->importer_ops; in dma_buf_attachment_is_dynamic() 615 struct dma_buf_attachment *attach); 616 int dma_buf_pin(struct dma_buf_attachment *attach); 617 void dma_buf_unpin(struct dma_buf_attachment *attach);
|
| 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,
|
| /OK3568_Linux_fs/kernel/drivers/video/rockchip/iep/ |
| H A D | iep_iommu_drm.c | 35 struct dma_buf_attachment *attach; member 167 if (drm_buffer->attach) { in iep_drm_clear_map() 168 dma_buf_unmap_attachment(drm_buffer->attach, drm_buffer->sgt, in iep_drm_clear_map() 170 dma_buf_detach(drm_buffer->dma_buf, drm_buffer->attach); in iep_drm_clear_map() 172 drm_buffer->attach = NULL; in iep_drm_clear_map() 326 struct dma_buf_attachment *attach; in iep_drm_import() local 364 attach = dma_buf_attach(drm_buffer->dma_buf, dev); in iep_drm_import() 365 if (IS_ERR(attach)) { in iep_drm_import() 366 ret = PTR_ERR(attach); in iep_drm_import() 372 sgt = dma_buf_map_attachment(attach, DMA_BIDIRECTIONAL); in iep_drm_import() [all …]
|
| /OK3568_Linux_fs/kernel/drivers/gpu/drm/vmwgfx/ |
| H A D | vmwgfx_prime.c | 43 struct dma_buf_attachment *attach) in vmw_prime_map_attach() argument 49 struct dma_buf_attachment *attach) in vmw_prime_map_detach() argument 53 static struct sg_table *vmw_prime_map_dma_buf(struct dma_buf_attachment *attach, in vmw_prime_map_dma_buf() argument 59 static void vmw_prime_unmap_dma_buf(struct dma_buf_attachment *attach, in vmw_prime_unmap_dma_buf() argument 66 .attach = vmw_prime_map_attach,
|
| /OK3568_Linux_fs/kernel/tools/bpf/bpftool/Documentation/ |
| H A D | bpftool-cgroup.rst | 18 { **show** | **list** | **tree** | **attach** | **detach** | **help** } 25 | **bpftool** **cgroup attach** *CGROUP* *ATTACH_TYPE* *PROG* [*ATTACH_FLAGS*] 42 Output will start with program ID followed by attach type, 43 attach flags and program name. 56 program ID, attach type, attach flags and program name. 62 **bpftool cgroup attach** *CGROUP* *ATTACH_TYPE* *PROG* [*ATTACH_FLAGS*] 63 Attach program *PROG* to the cgroup *CGROUP* with attach type 73 no attach flags or the **override** flag. Attaching another 74 program will release old program and attach the new one. 113 Detach *PROG* from the cgroup *CGROUP* and attach type [all …]
|
| H A D | bpftool-net.rst | 18 { **show** | **list** | **attach** | **detach** | **help** } 24 | **bpftool** **net attach** *ATTACH_TYPE* *PROG* **dev** *NAME* [ **overwrite** ] 55 **bpftool** **net attach** *ATTACH_TYPE* *PROG* **dev** *NAME* [ **overwrite** ] 70 *ATTACH_TYPE* previously used for attach must be specified. 149 | **# bpftool net attach xdpdrv id 16 dev enp6s0np0** 158 | **# bpftool net attach xdpdrv id 16 dev enp6s0np0** 159 | **# bpftool net attach xdpdrv id 20 dev enp6s0np0 overwrite** 168 | **# bpftool net attach xdpdrv id 16 dev enp6s0np0**
|
| /OK3568_Linux_fs/kernel/drivers/nvdimm/ |
| H A D | claim.c | 43 bool __nd_attach_ndns(struct device *dev, struct nd_namespace_common *attach, in __nd_attach_ndns() argument 46 struct nvdimm_bus *nvdimm_bus = walk_to_nvdimm_bus(&attach->dev); in __nd_attach_ndns() 48 if (attach->claim) in __nd_attach_ndns() 52 attach->claim = dev; in __nd_attach_ndns() 53 *_ndns = attach; in __nd_attach_ndns() 54 get_device(&attach->dev); in __nd_attach_ndns() 58 bool nd_attach_ndns(struct device *dev, struct nd_namespace_common *attach, in nd_attach_ndns() argument 63 nvdimm_bus_lock(&attach->dev); in nd_attach_ndns() 64 claimed = __nd_attach_ndns(dev, attach, _ndns); in nd_attach_ndns() 65 nvdimm_bus_unlock(&attach->dev); in nd_attach_ndns()
|
| /OK3568_Linux_fs/kernel/drivers/gpu/drm/armada/ |
| H A D | armada_gem.c | 375 armada_gem_prime_map_dma_buf(struct dma_buf_attachment *attach, in armada_gem_prime_map_dma_buf() argument 378 struct drm_gem_object *obj = attach->dmabuf->priv; in armada_gem_prime_map_dma_buf() 408 if (dma_map_sgtable(attach->dev, sgt, dir, 0)) in armada_gem_prime_map_dma_buf() 417 if (dma_map_sgtable(attach->dev, sgt, dir, 0)) in armada_gem_prime_map_dma_buf() 441 static void armada_gem_prime_unmap_dma_buf(struct dma_buf_attachment *attach, in armada_gem_prime_unmap_dma_buf() argument 444 struct drm_gem_object *obj = attach->dmabuf->priv; in armada_gem_prime_unmap_dma_buf() 449 dma_unmap_sgtable(attach->dev, sgt, dir, 0); in armada_gem_prime_unmap_dma_buf() 491 struct dma_buf_attachment *attach; in armada_gem_prime_import() local 506 attach = dma_buf_attach(buf, dev->dev); in armada_gem_prime_import() 507 if (IS_ERR(attach)) in armada_gem_prime_import() [all …]
|
| /OK3568_Linux_fs/kernel/Documentation/bpf/ |
| H A D | map_cgroup_storage.rst | 10 attach to cgroups; the programs are made available by the same Kconfig. The 34 ``attach_type`` is the the program's attach type. 37 When this key type is used, then all attach types of the particular cgroup and 39 ``struct bpf_cgroup_storage_key``, then programs of different attach types 133 multiple attach types, and each attach creates a fresh zeroed storage. The 145 does not already contain an entry for the cgroup and attach type pair, or else 146 the old storage is reused for the new attachment. If the map is attach type 147 shared, then attach type is simply ignored during comparison. Storage is freed 158 In all versions, userspace may use the the attach parameters of cgroup and 159 attach type pair in ``struct bpf_cgroup_storage_key`` as the key to the BPF map [all …]
|
| /OK3568_Linux_fs/kernel/drivers/gpu/drm/tegra/ |
| H A D | gem.c | 392 struct dma_buf_attachment *attach; in tegra_bo_import() local 400 attach = dma_buf_attach(buf, drm->dev); in tegra_bo_import() 401 if (IS_ERR(attach)) { in tegra_bo_import() 402 err = PTR_ERR(attach); in tegra_bo_import() 408 bo->sgt = dma_buf_map_attachment(attach, DMA_TO_DEVICE); in tegra_bo_import() 420 bo->gem.import_attach = attach; in tegra_bo_import() 426 dma_buf_unmap_attachment(attach, bo->sgt, DMA_TO_DEVICE); in tegra_bo_import() 428 dma_buf_detach(buf, attach); in tegra_bo_import() 548 tegra_gem_prime_map_dma_buf(struct dma_buf_attachment *attach, in tegra_gem_prime_map_dma_buf() argument 551 struct drm_gem_object *gem = attach->dmabuf->priv; in tegra_gem_prime_map_dma_buf() [all …]
|
| /OK3568_Linux_fs/kernel/drivers/virtio/ |
| H A D | virtio_dma_buf.c | 33 exp_info->ops->attach != &virtio_dma_buf_attach) in virtio_dma_buf_export() 44 struct dma_buf_attachment *attach) in virtio_dma_buf_attach() argument 52 ret = ops->device_attach(dma_buf, attach); in virtio_dma_buf_attach() 69 return dma_buf->ops->attach == &virtio_dma_buf_attach; in is_virtio_dma_buf()
|
| /OK3568_Linux_fs/kernel/include/drm/ |
| H A D | drm_prime.h | 77 struct dma_buf_attachment *attach); 79 struct dma_buf_attachment *attach); 80 struct sg_table *drm_gem_map_dma_buf(struct dma_buf_attachment *attach, 82 void drm_gem_unmap_dma_buf(struct dma_buf_attachment *attach,
|