/Linux-v5.4/drivers/gpu/drm/ |
D | drm_auth.c | 125 static int drm_set_master(struct drm_device *dev, struct drm_file *fpriv, in drm_set_master() argument 130 dev->master = drm_master_get(fpriv->master); in drm_set_master() 132 ret = dev->driver->master_set(dev, fpriv, new_master); in drm_set_master() 141 static int drm_new_set_master(struct drm_device *dev, struct drm_file *fpriv) in drm_new_set_master() argument 148 WARN_ON(fpriv->is_master); in drm_new_set_master() 149 old_master = fpriv->master; in drm_new_set_master() 150 fpriv->master = drm_master_create(dev); in drm_new_set_master() 151 if (!fpriv->master) { in drm_new_set_master() 152 fpriv->master = old_master; in drm_new_set_master() 157 ret = dev->driver->master_create(dev, fpriv->master); in drm_new_set_master() [all …]
|
/Linux-v5.4/drivers/gpu/drm/amd/amdgpu/ |
D | amdgpu_bo_list.c | 158 static void amdgpu_bo_list_destroy(struct amdgpu_fpriv *fpriv, int id) in amdgpu_bo_list_destroy() argument 162 mutex_lock(&fpriv->bo_list_lock); in amdgpu_bo_list_destroy() 163 list = idr_remove(&fpriv->bo_list_handles, id); in amdgpu_bo_list_destroy() 164 mutex_unlock(&fpriv->bo_list_lock); in amdgpu_bo_list_destroy() 169 int amdgpu_bo_list_get(struct amdgpu_fpriv *fpriv, int id, in amdgpu_bo_list_get() argument 173 *result = idr_find(&fpriv->bo_list_handles, id); in amdgpu_bo_list_get() 269 struct amdgpu_fpriv *fpriv = filp->driver_priv; in amdgpu_bo_list_ioctl() local 287 mutex_lock(&fpriv->bo_list_lock); in amdgpu_bo_list_ioctl() 288 r = idr_alloc(&fpriv->bo_list_handles, list, 1, 0, GFP_KERNEL); in amdgpu_bo_list_ioctl() 289 mutex_unlock(&fpriv->bo_list_lock); in amdgpu_bo_list_ioctl() [all …]
|
D | amdgpu_sched.c | 60 struct amdgpu_fpriv *fpriv; in amdgpu_sched_process_priority_override() local 68 r = amdgpu_file_to_fpriv(f.file, &fpriv); in amdgpu_sched_process_priority_override() 74 idr_for_each_entry(&fpriv->ctx_mgr.ctx_handles, ctx, id) in amdgpu_sched_process_priority_override() 87 struct amdgpu_fpriv *fpriv; in amdgpu_sched_context_priority_override() local 94 r = amdgpu_file_to_fpriv(f.file, &fpriv); in amdgpu_sched_context_priority_override() 100 ctx = amdgpu_ctx_get(fpriv, ctx_id); in amdgpu_sched_context_priority_override()
|
D | amdgpu_ctx.c | 252 struct amdgpu_fpriv *fpriv, in amdgpu_ctx_alloc() argument 257 struct amdgpu_ctx_mgr *mgr = &fpriv->ctx_mgr; in amdgpu_ctx_alloc() 299 static int amdgpu_ctx_free(struct amdgpu_fpriv *fpriv, uint32_t id) in amdgpu_ctx_free() argument 301 struct amdgpu_ctx_mgr *mgr = &fpriv->ctx_mgr; in amdgpu_ctx_free() 313 struct amdgpu_fpriv *fpriv, uint32_t id, in amdgpu_ctx_query() argument 320 if (!fpriv) in amdgpu_ctx_query() 323 mgr = &fpriv->ctx_mgr; in amdgpu_ctx_query() 349 struct amdgpu_fpriv *fpriv, uint32_t id, in amdgpu_ctx_query2() argument 356 if (!fpriv) in amdgpu_ctx_query2() 359 mgr = &fpriv->ctx_mgr; in amdgpu_ctx_query2() [all …]
|
D | amdgpu_kms.c | 968 struct amdgpu_fpriv *fpriv; in amdgpu_driver_open_kms() local 980 fpriv = kzalloc(sizeof(*fpriv), GFP_KERNEL); in amdgpu_driver_open_kms() 981 if (unlikely(!fpriv)) { in amdgpu_driver_open_kms() 991 r = amdgpu_vm_init(adev, &fpriv->vm, AMDGPU_VM_CONTEXT_GFX, pasid); in amdgpu_driver_open_kms() 995 fpriv->prt_va = amdgpu_vm_bo_add(adev, &fpriv->vm, NULL); in amdgpu_driver_open_kms() 996 if (!fpriv->prt_va) { in amdgpu_driver_open_kms() 1004 r = amdgpu_map_static_csa(adev, &fpriv->vm, adev->virt.csa_obj, in amdgpu_driver_open_kms() 1005 &fpriv->csa_va, csa_addr, AMDGPU_CSA_SIZE); in amdgpu_driver_open_kms() 1010 mutex_init(&fpriv->bo_list_lock); in amdgpu_driver_open_kms() 1011 idr_init(&fpriv->bo_list_handles); in amdgpu_driver_open_kms() [all …]
|
D | amdgpu_gem.c | 126 struct amdgpu_fpriv *fpriv = file_priv->driver_priv; in amdgpu_gem_object_open() local 127 struct amdgpu_vm *vm = &fpriv->vm; in amdgpu_gem_object_open() 159 struct amdgpu_fpriv *fpriv = file_priv->driver_priv; in amdgpu_gem_object_close() local 160 struct amdgpu_vm *vm = &fpriv->vm; in amdgpu_gem_object_close() 213 struct amdgpu_fpriv *fpriv = filp->driver_priv; in amdgpu_gem_create_ioctl() local 214 struct amdgpu_vm *vm = &fpriv->vm; in amdgpu_gem_create_ioctl() 549 struct amdgpu_fpriv *fpriv = filp->driver_priv; in amdgpu_gem_va_ioctl() local 614 amdgpu_vm_get_pd_bo(&fpriv->vm, &list, &vm_pd); in amdgpu_gem_va_ioctl() 621 bo_va = amdgpu_vm_bo_find(&fpriv->vm, abo); in amdgpu_gem_va_ioctl() 627 bo_va = fpriv->prt_va; in amdgpu_gem_va_ioctl() [all …]
|
D | amdgpu_cs.c | 107 struct amdgpu_fpriv *fpriv = p->filp->driver_priv; in amdgpu_cs_parser_init() local 108 struct amdgpu_vm *vm = &fpriv->vm; in amdgpu_cs_parser_init() 123 p->ctx = amdgpu_ctx_get(fpriv, cs->in.ctx_id); in amdgpu_cs_parser_init() 573 struct amdgpu_fpriv *fpriv = p->filp->driver_priv; in amdgpu_cs_parser_bos() local 574 struct amdgpu_vm *vm = &fpriv->vm; in amdgpu_cs_parser_bos() 589 r = amdgpu_bo_list_get(fpriv, cs->in.bo_list_handle, in amdgpu_cs_parser_bos() 610 amdgpu_vm_get_pd_bo(&fpriv->vm, &p->validated, &p->vm_pd); in amdgpu_cs_parser_bos() 664 r = amdgpu_vm_validate_pt_bos(p->adev, &fpriv->vm, in amdgpu_cs_parser_bos() 787 struct amdgpu_fpriv *fpriv = p->filp->driver_priv; in amdgpu_cs_vm_handling() local 789 struct amdgpu_vm *vm = &fpriv->vm; in amdgpu_cs_vm_handling() [all …]
|
D | amdgpu_bo_list.h | 52 int amdgpu_bo_list_get(struct amdgpu_fpriv *fpriv, int id,
|
D | amdgpu_ctx.h | 65 struct amdgpu_ctx *amdgpu_ctx_get(struct amdgpu_fpriv *fpriv, uint32_t id);
|
D | amdgpu_drv.c | 1312 struct amdgpu_fpriv *fpriv = file_priv->driver_priv; in amdgpu_flush() local 1315 timeout = amdgpu_ctx_mgr_entity_flush(&fpriv->ctx_mgr, timeout); in amdgpu_flush() 1316 timeout = amdgpu_vm_wait_idle(&fpriv->vm, timeout); in amdgpu_flush() 1335 int amdgpu_file_to_fpriv(struct file *filp, struct amdgpu_fpriv **fpriv) in amdgpu_file_to_fpriv() argument 1347 *fpriv = file->driver_priv; in amdgpu_file_to_fpriv()
|
D | amdgpu_vm.c | 3063 struct amdgpu_fpriv *fpriv = filp->driver_priv; in amdgpu_vm_ioctl() local 3069 r = amdgpu_vmid_alloc_reserved(adev, &fpriv->vm, AMDGPU_GFXHUB_0); in amdgpu_vm_ioctl() 3074 amdgpu_vmid_free_reserved(adev, &fpriv->vm, AMDGPU_GFXHUB_0); in amdgpu_vm_ioctl()
|
D | amdgpu.h | 427 int amdgpu_file_to_fpriv(struct file *filp, struct amdgpu_fpriv **fpriv);
|
/Linux-v5.4/drivers/pci/ |
D | proc.c | 200 struct pci_filp_private *fpriv = file->private_data; in proc_bus_pci_ioctl() local 217 fpriv->mmap_state = pci_mmap_io; in proc_bus_pci_ioctl() 221 fpriv->mmap_state = pci_mmap_mem; in proc_bus_pci_ioctl() 227 fpriv->write_combine = 1; in proc_bus_pci_ioctl() 229 fpriv->write_combine = 0; in proc_bus_pci_ioctl() 247 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() 278 fpriv->mmap_state, write_combine); in proc_bus_pci_mmap() [all …]
|
/Linux-v5.4/drivers/gpu/drm/tegra/ |
D | drm.c | 253 struct tegra_drm_file *fpriv; in tegra_drm_open() local 255 fpriv = kzalloc(sizeof(*fpriv), GFP_KERNEL); in tegra_drm_open() 256 if (!fpriv) in tegra_drm_open() 259 idr_init(&fpriv->contexts); in tegra_drm_open() 260 mutex_init(&fpriv->lock); in tegra_drm_open() 261 filp->driver_priv = fpriv; in tegra_drm_open() 585 static int tegra_client_open(struct tegra_drm_file *fpriv, in tegra_client_open() argument 595 err = idr_alloc(&fpriv->contexts, context, 1, 0, GFP_KERNEL); in tegra_client_open() 610 struct tegra_drm_file *fpriv = file->driver_priv; in tegra_open_channel() local 621 mutex_lock(&fpriv->lock); in tegra_open_channel() [all …]
|
/Linux-v5.4/drivers/char/tpm/ |
D | tpmrm-dev.c | 37 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-v5.4/drivers/gpu/drm/radeon/ |
D | radeon_kms.c | 640 struct radeon_fpriv *fpriv; in radeon_driver_open_kms() local 643 fpriv = kzalloc(sizeof(*fpriv), GFP_KERNEL); in radeon_driver_open_kms() 644 if (unlikely(!fpriv)) { in radeon_driver_open_kms() 650 vm = &fpriv->vm; in radeon_driver_open_kms() 653 kfree(fpriv); in radeon_driver_open_kms() 660 kfree(fpriv); in radeon_driver_open_kms() 674 kfree(fpriv); in radeon_driver_open_kms() 678 file_priv->driver_priv = fpriv; in radeon_driver_open_kms() 715 struct radeon_fpriv *fpriv = file_priv->driver_priv; in radeon_driver_postclose_kms() local 716 struct radeon_vm *vm = &fpriv->vm; in radeon_driver_postclose_kms() [all …]
|
D | radeon_gem.c | 152 struct radeon_fpriv *fpriv = file_priv->driver_priv; in radeon_gem_object_open() local 153 struct radeon_vm *vm = &fpriv->vm; in radeon_gem_object_open() 183 struct radeon_fpriv *fpriv = file_priv->driver_priv; in radeon_gem_object_close() local 184 struct radeon_vm *vm = &fpriv->vm; in radeon_gem_object_close() 608 struct radeon_fpriv *fpriv = filp->driver_priv; in radeon_gem_va_ioctl() local 673 bo_va = radeon_vm_bo_find(&fpriv->vm, rbo); in radeon_gem_va_ioctl()
|
D | radeon_cs.c | 545 struct radeon_fpriv *fpriv = parser->filp->driver_priv; in radeon_cs_ib_vm_chunk() local 546 struct radeon_vm *vm = &fpriv->vm; in radeon_cs_ib_vm_chunk() 614 struct radeon_fpriv *fpriv = parser->filp->driver_priv; in radeon_cs_ib_fill() local 615 vm = &fpriv->vm; in radeon_cs_ib_fill()
|
/Linux-v5.4/drivers/gpu/drm/nouveau/ |
D | nouveau_drv.h | 127 nouveau_cli(struct drm_file *fpriv) in nouveau_cli() argument 129 return fpriv ? fpriv->driver_priv : NULL; in nouveau_cli()
|
D | nouveau_drm.c | 983 nouveau_drm_open(struct drm_device *dev, struct drm_file *fpriv) in nouveau_drm_open() argument 996 snprintf(name, sizeof(name), "%s[%d]", tmpname, pid_nr(fpriv->pid)); in nouveau_drm_open() 1009 fpriv->driver_priv = cli; in nouveau_drm_open() 1027 nouveau_drm_postclose(struct drm_device *dev, struct drm_file *fpriv) in nouveau_drm_postclose() argument 1029 struct nouveau_cli *cli = nouveau_cli(fpriv); in nouveau_drm_postclose()
|
/Linux-v5.4/include/drm/ |
D | drm_auth.h | 111 bool drm_is_current_master(struct drm_file *fpriv);
|
/Linux-v5.4/drivers/gpu/drm/i915/gem/ |
D | i915_gem_context.c | 681 struct drm_i915_file_private *fpriv) in gem_context_register() argument 685 ctx->file_priv = fpriv; in gem_context_register() 687 ctx->vm->file = fpriv; in gem_context_register() 698 mutex_lock(&fpriv->context_idr_lock); in gem_context_register() 699 ret = idr_alloc(&fpriv->context_idr, ctx, 0, 0, GFP_KERNEL); in gem_context_register() 700 mutex_unlock(&fpriv->context_idr_lock); in gem_context_register() 1746 static int ctx_setparam(struct drm_i915_file_private *fpriv, in ctx_setparam() argument 1816 ret = set_ppgtt(fpriv, ctx, args); in ctx_setparam() 1834 struct drm_i915_file_private *fpriv; member 1848 return ctx_setparam(arg->fpriv, arg->ctx, &local.param); in create_setparam() [all …]
|
D | i915_gem_object.c | 95 struct drm_i915_file_private *fpriv = file->driver_priv; in i915_gem_close_object() local 103 if (ctx->file_priv != fpriv) in i915_gem_close_object()
|