Home
last modified time | relevance | path

Searched refs:fpriv (Results 1 – 25 of 33) sorted by relevance

12

/linux-6.6.21/drivers/gpu/drm/tegra/
Duapi.c79 struct tegra_drm_file *fpriv = file->driver_priv; in tegra_drm_ioctl_channel_open() local
135 err = xa_alloc(&fpriv->contexts, &args->context, context, XA_LIMIT(1, U32_MAX), in tegra_drm_ioctl_channel_open()
164 struct tegra_drm_file *fpriv = file->driver_priv; in tegra_drm_ioctl_channel_close() local
168 mutex_lock(&fpriv->lock); in tegra_drm_ioctl_channel_close()
170 context = xa_load(&fpriv->contexts, args->context); in tegra_drm_ioctl_channel_close()
172 mutex_unlock(&fpriv->lock); in tegra_drm_ioctl_channel_close()
176 xa_erase(&fpriv->contexts, args->context); in tegra_drm_ioctl_channel_close()
178 mutex_unlock(&fpriv->lock); in tegra_drm_ioctl_channel_close()
187 struct tegra_drm_file *fpriv = file->driver_priv; in tegra_drm_ioctl_channel_map() local
198 mutex_lock(&fpriv->lock); in tegra_drm_ioctl_channel_map()
[all …]
Ddrm.c104 struct tegra_drm_file *fpriv; in tegra_drm_open() local
106 fpriv = kzalloc(sizeof(*fpriv), GFP_KERNEL); in tegra_drm_open()
107 if (!fpriv) in tegra_drm_open()
110 idr_init_base(&fpriv->legacy_contexts, 1); in tegra_drm_open()
111 xa_init_flags(&fpriv->contexts, XA_FLAGS_ALLOC1); in tegra_drm_open()
112 xa_init(&fpriv->syncpoints); in tegra_drm_open()
113 mutex_init(&fpriv->lock); in tegra_drm_open()
114 filp->driver_priv = fpriv; in tegra_drm_open()
428 static int tegra_client_open(struct tegra_drm_file *fpriv, in tegra_client_open() argument
444 err = idr_alloc(&fpriv->legacy_contexts, context, 1, 0, GFP_KERNEL); in tegra_client_open()
[all …]
Dsubmit.c512 struct tegra_drm_file *fpriv = file->driver_priv; in tegra_drm_ioctl_channel_submit() local
522 mutex_lock(&fpriv->lock); in tegra_drm_ioctl_channel_submit()
524 context = xa_load(&fpriv->contexts, args->context); in tegra_drm_ioctl_channel_submit()
526 mutex_unlock(&fpriv->lock); in tegra_drm_ioctl_channel_submit()
576 job = submit_create_job(context, bo, args, job_data, &fpriv->syncpoints); in tegra_drm_ioctl_channel_submit()
682 mutex_unlock(&fpriv->lock); in tegra_drm_ioctl_channel_submit()
/linux-6.6.21/drivers/gpu/drm/
Ddrm_auth.c64 static bool drm_is_current_master_locked(struct drm_file *fpriv) in drm_is_current_master_locked() argument
66 lockdep_assert_once(lockdep_is_held(&fpriv->master_lookup_lock) || in drm_is_current_master_locked()
67 lockdep_is_held(&fpriv->minor->dev->master_mutex)); in drm_is_current_master_locked()
69 return fpriv->is_master && drm_lease_owner(fpriv->master) == fpriv->minor->dev->master; in drm_is_current_master_locked()
82 bool drm_is_current_master(struct drm_file *fpriv) in drm_is_current_master() argument
86 spin_lock(&fpriv->master_lookup_lock); in drm_is_current_master()
87 ret = drm_is_current_master_locked(fpriv); in drm_is_current_master()
88 spin_unlock(&fpriv->master_lookup_lock); in drm_is_current_master()
155 static void drm_set_master(struct drm_device *dev, struct drm_file *fpriv, in drm_set_master() argument
158 dev->master = drm_master_get(fpriv->master); in drm_set_master()
[all …]
/linux-6.6.21/drivers/gpu/drm/amd/amdgpu/
Damdgpu_bo_list.c163 static void amdgpu_bo_list_destroy(struct amdgpu_fpriv *fpriv, int id) in amdgpu_bo_list_destroy() argument
167 mutex_lock(&fpriv->bo_list_lock); in amdgpu_bo_list_destroy()
168 list = idr_remove(&fpriv->bo_list_handles, id); in amdgpu_bo_list_destroy()
169 mutex_unlock(&fpriv->bo_list_lock); in amdgpu_bo_list_destroy()
174 int amdgpu_bo_list_get(struct amdgpu_fpriv *fpriv, int id, in amdgpu_bo_list_get() argument
178 *result = idr_find(&fpriv->bo_list_handles, id); in amdgpu_bo_list_get()
241 struct amdgpu_fpriv *fpriv = filp->driver_priv; in amdgpu_bo_list_ioctl() local
259 mutex_lock(&fpriv->bo_list_lock); in amdgpu_bo_list_ioctl()
260 r = idr_alloc(&fpriv->bo_list_handles, list, 1, 0, GFP_KERNEL); in amdgpu_bo_list_ioctl()
261 mutex_unlock(&fpriv->bo_list_lock); in amdgpu_bo_list_ioctl()
[all …]
Damdgpu_ctx.c232 struct amdgpu_fpriv *fpriv; in amdgpu_ctx_init_entity() local
234 fpriv = container_of(ctx->ctx_mgr, struct amdgpu_fpriv, ctx_mgr); in amdgpu_ctx_init_entity()
235 r = amdgpu_xcp_select_scheds(adev, hw_ip, hw_prio, fpriv, in amdgpu_ctx_init_entity()
322 struct amdgpu_fpriv *fpriv = filp->driver_priv; in amdgpu_ctx_init() local
338 ctx->generation = amdgpu_vm_generation(mgr->adev, &fpriv->vm); in amdgpu_ctx_init()
351 ctx->ctx_mgr = &(fpriv->ctx_mgr); in amdgpu_ctx_init()
473 struct amdgpu_fpriv *fpriv, in amdgpu_ctx_alloc() argument
478 struct amdgpu_ctx_mgr *mgr = &fpriv->ctx_mgr; in amdgpu_ctx_alloc()
523 static int amdgpu_ctx_free(struct amdgpu_fpriv *fpriv, uint32_t id) in amdgpu_ctx_free() argument
525 struct amdgpu_ctx_mgr *mgr = &fpriv->ctx_mgr; in amdgpu_ctx_free()
[all …]
Damdgpu_sched.c40 struct amdgpu_fpriv *fpriv; in amdgpu_sched_process_priority_override() local
49 r = amdgpu_file_to_fpriv(f.file, &fpriv); in amdgpu_sched_process_priority_override()
55 mgr = &fpriv->ctx_mgr; in amdgpu_sched_process_priority_override()
71 struct amdgpu_fpriv *fpriv; in amdgpu_sched_context_priority_override() local
78 r = amdgpu_file_to_fpriv(f.file, &fpriv); in amdgpu_sched_context_priority_override()
84 ctx = amdgpu_ctx_get(fpriv, ctx_id); in amdgpu_sched_context_priority_override()
Damdgpu_fdinfo.c59 struct amdgpu_fpriv *fpriv = file->driver_priv; in amdgpu_show_fdinfo() local
60 struct amdgpu_vm *vm = &fpriv->vm; in amdgpu_show_fdinfo()
81 amdgpu_ctx_mgr_usage(&fpriv->ctx_mgr, usage); in amdgpu_show_fdinfo()
89 drm_printf(p, "pasid:\t%u\n", fpriv->vm.pasid); in amdgpu_show_fdinfo()
Damdgpu_kms.c1217 struct amdgpu_fpriv *fpriv; in amdgpu_driver_open_kms() local
1235 fpriv = kzalloc(sizeof(*fpriv), GFP_KERNEL); in amdgpu_driver_open_kms()
1236 if (unlikely(!fpriv)) { in amdgpu_driver_open_kms()
1247 r = amdgpu_xcp_open_device(adev, fpriv, file_priv); in amdgpu_driver_open_kms()
1251 r = amdgpu_vm_init(adev, &fpriv->vm, fpriv->xcp_id); in amdgpu_driver_open_kms()
1255 r = amdgpu_vm_set_pasid(adev, &fpriv->vm, pasid); in amdgpu_driver_open_kms()
1259 fpriv->prt_va = amdgpu_vm_bo_add(adev, &fpriv->vm, NULL); in amdgpu_driver_open_kms()
1260 if (!fpriv->prt_va) { in amdgpu_driver_open_kms()
1268 r = amdgpu_map_static_csa(adev, &fpriv->vm, adev->virt.csa_obj, in amdgpu_driver_open_kms()
1269 &fpriv->csa_va, csa_addr, AMDGPU_CSA_SIZE); in amdgpu_driver_open_kms()
[all …]
Damdgpu_gem.c166 struct amdgpu_fpriv *fpriv = file_priv->driver_priv; in amdgpu_gem_object_open() local
167 struct amdgpu_vm *vm = &fpriv->vm; in amdgpu_gem_object_open()
198 struct amdgpu_fpriv *fpriv = file_priv->driver_priv; in amdgpu_gem_object_close() local
199 struct amdgpu_vm *vm = &fpriv->vm; in amdgpu_gem_object_close()
282 struct amdgpu_fpriv *fpriv = filp->driver_priv; in amdgpu_gem_create_ioctl() local
283 struct amdgpu_vm *vm = &fpriv->vm; in amdgpu_gem_create_ioctl()
341 flags, ttm_bo_type_device, resv, &gobj, fpriv->xcp_id + 1); in amdgpu_gem_create_ioctl()
384 struct amdgpu_fpriv *fpriv = filp->driver_priv; in amdgpu_gem_userptr_ioctl() local
411 0, ttm_bo_type_device, NULL, &gobj, fpriv->xcp_id + 1); in amdgpu_gem_userptr_ioctl()
677 struct amdgpu_fpriv *fpriv = filp->driver_priv; in amdgpu_gem_va_ioctl() local
[all …]
Damdgpu_cs.c49 struct amdgpu_fpriv *fpriv = filp->driver_priv; in amdgpu_cs_parser_init() local
58 p->ctx = amdgpu_ctx_get(fpriv, cs->in.ctx_id); in amdgpu_cs_parser_init()
178 struct amdgpu_fpriv *fpriv = p->filp->driver_priv; in amdgpu_cs_pass1() local
180 struct amdgpu_vm *vm = &fpriv->vm; in amdgpu_cs_pass1()
332 struct amdgpu_fpriv *fpriv = p->filp->driver_priv; in amdgpu_cs_p2_ib() local
333 struct amdgpu_vm *vm = &fpriv->vm; in amdgpu_cs_p2_ib()
385 struct amdgpu_fpriv *fpriv = p->filp->driver_priv; in amdgpu_cs_p2_dependencies() local
397 ctx = amdgpu_ctx_get(fpriv, deps[i].ctx_id); in amdgpu_cs_p2_dependencies()
836 struct amdgpu_fpriv *fpriv = p->filp->driver_priv; in amdgpu_cs_parser_bos() local
838 struct amdgpu_vm *vm = &fpriv->vm; in amdgpu_cs_parser_bos()
[all …]
Damdgpu_xcp.c369 struct amdgpu_fpriv *fpriv, in amdgpu_xcp_open_device() argument
377 fpriv->xcp_id = AMDGPU_XCP_NO_PARTITION; in amdgpu_xcp_open_device()
390 fpriv->xcp_id = i; in amdgpu_xcp_open_device()
395 fpriv->vm.mem_id = fpriv->xcp_id == AMDGPU_XCP_NO_PARTITION ? -1 : in amdgpu_xcp_open_device()
396 adev->xcp_mgr->xcp[fpriv->xcp_id].mem_id; in amdgpu_xcp_open_device()
Daqua_vanjaram.c173 struct amdgpu_fpriv *fpriv, in aqua_vanjaram_select_scheds() argument
180 if (fpriv->xcp_id == AMDGPU_XCP_NO_PARTITION) { in aqua_vanjaram_select_scheds()
183 fpriv->xcp_id = 0; in aqua_vanjaram_select_scheds()
189 fpriv->xcp_id = i; in aqua_vanjaram_select_scheds()
194 sel_xcp_id = fpriv->xcp_id; in aqua_vanjaram_select_scheds()
197 *num_scheds = adev->xcp_mgr->xcp[fpriv->xcp_id].gpu_sched[hw_ip][hw_prio].num_scheds; in aqua_vanjaram_select_scheds()
198 *scheds = adev->xcp_mgr->xcp[fpriv->xcp_id].gpu_sched[hw_ip][hw_prio].sched; in aqua_vanjaram_select_scheds()
Damdgpu_xcp.h117 u32 hw_ip, u32 hw_prio, struct amdgpu_fpriv *fpriv,
143 struct amdgpu_fpriv *fpriv,
Damdgpu_bo_list.h60 int amdgpu_bo_list_get(struct amdgpu_fpriv *fpriv, int id,
Damdgpu_ctx.h73 struct amdgpu_ctx *amdgpu_ctx_get(struct amdgpu_fpriv *fpriv, uint32_t id);
/linux-6.6.21/drivers/pci/
Dproc.c199 struct pci_filp_private *fpriv = file->private_data; in proc_bus_pci_ioctl() local
216 fpriv->mmap_state = pci_mmap_io; in proc_bus_pci_ioctl()
220 fpriv->mmap_state = pci_mmap_mem; in proc_bus_pci_ioctl()
226 fpriv->write_combine = 1; in proc_bus_pci_ioctl()
228 fpriv->write_combine = 0; in proc_bus_pci_ioctl()
246 struct pci_filp_private *fpriv = file->private_data; in proc_bus_pci_mmap() local
254 if (fpriv->mmap_state == pci_mmap_io) { in proc_bus_pci_mmap()
270 if (fpriv->mmap_state == pci_mmap_mem && in proc_bus_pci_mmap()
271 fpriv->write_combine) { in proc_bus_pci_mmap()
287 fpriv->mmap_state, write_combine); in proc_bus_pci_mmap()
[all …]
/linux-6.6.21/drivers/char/tpm/
Dtpmrm-dev.c37 struct file_priv *fpriv = file->private_data; in tpmrm_release() local
38 struct tpmrm_priv *priv = container_of(fpriv, struct tpmrm_priv, priv); in tpmrm_release()
40 tpm_common_release(file, fpriv); in tpmrm_release()
41 tpm2_del_space(fpriv->chip, &priv->space); in tpmrm_release()
/linux-6.6.21/drivers/gpu/drm/i915/gem/
Di915_gem_context.c313 static int proto_context_register_locked(struct drm_i915_file_private *fpriv, in proto_context_register_locked() argument
320 lockdep_assert_held(&fpriv->proto_context_lock); in proto_context_register_locked()
322 ret = xa_alloc(&fpriv->context_xa, id, NULL, xa_limit_32b, GFP_KERNEL); in proto_context_register_locked()
326 old = xa_store(&fpriv->proto_context_xa, *id, pc, GFP_KERNEL); in proto_context_register_locked()
328 xa_erase(&fpriv->context_xa, *id); in proto_context_register_locked()
336 static int proto_context_register(struct drm_i915_file_private *fpriv, in proto_context_register() argument
342 mutex_lock(&fpriv->proto_context_lock); in proto_context_register()
343 ret = proto_context_register_locked(fpriv, pc, id); in proto_context_register()
344 mutex_unlock(&fpriv->proto_context_lock); in proto_context_register()
363 static int set_proto_ctx_vm(struct drm_i915_file_private *fpriv, in set_proto_ctx_vm() argument
[all …]
/linux-6.6.21/drivers/gpu/drm/radeon/
Dradeon_kms.c636 struct radeon_fpriv *fpriv; in radeon_driver_open_kms() local
651 fpriv = kzalloc(sizeof(*fpriv), GFP_KERNEL); in radeon_driver_open_kms()
652 if (unlikely(!fpriv)) { in radeon_driver_open_kms()
658 vm = &fpriv->vm; in radeon_driver_open_kms()
683 file_priv->driver_priv = fpriv; in radeon_driver_open_kms()
693 kfree(fpriv); in radeon_driver_open_kms()
729 struct radeon_fpriv *fpriv = file_priv->driver_priv; in radeon_driver_postclose_kms() local
730 struct radeon_vm *vm = &fpriv->vm; in radeon_driver_postclose_kms()
743 kfree(fpriv); in radeon_driver_postclose_kms()
Dradeon_gem.c202 struct radeon_fpriv *fpriv = file_priv->driver_priv; in radeon_gem_object_open() local
203 struct radeon_vm *vm = &fpriv->vm; in radeon_gem_object_open()
233 struct radeon_fpriv *fpriv = file_priv->driver_priv; in radeon_gem_object_close() local
234 struct radeon_vm *vm = &fpriv->vm; in radeon_gem_object_close()
666 struct radeon_fpriv *fpriv = filp->driver_priv; in radeon_gem_va_ioctl() local
731 bo_va = radeon_vm_bo_find(&fpriv->vm, rbo); in radeon_gem_va_ioctl()
Dradeon_cs.c554 struct radeon_fpriv *fpriv = parser->filp->driver_priv; in radeon_cs_ib_vm_chunk() local
555 struct radeon_vm *vm = &fpriv->vm; in radeon_cs_ib_vm_chunk()
623 struct radeon_fpriv *fpriv = parser->filp->driver_priv; in radeon_cs_ib_fill() local
624 vm = &fpriv->vm; in radeon_cs_ib_fill()
/linux-6.6.21/drivers/gpu/drm/i915/gem/selftests/
Dmock_context.c80 struct drm_i915_file_private *fpriv = to_drm_file(file)->driver_priv; in live_context() local
97 err = xa_alloc(&fpriv->context_xa, &id, NULL, xa_limit_32b, GFP_KERNEL); in live_context()
101 gem_context_register(ctx, fpriv, id); in live_context()
/linux-6.6.21/drivers/gpu/drm/nouveau/
Dnouveau_drv.h178 nouveau_cli(struct drm_file *fpriv) in nouveau_cli() argument
180 return fpriv ? fpriv->driver_priv : NULL; in nouveau_cli()
/linux-6.6.21/include/drm/
Ddrm_auth.h157 bool drm_is_current_master(struct drm_file *fpriv);

12