Lines Matching refs:pdd
282 struct kfd_process_device *pdd; in kfd_ioctl_create_queue() local
303 pdd = kfd_bind_process_to_device(dev, p); in kfd_ioctl_create_queue()
304 if (IS_ERR(pdd)) { in kfd_ioctl_create_queue()
494 struct kfd_process_device *pdd; in kfd_ioctl_set_memory_policy() local
513 pdd = kfd_bind_process_to_device(dev, p); in kfd_ioctl_set_memory_policy()
514 if (IS_ERR(pdd)) { in kfd_ioctl_set_memory_policy()
527 &pdd->qpd, in kfd_ioctl_set_memory_policy()
546 struct kfd_process_device *pdd; in kfd_ioctl_set_trap_handler() local
554 pdd = kfd_bind_process_to_device(dev, p); in kfd_ioctl_set_trap_handler()
555 if (IS_ERR(pdd)) { in kfd_ioctl_set_trap_handler()
560 kfd_process_set_trap_handler(&pdd->qpd, args->tba_addr, args->tma_addr); in kfd_ioctl_set_trap_handler()
574 struct kfd_process_device *pdd; in kfd_ioctl_dbg_register() local
594 pdd = kfd_bind_process_to_device(dev, p); in kfd_ioctl_dbg_register()
595 if (IS_ERR(pdd)) { in kfd_ioctl_dbg_register()
596 status = PTR_ERR(pdd); in kfd_ioctl_dbg_register()
883 struct kfd_process_device *pdd = p->pdds[i]; in kfd_ioctl_get_process_apertures() local
887 pAperture->gpu_id = pdd->dev->id; in kfd_ioctl_get_process_apertures()
888 pAperture->lds_base = pdd->lds_base; in kfd_ioctl_get_process_apertures()
889 pAperture->lds_limit = pdd->lds_limit; in kfd_ioctl_get_process_apertures()
890 pAperture->gpuvm_base = pdd->gpuvm_base; in kfd_ioctl_get_process_apertures()
891 pAperture->gpuvm_limit = pdd->gpuvm_limit; in kfd_ioctl_get_process_apertures()
892 pAperture->scratch_base = pdd->scratch_base; in kfd_ioctl_get_process_apertures()
893 pAperture->scratch_limit = pdd->scratch_limit; in kfd_ioctl_get_process_apertures()
898 "gpu id %u\n", pdd->dev->id); in kfd_ioctl_get_process_apertures()
900 "lds_base %llX\n", pdd->lds_base); in kfd_ioctl_get_process_apertures()
902 "lds_limit %llX\n", pdd->lds_limit); in kfd_ioctl_get_process_apertures()
904 "gpuvm_base %llX\n", pdd->gpuvm_base); in kfd_ioctl_get_process_apertures()
906 "gpuvm_limit %llX\n", pdd->gpuvm_limit); in kfd_ioctl_get_process_apertures()
908 "scratch_base %llX\n", pdd->scratch_base); in kfd_ioctl_get_process_apertures()
910 "scratch_limit %llX\n", pdd->scratch_limit); in kfd_ioctl_get_process_apertures()
958 struct kfd_process_device *pdd = p->pdds[i]; in kfd_ioctl_get_process_apertures_new() local
960 pa[i].gpu_id = pdd->dev->id; in kfd_ioctl_get_process_apertures_new()
961 pa[i].lds_base = pdd->lds_base; in kfd_ioctl_get_process_apertures_new()
962 pa[i].lds_limit = pdd->lds_limit; in kfd_ioctl_get_process_apertures_new()
963 pa[i].gpuvm_base = pdd->gpuvm_base; in kfd_ioctl_get_process_apertures_new()
964 pa[i].gpuvm_limit = pdd->gpuvm_limit; in kfd_ioctl_get_process_apertures_new()
965 pa[i].scratch_base = pdd->scratch_base; in kfd_ioctl_get_process_apertures_new()
966 pa[i].scratch_limit = pdd->scratch_limit; in kfd_ioctl_get_process_apertures_new()
969 "gpu id %u\n", pdd->dev->id); in kfd_ioctl_get_process_apertures_new()
971 "lds_base %llX\n", pdd->lds_base); in kfd_ioctl_get_process_apertures_new()
973 "lds_limit %llX\n", pdd->lds_limit); in kfd_ioctl_get_process_apertures_new()
975 "gpuvm_base %llX\n", pdd->gpuvm_base); in kfd_ioctl_get_process_apertures_new()
977 "gpuvm_limit %llX\n", pdd->gpuvm_limit); in kfd_ioctl_get_process_apertures_new()
979 "scratch_base %llX\n", pdd->scratch_base); in kfd_ioctl_get_process_apertures_new()
981 "scratch_limit %llX\n", pdd->scratch_limit); in kfd_ioctl_get_process_apertures_new()
1010 struct kfd_process_device *pdd; in kfd_ioctl_create_event() local
1026 pdd = kfd_bind_process_to_device(kfd, p); in kfd_ioctl_create_event()
1027 if (IS_ERR(pdd)) { in kfd_ioctl_create_event()
1028 err = PTR_ERR(pdd); in kfd_ioctl_create_event()
1032 mem = kfd_process_device_translate_handle(pdd, in kfd_ioctl_create_event()
1110 struct kfd_process_device *pdd; in kfd_ioctl_set_scratch_backing_va() local
1120 pdd = kfd_bind_process_to_device(dev, p); in kfd_ioctl_set_scratch_backing_va()
1121 if (IS_ERR(pdd)) { in kfd_ioctl_set_scratch_backing_va()
1122 err = PTR_ERR(pdd); in kfd_ioctl_set_scratch_backing_va()
1126 pdd->qpd.sh_hidden_private_base = args->va_addr; in kfd_ioctl_set_scratch_backing_va()
1131 pdd->qpd.vmid != 0 && dev->kfd2kgd->set_scratch_backing_va) in kfd_ioctl_set_scratch_backing_va()
1133 dev->kgd, args->va_addr, pdd->qpd.vmid); in kfd_ioctl_set_scratch_backing_va()
1188 struct kfd_process_device *pdd; in kfd_ioctl_acquire_vm() local
1203 pdd = kfd_get_process_device_data(dev, p); in kfd_ioctl_acquire_vm()
1204 if (!pdd) { in kfd_ioctl_acquire_vm()
1209 if (pdd->drm_file) { in kfd_ioctl_acquire_vm()
1210 ret = pdd->drm_file == drm_file ? 0 : -EBUSY; in kfd_ioctl_acquire_vm()
1214 ret = kfd_process_device_init_vm(pdd, drm_file); in kfd_ioctl_acquire_vm()
1251 struct kfd_process_device *pdd; in kfd_ioctl_alloc_memory_of_gpu() local
1275 pdd = kfd_bind_process_to_device(dev, p); in kfd_ioctl_alloc_memory_of_gpu()
1276 if (IS_ERR(pdd)) { in kfd_ioctl_alloc_memory_of_gpu()
1277 err = PTR_ERR(pdd); in kfd_ioctl_alloc_memory_of_gpu()
1286 offset = kfd_get_process_doorbells(pdd); in kfd_ioctl_alloc_memory_of_gpu()
1301 pdd->drm_priv, (struct kgd_mem **) &mem, &offset, in kfd_ioctl_alloc_memory_of_gpu()
1307 idr_handle = kfd_process_device_create_obj_handle(pdd, mem); in kfd_ioctl_alloc_memory_of_gpu()
1315 WRITE_ONCE(pdd->vram_usage, pdd->vram_usage + args->size); in kfd_ioctl_alloc_memory_of_gpu()
1333 pdd->drm_priv, NULL); in kfd_ioctl_alloc_memory_of_gpu()
1343 struct kfd_process_device *pdd; in kfd_ioctl_free_memory_of_gpu() local
1355 pdd = kfd_get_process_device_data(dev, p); in kfd_ioctl_free_memory_of_gpu()
1356 if (!pdd) { in kfd_ioctl_free_memory_of_gpu()
1363 pdd, GET_IDR_HANDLE(args->handle)); in kfd_ioctl_free_memory_of_gpu()
1370 (struct kgd_mem *)mem, pdd->drm_priv, &size); in kfd_ioctl_free_memory_of_gpu()
1377 pdd, GET_IDR_HANDLE(args->handle)); in kfd_ioctl_free_memory_of_gpu()
1379 WRITE_ONCE(pdd->vram_usage, pdd->vram_usage - size); in kfd_ioctl_free_memory_of_gpu()
1390 struct kfd_process_device *pdd, *peer_pdd; in kfd_ioctl_map_memory_to_gpu() local
1426 pdd = kfd_bind_process_to_device(dev, p); in kfd_ioctl_map_memory_to_gpu()
1427 if (IS_ERR(pdd)) { in kfd_ioctl_map_memory_to_gpu()
1428 err = PTR_ERR(pdd); in kfd_ioctl_map_memory_to_gpu()
1432 mem = kfd_process_device_translate_handle(pdd, in kfd_ioctl_map_memory_to_gpu()
1503 struct kfd_process_device *pdd, *peer_pdd; in kfd_ioctl_unmap_memory_from_gpu() local
1537 pdd = kfd_get_process_device_data(dev, p); in kfd_ioctl_unmap_memory_from_gpu()
1538 if (!pdd) { in kfd_ioctl_unmap_memory_from_gpu()
1543 mem = kfd_process_device_translate_handle(pdd, in kfd_ioctl_unmap_memory_from_gpu()
1704 struct kfd_process_device *pdd; in kfd_ioctl_import_dmabuf() local
1722 pdd = kfd_bind_process_to_device(dev, p); in kfd_ioctl_import_dmabuf()
1723 if (IS_ERR(pdd)) { in kfd_ioctl_import_dmabuf()
1724 r = PTR_ERR(pdd); in kfd_ioctl_import_dmabuf()
1729 args->va_addr, pdd->drm_priv, in kfd_ioctl_import_dmabuf()
1735 idr_handle = kfd_process_device_create_obj_handle(pdd, mem); in kfd_ioctl_import_dmabuf()
1750 pdd->drm_priv, NULL); in kfd_ioctl_import_dmabuf()