/kernel/linux/linux-5.10/drivers/gpu/drm/ |
D | drm_auth.c | 125 static void drm_set_master(struct drm_device *dev, struct drm_file *fpriv, in drm_set_master() argument 128 dev->master = drm_master_get(fpriv->master); in drm_set_master() 130 dev->driver->master_set(dev, fpriv, new_master); in drm_set_master() 132 fpriv->was_master = true; in drm_set_master() 135 static int drm_new_set_master(struct drm_device *dev, struct drm_file *fpriv) in drm_new_set_master() argument 142 WARN_ON(fpriv->is_master); in drm_new_set_master() 143 old_master = fpriv->master; in drm_new_set_master() 147 spin_lock(&fpriv->master_lookup_lock); in drm_new_set_master() 148 fpriv->master = new_master; in drm_new_set_master() 149 spin_unlock(&fpriv->master_lookup_lock); in drm_new_set_master() [all …]
|
/kernel/linux/linux-5.10/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 | 68 struct amdgpu_fpriv *fpriv; in amdgpu_sched_process_priority_override() local 76 r = amdgpu_file_to_fpriv(f.file, &fpriv); in amdgpu_sched_process_priority_override() 82 idr_for_each_entry(&fpriv->ctx_mgr.ctx_handles, ctx, id) in amdgpu_sched_process_priority_override() 95 struct amdgpu_fpriv *fpriv; in amdgpu_sched_context_priority_override() local 102 r = amdgpu_file_to_fpriv(f.file, &fpriv); in amdgpu_sched_context_priority_override() 108 ctx = amdgpu_ctx_get(fpriv, ctx_id); in amdgpu_sched_context_priority_override()
|
D | amdgpu_ctx.c | 235 struct amdgpu_fpriv *fpriv, in amdgpu_ctx_alloc() argument 240 struct amdgpu_ctx_mgr *mgr = &fpriv->ctx_mgr; in amdgpu_ctx_alloc() 285 static int amdgpu_ctx_free(struct amdgpu_fpriv *fpriv, uint32_t id) in amdgpu_ctx_free() argument 287 struct amdgpu_ctx_mgr *mgr = &fpriv->ctx_mgr; in amdgpu_ctx_free() 299 struct amdgpu_fpriv *fpriv, uint32_t id, in amdgpu_ctx_query() argument 306 if (!fpriv) in amdgpu_ctx_query() 309 mgr = &fpriv->ctx_mgr; in amdgpu_ctx_query() 335 struct amdgpu_fpriv *fpriv, uint32_t id, in amdgpu_ctx_query2() argument 341 if (!fpriv) in amdgpu_ctx_query2() 344 mgr = &fpriv->ctx_mgr; in amdgpu_ctx_query2() [all …]
|
D | amdgpu_kms.c | 1006 struct amdgpu_fpriv *fpriv; in amdgpu_driver_open_kms() local 1024 fpriv = kzalloc(sizeof(*fpriv), GFP_KERNEL); in amdgpu_driver_open_kms() 1025 if (unlikely(!fpriv)) { in amdgpu_driver_open_kms() 1035 r = amdgpu_vm_init(adev, &fpriv->vm, AMDGPU_VM_CONTEXT_GFX, pasid); in amdgpu_driver_open_kms() 1039 fpriv->prt_va = amdgpu_vm_bo_add(adev, &fpriv->vm, NULL); in amdgpu_driver_open_kms() 1040 if (!fpriv->prt_va) { in amdgpu_driver_open_kms() 1048 r = amdgpu_map_static_csa(adev, &fpriv->vm, adev->virt.csa_obj, in amdgpu_driver_open_kms() 1049 &fpriv->csa_va, csa_addr, AMDGPU_CSA_SIZE); in amdgpu_driver_open_kms() 1054 mutex_init(&fpriv->bo_list_lock); in amdgpu_driver_open_kms() 1055 idr_init(&fpriv->bo_list_handles); in amdgpu_driver_open_kms() [all …]
|
D | amdgpu_cs.c | 109 struct amdgpu_fpriv *fpriv = p->filp->driver_priv; in amdgpu_cs_parser_init() local 110 struct amdgpu_vm *vm = &fpriv->vm; in amdgpu_cs_parser_init() 125 p->ctx = amdgpu_ctx_get(fpriv, cs->in.ctx_id); in amdgpu_cs_parser_init() 511 struct amdgpu_fpriv *fpriv = p->filp->driver_priv; in amdgpu_cs_parser_bos() local 512 struct amdgpu_vm *vm = &fpriv->vm; in amdgpu_cs_parser_bos() 527 r = amdgpu_bo_list_get(fpriv, cs->in.bo_list_handle, in amdgpu_cs_parser_bos() 546 amdgpu_vm_get_pd_bo(&fpriv->vm, &p->validated, &p->vm_pd); in amdgpu_cs_parser_bos() 597 r = amdgpu_vm_validate_pt_bos(p->adev, &fpriv->vm, in amdgpu_cs_parser_bos() 657 struct amdgpu_fpriv *fpriv = p->filp->driver_priv; in amdgpu_cs_sync_rings() local 669 &fpriv->vm); in amdgpu_cs_sync_rings() [all …]
|
D | amdgpu_gem.c | 113 struct amdgpu_fpriv *fpriv = file_priv->driver_priv; in amdgpu_gem_object_open() local 114 struct amdgpu_vm *vm = &fpriv->vm; in amdgpu_gem_object_open() 146 struct amdgpu_fpriv *fpriv = file_priv->driver_priv; in amdgpu_gem_object_close() local 147 struct amdgpu_vm *vm = &fpriv->vm; in amdgpu_gem_object_close() 207 struct amdgpu_fpriv *fpriv = filp->driver_priv; in amdgpu_gem_create_ioctl() local 208 struct amdgpu_vm *vm = &fpriv->vm; in amdgpu_gem_create_ioctl() 594 struct amdgpu_fpriv *fpriv = filp->driver_priv; in amdgpu_gem_va_ioctl() local 669 amdgpu_vm_get_pd_bo(&fpriv->vm, &list, &vm_pd); in amdgpu_gem_va_ioctl() 676 bo_va = amdgpu_vm_bo_find(&fpriv->vm, abo); in amdgpu_gem_va_ioctl() 682 bo_va = fpriv->prt_va; in amdgpu_gem_va_ioctl() [all …]
|
D | amdgpu_bo_list.h | 52 int amdgpu_bo_list_get(struct amdgpu_fpriv *fpriv, int id,
|
D | amdgpu_ctx.h | 66 struct amdgpu_ctx *amdgpu_ctx_get(struct amdgpu_fpriv *fpriv, uint32_t id);
|
D | amdgpu_drv.c | 1491 struct amdgpu_fpriv *fpriv = file_priv->driver_priv; in amdgpu_flush() local 1494 timeout = amdgpu_ctx_mgr_entity_flush(&fpriv->ctx_mgr, timeout); in amdgpu_flush() 1495 timeout = amdgpu_vm_wait_idle(&fpriv->vm, timeout); in amdgpu_flush() 1514 int amdgpu_file_to_fpriv(struct file *filp, struct amdgpu_fpriv **fpriv) in amdgpu_file_to_fpriv() argument 1526 *fpriv = file->driver_priv; in amdgpu_file_to_fpriv()
|
D | amdgpu_vm.c | 3251 struct amdgpu_fpriv *fpriv = filp->driver_priv; in amdgpu_vm_ioctl() local 3258 r = amdgpu_vmid_alloc_reserved(adev, &fpriv->vm, in amdgpu_vm_ioctl() 3270 r = amdgpu_bo_reserve(fpriv->vm.root.base.bo, true); in amdgpu_vm_ioctl() 3274 r = amdgpu_vm_wait_idle(&fpriv->vm, timeout); in amdgpu_vm_ioctl() 3278 amdgpu_bo_unreserve(fpriv->vm.root.base.bo); in amdgpu_vm_ioctl() 3279 amdgpu_vmid_free_reserved(adev, &fpriv->vm, AMDGPU_GFXHUB_0); in amdgpu_vm_ioctl()
|
D | amdgpu.h | 466 int amdgpu_file_to_fpriv(struct file *filp, struct amdgpu_fpriv **fpriv);
|
/kernel/linux/linux-5.10/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 …]
|
/kernel/linux/linux-5.10/drivers/gpu/drm/tegra/ |
D | drm.c | 87 struct tegra_drm_file *fpriv; in tegra_drm_open() local 89 fpriv = kzalloc(sizeof(*fpriv), GFP_KERNEL); in tegra_drm_open() 90 if (!fpriv) in tegra_drm_open() 93 idr_init_base(&fpriv->contexts, 1); in tegra_drm_open() 94 mutex_init(&fpriv->lock); in tegra_drm_open() 95 filp->driver_priv = fpriv; in tegra_drm_open() 421 static int tegra_client_open(struct tegra_drm_file *fpriv, in tegra_client_open() argument 431 err = idr_alloc(&fpriv->contexts, context, 1, 0, GFP_KERNEL); in tegra_client_open() 446 struct tegra_drm_file *fpriv = file->driver_priv; in tegra_open_channel() local 457 mutex_lock(&fpriv->lock); in tegra_open_channel() [all …]
|
/kernel/linux/linux-5.10/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()
|
/kernel/linux/linux-5.10/drivers/gpu/drm/radeon/ |
D | radeon_kms.c | 637 struct radeon_fpriv *fpriv; in radeon_driver_open_kms() local 652 fpriv = kzalloc(sizeof(*fpriv), GFP_KERNEL); in radeon_driver_open_kms() 653 if (unlikely(!fpriv)) { in radeon_driver_open_kms() 659 vm = &fpriv->vm; in radeon_driver_open_kms() 684 file_priv->driver_priv = fpriv; in radeon_driver_open_kms() 694 kfree(fpriv); in radeon_driver_open_kms() 730 struct radeon_fpriv *fpriv = file_priv->driver_priv; in radeon_driver_postclose_kms() local 731 struct radeon_vm *vm = &fpriv->vm; in radeon_driver_postclose_kms() 744 kfree(fpriv); in radeon_driver_postclose_kms()
|
D | radeon_gem.c | 153 struct radeon_fpriv *fpriv = file_priv->driver_priv; in radeon_gem_object_open() local 154 struct radeon_vm *vm = &fpriv->vm; in radeon_gem_object_open() 184 struct radeon_fpriv *fpriv = file_priv->driver_priv; in radeon_gem_object_close() local 185 struct radeon_vm *vm = &fpriv->vm; in radeon_gem_object_close() 609 struct radeon_fpriv *fpriv = filp->driver_priv; in radeon_gem_va_ioctl() local 674 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()
|
/kernel/linux/linux-5.10/drivers/gpu/drm/nouveau/ |
D | nouveau_drv.h | 129 nouveau_cli(struct drm_file *fpriv) in nouveau_cli() argument 131 return fpriv ? fpriv->driver_priv : NULL; in nouveau_cli()
|
D | nouveau_drm.c | 1080 nouveau_drm_open(struct drm_device *dev, struct drm_file *fpriv) in nouveau_drm_open() argument 1095 snprintf(name, sizeof(name), "%s[%d]", tmpname, pid_nr(fpriv->pid)); in nouveau_drm_open() 1108 fpriv->driver_priv = cli; in nouveau_drm_open() 1126 nouveau_drm_postclose(struct drm_device *dev, struct drm_file *fpriv) in nouveau_drm_postclose() argument 1128 struct nouveau_cli *cli = nouveau_cli(fpriv); in nouveau_drm_postclose()
|
/kernel/linux/linux-5.10/include/drm/ |
D | drm_auth.h | 112 bool drm_is_current_master(struct drm_file *fpriv);
|
/kernel/linux/linux-5.10/drivers/gpu/drm/i915/gem/ |
D | i915_gem_context.c | 919 struct drm_i915_file_private *fpriv, in gem_context_register() argument 926 ctx->file_priv = fpriv; in gem_context_register() 931 WRITE_ONCE(vm->file, fpriv); /* XXX */ in gem_context_register() 939 ret = xa_alloc(&fpriv->context_xa, id, ctx, xa_limit_32b, GFP_KERNEL); in gem_context_register() 2027 static int ctx_setparam(struct drm_i915_file_private *fpriv, in ctx_setparam() argument 2081 ret = set_ppgtt(fpriv, ctx, args); in ctx_setparam() 2107 struct drm_i915_file_private *fpriv; member 2121 return ctx_setparam(arg->fpriv, arg->ctx, &local.param); in create_setparam() 2320 src = __i915_gem_context_lookup_rcu(arg->fpriv, local.clone_id); in create_clone() 2368 ext_data.fpriv = file->driver_priv; in i915_gem_context_create_ioctl() [all …]
|
D | i915_gem_object.c | 107 struct drm_i915_file_private *fpriv = file->driver_priv; in i915_gem_close_object() local 117 if (ctx && ctx->file_priv == fpriv) { in i915_gem_close_object()
|
/kernel/linux/patches/linux-5.10/yangfan_patch/ |
D | include.patch | 280 bool drm_is_current_master(struct drm_file *fpriv);
|
D | drivers.patch | 14658 @@ -135,18 +135,16 @@ static void drm_set_master(struct drm_device *dev, struct drm_file *fpriv, 14659 static int drm_new_set_master(struct drm_device *dev, struct drm_file *fpriv) 14666 WARN_ON(fpriv->is_master); 14667 old_master = fpriv->master; 14670 + fpriv->master = drm_master_create(dev); 14671 + if (!fpriv->master) { 14672 + fpriv->master = old_master; 14674 - spin_lock(&fpriv->master_lookup_lock); 14675 - fpriv->master = new_master; 14676 - spin_unlock(&fpriv->master_lookup_lock); [all …]
|