Home
last modified time | relevance | path

Searched refs:userptr (Results 1 – 25 of 46) sorted by relevance

12

/linux-6.1.9/drivers/gpu/drm/i915/gem/
Di915_gem_userptr.c64 struct drm_i915_gem_object *obj = container_of(mni, struct drm_i915_gem_object, userptr.notifier); in i915_gem_userptr_invalidate()
104 return mmu_interval_notifier_insert(&obj->userptr.notifier, current->mm, in i915_gem_userptr_init__mmu_notifier()
105 obj->userptr.ptr, obj->base.size, in i915_gem_userptr_init__mmu_notifier()
115 if (!--obj->userptr.page_ref) { in i915_gem_object_userptr_drop_ref()
116 pvec = obj->userptr.pvec; in i915_gem_object_userptr_drop_ref()
117 obj->userptr.pvec = NULL; in i915_gem_object_userptr_drop_ref()
119 GEM_BUG_ON(obj->userptr.page_ref < 0); in i915_gem_object_userptr_drop_ref()
142 if (!obj->userptr.page_ref) { in i915_gem_userptr_get_pages()
147 obj->userptr.page_ref++; in i915_gem_userptr_get_pages()
148 pvec = obj->userptr.pvec; in i915_gem_userptr_get_pages()
[all …]
/linux-6.1.9/drivers/misc/habanalabs/common/
Dmemory.c226 struct hl_userptr *userptr; in dma_map_host_va() local
229 userptr = kzalloc(sizeof(*userptr), GFP_KERNEL); in dma_map_host_va()
230 if (!userptr) { in dma_map_host_va()
235 rc = hl_pin_host_memory(hdev, addr, size, userptr); in dma_map_host_va()
241 userptr->dma_mapped = true; in dma_map_host_va()
242 userptr->dir = DMA_BIDIRECTIONAL; in dma_map_host_va()
243 userptr->vm_type = VM_TYPE_USERPTR; in dma_map_host_va()
245 *p_userptr = userptr; in dma_map_host_va()
247 rc = hdev->asic_funcs->asic_dma_map_sgtable(hdev, userptr->sgt, DMA_BIDIRECTIONAL); in dma_map_host_va()
256 hl_unpin_host_memory(hdev, userptr); in dma_map_host_va()
[all …]
Ddebugfs.c214 struct hl_userptr *userptr; in userptr_show() local
221 list_for_each_entry(userptr, &dev_entry->userptr_list, debugfs_list) { in userptr_show()
229 userptr->pid, userptr->addr, userptr->size, in userptr_show()
230 dma_dir[userptr->dir]); in userptr_show()
249 struct hl_userptr *userptr; in vm_show() local
277 userptr = hnode->ptr; in vm_show()
280 hnode->vaddr, userptr->size); in vm_show()
364 struct hl_userptr *userptr; in userptr_lookup_show() local
372 list_for_each_entry(userptr, &dev_entry->userptr_list, debugfs_list) { in userptr_lookup_show()
373 if (dev_entry->userptr_lookup >= userptr->addr && in userptr_lookup_show()
[all …]
/linux-6.1.9/drivers/gpu/drm/radeon/
DKconfig3 bool "Always enable userptr support"
8 selected to enabled full userptr support.
Dradeon_ttm.c328 uint64_t userptr; member
352 unsigned long end = gtt->userptr + (u64)ttm->num_pages * PAGE_SIZE; in radeon_ttm_tt_pin_userptr()
354 vma = find_vma(gtt->usermm, gtt->userptr); in radeon_ttm_tt_pin_userptr()
361 uint64_t userptr = gtt->userptr + pinned * PAGE_SIZE; in radeon_ttm_tt_pin_userptr() local
364 r = get_user_pages(userptr, num_pages, write ? FOLL_WRITE : 0, in radeon_ttm_tt_pin_userptr()
445 if (gtt->userptr) { in radeon_ttm_backend_bind()
473 if (gtt->userptr) in radeon_ttm_backend_unbind()
547 if (gtt && gtt->userptr) { in radeon_ttm_tt_populate()
573 if (gtt && gtt->userptr) { in radeon_ttm_tt_unpopulate()
594 gtt->userptr = addr; in radeon_ttm_tt_set_userptr()
[all …]
/linux-6.1.9/drivers/media/v4l2-core/
Dv4l2-compat-ioctl32.c277 compat_long_t userptr; member
305 compat_long_t userptr; member
329 compat_long_t userptr; member
355 m.userptr = (unsigned long)compat_ptr(plane32.m.userptr); in get_v4l2_plane32()
392 plane32.m.userptr = (uintptr_t)(p64->m.userptr); in put_v4l2_plane32()
436 vb->m.userptr = (unsigned long)compat_ptr(vb32.m.userptr); in get_v4l2_buffer32()
480 vb->m.userptr = (unsigned long)compat_ptr(vb32.m.userptr); in get_v4l2_buffer32_time32()
523 vb32.m.userptr = (uintptr_t)(vb->m.userptr); in put_v4l2_buffer32()
567 vb32.m.userptr = (uintptr_t)(vb->m.userptr); in put_v4l2_buffer32_time32()
/linux-6.1.9/drivers/gpu/drm/etnaviv/
Detnaviv_gem.c644 struct etnaviv_gem_userptr *userptr = &etnaviv_obj->userptr; in etnaviv_gem_userptr_get_pages() local
649 if (userptr->mm != current->mm) in etnaviv_gem_userptr_get_pages()
658 uint64_t ptr = userptr->ptr + pinned * PAGE_SIZE; in etnaviv_gem_userptr_get_pages()
720 etnaviv_obj->userptr.ptr = ptr; in etnaviv_gem_new_userptr()
721 etnaviv_obj->userptr.mm = current->mm; in etnaviv_gem_new_userptr()
722 etnaviv_obj->userptr.ro = !(flags & ETNA_USERPTR_WRITE); in etnaviv_gem_new_userptr()
Detnaviv_gem.h55 struct etnaviv_gem_userptr userptr; member
/linux-6.1.9/drivers/gpu/drm/amd/amdgpu/
DKconfig29 bool "Always enable userptr write support"
36 isn't already selected to enabled full userptr support.
Damdgpu_ttm.c642 uint64_t userptr; member
663 unsigned long start = gtt->userptr; in amdgpu_ttm_tt_get_user_pages()
718 if (!gtt || !gtt->userptr || !range) in amdgpu_ttm_tt_get_user_pages_done()
722 gtt->userptr, ttm->num_pages); in amdgpu_ttm_tt_get_user_pages_done()
863 if (gtt->userptr) { in amdgpu_ttm_backend_bind()
994 if (gtt->userptr) { in amdgpu_ttm_backend_unbind()
1077 if (gtt->userptr) { in amdgpu_ttm_tt_populate()
1112 if (gtt->userptr) { in amdgpu_ttm_tt_unpopulate()
1145 *user_addr = gtt->userptr; in amdgpu_ttm_tt_get_userptr()
1176 gtt->userptr = addr; in amdgpu_ttm_tt_set_userptr()
[all …]
/linux-6.1.9/drivers/staging/media/atomisp/pci/hmm/
Dhmm.c171 static ia_css_ptr __hmm_alloc(size_t bytes, enum hmm_bo_type type, const void __user *userptr) in __hmm_alloc() argument
195 ret = hmm_bo_alloc_pages(bo, type, userptr); in __hmm_alloc()
210 __func__, bo->start, bytes, type, userptr); in __hmm_alloc()
227 ia_css_ptr hmm_create_from_userdata(size_t bytes, const void __user *userptr) in hmm_create_from_userdata() argument
229 return __hmm_alloc(bytes, HMM_BO_USER, userptr); in hmm_create_from_userdata()
Dhmm_bo.c667 const void __user *userptr) in alloc_user_pages() argument
671 userptr = untagged_addr(userptr); in alloc_user_pages()
675 page_nr = get_user_pages_fast((unsigned long)userptr, bo->pgnr, 1, bo->pages); in alloc_user_pages()
708 const void __user *userptr) in hmm_bo_alloc_pages() argument
730 ret = alloc_user_pages(bo, userptr); in hmm_bo_alloc_pages()
/linux-6.1.9/drivers/gpu/drm/exynos/
Dexynos_drm_g2d.c207 unsigned long userptr; member
415 unsigned long userptr, in g2d_userptr_get_dma_addr() argument
434 if (g2d_userptr->userptr == userptr) { in g2d_userptr_get_dma_addr()
468 start = userptr & PAGE_MASK; in g2d_userptr_get_dma_addr()
469 offset = userptr & ~PAGE_MASK; in g2d_userptr_get_dma_addr()
470 end = PAGE_ALIGN(userptr + size); in g2d_userptr_get_dma_addr()
517 g2d_userptr->userptr = userptr; in g2d_userptr_get_dma_addr()
747 g2d_userptr.userptr, in g2d_map_cmdlist_gem()
/linux-6.1.9/drivers/staging/media/atomisp/include/hmm/
Dhmm.h40 ia_css_ptr hmm_create_from_userdata(size_t bytes, const void __user *userptr);
Dhmm_bo.h210 const void __user *userptr);
/linux-6.1.9/drivers/media/common/videobuf2/
Dvideobuf2-v4l2.c210 planes[plane].m.userptr = in vb2_fill_vb2_v4l2_buffer()
211 b->m.planes[plane].m.userptr; in vb2_fill_vb2_v4l2_buffer()
284 planes[0].m.userptr = b->m.userptr; in vb2_fill_vb2_v4l2_buffer()
528 pdst->m.userptr = psrc->m.userptr; in __fill_v4l2_buffer()
544 b->m.userptr = vb->planes[0].m.userptr; in __fill_v4l2_buffer()
/linux-6.1.9/drivers/gpu/drm/msm/
Dmsm_gem_submit.c100 void __user *userptr = in submit_lookup_objects() local
108 if (copy_from_user(&submit_bo, userptr, sizeof(submit_bo))) { in submit_lookup_objects()
169 void __user *userptr = in submit_lookup_cmds() local
172 ret = copy_from_user(&submit_cmd, userptr, sizeof(submit_cmd)); in submit_lookup_cmds()
202 userptr = u64_to_user_ptr(submit_cmd.relocs); in submit_lookup_cmds()
212 ret = copy_from_user(submit->cmd[i].relocs, userptr, sz); in submit_lookup_cmds()
/linux-6.1.9/include/linux/
Dsplice.h37 void __user *userptr; /* memory to write to */ member
/linux-6.1.9/Documentation/userspace-api/media/v4l/
Dvidioc-prepare-buf.rst55 bounds, or no buffers have been allocated yet, or the ``userptr`` or
Dvidioc-qbuf.rst71 ``memory`` field to ``V4L2_MEMORY_USERPTR``, the ``m.userptr`` field to
73 multi-planar API is used, ``m.userptr`` and ``length`` members of the
164 bounds, or no buffers have been allocated yet, or the ``userptr`` or
/linux-6.1.9/drivers/gpu/drm/i915/
DKconfig100 bool "Always enable userptr support"
106 selected to enabled full userptr support.
/linux-6.1.9/net/ipv4/netfilter/
Darp_tables.c672 void __user *userptr) in copy_entries_to_user() argument
693 if (copy_to_user(userptr + off, e, sizeof(*e))) { in copy_entries_to_user()
697 if (copy_to_user(userptr + off in copy_entries_to_user()
706 if (xt_target_to_user(t, userptr + off + e->target_offset)) { in copy_entries_to_user()
1333 void __user *userptr) in compat_copy_entries_to_user() argument
1347 pos = userptr; in compat_copy_entries_to_user()
Dip_tables.c814 void __user *userptr) in copy_entries_to_user() argument
837 if (copy_to_user(userptr + off, e, sizeof(*e))) { in copy_entries_to_user()
841 if (copy_to_user(userptr + off in copy_entries_to_user()
854 if (xt_match_to_user(m, userptr + off + i)) { in copy_entries_to_user()
861 if (xt_target_to_user(t, userptr + off + e->target_offset)) { in copy_entries_to_user()
1546 void __user *userptr) in compat_copy_entries_to_user() argument
1560 pos = userptr; in compat_copy_entries_to_user()
/linux-6.1.9/net/ipv6/netfilter/
Dip6_tables.c830 void __user *userptr) in copy_entries_to_user() argument
853 if (copy_to_user(userptr + off, e, sizeof(*e))) { in copy_entries_to_user()
857 if (copy_to_user(userptr + off in copy_entries_to_user()
870 if (xt_match_to_user(m, userptr + off + i)) { in copy_entries_to_user()
877 if (xt_target_to_user(t, userptr + off + e->target_offset)) { in copy_entries_to_user()
1555 void __user *userptr) in compat_copy_entries_to_user() argument
1569 pos = userptr; in compat_copy_entries_to_user()
/linux-6.1.9/drivers/cdrom/
Dcdrom.c3293 void __user *userptr = (void __user *)arg; in mmc_ioctl() local
3303 return mmc_ioctl_cdrom_read_data(cdi, userptr, &cgc, cmd); in mmc_ioctl()
3305 return mmc_ioctl_cdrom_read_audio(cdi, userptr); in mmc_ioctl()
3307 return mmc_ioctl_cdrom_subchannel(cdi, userptr); in mmc_ioctl()
3309 return mmc_ioctl_cdrom_play_msf(cdi, userptr, &cgc); in mmc_ioctl()
3311 return mmc_ioctl_cdrom_play_blk(cdi, userptr, &cgc); in mmc_ioctl()
3314 return mmc_ioctl_cdrom_volume(cdi, userptr, &cgc, cmd); in mmc_ioctl()
3322 return mmc_ioctl_dvd_read_struct(cdi, userptr, &cgc); in mmc_ioctl()
3324 return mmc_ioctl_dvd_auth(cdi, userptr); in mmc_ioctl()
3326 return mmc_ioctl_cdrom_next_writable(cdi, userptr); in mmc_ioctl()
[all …]

12