/linux-master/drivers/gpu/drm/amd/amdkfd/ |
H A D | kfd_device.c | 42 * kfd_locked is used to lock the kfd driver during suspend or reset 43 * once locked, kfd driver will stop any further GPU execution. 60 static int kfd_gtt_sa_init(struct kfd_dev *kfd, unsigned int buf_size, 62 static void kfd_gtt_sa_fini(struct kfd_dev *kfd); 64 static int kfd_resume(struct kfd_node *kfd); 66 static void kfd_device_info_set_sdma_info(struct kfd_dev *kfd) argument 68 uint32_t sdma_version = amdgpu_ip_version(kfd->adev, SDMA0_HWIP, 0); 80 kfd->device_info.num_sdma_queues_per_engine = 2; 100 kfd->device_info.num_sdma_queues_per_engine = 8; 106 kfd 130 kfd_device_info_set_event_interrupt_class(struct kfd_dev *kfd) argument 180 kfd_device_info_init(struct kfd_dev *kfd, bool vf, uint32_t gfx_target_version) argument 242 struct kfd_dev *kfd = NULL; local 465 kfd_cwsr_init(struct kfd_dev *kfd) argument 518 struct kfd_dev *kfd = node->kfd; local 600 kfd_cleanup_nodes(struct kfd_dev *kfd, unsigned int num_nodes) argument 652 kgd2kfd_device_init(struct kfd_dev *kfd, const struct kgd2kfd_shared_resources *gpu_resources) argument 882 kgd2kfd_device_exit(struct kfd_dev *kfd) argument 897 kgd2kfd_pre_reset(struct kfd_dev *kfd) argument 925 kgd2kfd_post_reset(struct kfd_dev *kfd) argument 959 kgd2kfd_suspend(struct kfd_dev *kfd, bool run_pm) argument 982 kgd2kfd_resume(struct kfd_dev *kfd, bool run_pm) argument 1036 kgd2kfd_interrupt(struct kfd_dev *kfd, const void *ih_ring_entry) argument 1158 kfd_gtt_sa_init(struct kfd_dev *kfd, unsigned int buf_size, unsigned int chunk_size) argument 1184 kfd_gtt_sa_fini(struct kfd_dev *kfd) argument 1208 struct kfd_dev *kfd = node->kfd; local 1310 struct kfd_dev *kfd = node->kfd; local 1331 kgd2kfd_set_sram_ecc_flag(struct kfd_dev *kfd) argument 1357 kgd2kfd_smi_event_throttle(struct kfd_dev *kfd, uint64_t throttle_bitmask) argument [all...] |
H A D | kfd_doorbell.c | 44 * the /dev/kfd with the particular device encoded in the mmap offset. 45 * There will be other uses for mmap of /dev/kfd, so only a range of 50 size_t kfd_doorbell_process_slice(struct kfd_dev *kfd) argument 52 if (!kfd->shared_resources.enable_mes) 53 return roundup(kfd->device_info.doorbell_size * 58 (struct amdgpu_device *)kfd->adev); 62 int kfd_doorbell_init(struct kfd_dev *kfd) argument 75 kfd->doorbell_bitmap = bitmap_zalloc(size / sizeof(u32), GFP_KERNEL); 76 if (!kfd->doorbell_bitmap) { 82 r = amdgpu_bo_create_kernel(kfd 99 kfd_doorbell_fini(struct kfd_dev *kfd) argument 150 kfd_get_kernel_doorbell(struct kfd_dev *kfd, unsigned int *doorbell_off) argument 178 kfd_release_kernel_doorbell(struct kfd_dev *kfd, u32 __iomem *db_addr) argument 253 kfd_alloc_process_doorbells(struct kfd_dev *kfd, struct kfd_process_device *pdd) argument 293 kfd_free_process_doorbells(struct kfd_dev *kfd, struct kfd_process_device *pdd) argument [all...] |
H A D | kfd_interrupt.c | 58 KFD_IH_NUM_ENTRIES * node->kfd->device_info.ih_ring_entry_size, 118 node->kfd->device_info.ih_ring_entry_size); 119 if (count != node->kfd->device_info.ih_ring_entry_size) { 137 node->kfd->device_info.ih_ring_entry_size); 139 WARN_ON(count && count != node->kfd->device_info.ih_ring_entry_size); 141 return count == node->kfd->device_info.ih_ring_entry_size; 151 if (dev->kfd->device_info.ih_ring_entry_size > sizeof(ih_ring_entry)) { 157 dev->kfd->device_info.event_interrupt_class->interrupt_wq(dev, 176 wanted |= dev->kfd->device_info.event_interrupt_class->interrupt_isr(dev,
|
H A D | kfd_debug.h | 113 && dev->kfd->mec2_fw_version < 0x81b6) || 116 && dev->kfd->mec2_fw_version < 0x1b6) || 118 && dev->kfd->mec2_fw_version < 0x1b6) || 120 && dev->kfd->mec2_fw_version < 0x30) ||
|
H A D | kfd_device_queue_manager_v9.c | 63 if (dqm->dev->kfd->noretry) 66 if (KFD_GC_VERSION(dqm->dev->kfd) == IP_VERSION(9, 4, 3))
|
H A D | kfd_packet_manager_v9.c | 37 struct kfd_node *kfd = pm->dqm->dev; local 55 if (kfd->dqm->trap_debug_vmid && pdd->process->debug_trap_enabled && 57 packet->bitfields2.debug_vmid = kfd->dqm->trap_debug_vmid; 91 struct kfd_dev *kfd = pm->dqm->dev->kfd; local 113 for (i = 0; i < kfd->device_info.num_of_watch_points; i++) 146 struct kfd_node *kfd = pm->dqm->dev; local 151 * of processes in the runlist and kfd module parameter 158 kfd->max_proc_per_quantum); 249 !pm_use_ext_eng(q->device->kfd)) [all...] |
H A D | kfd_debug.c | 366 spin_lock(&pdd->dev->kfd->watch_points_lock); 370 if ((pdd->dev->kfd->alloc_watch_ids >> i) & 0x1) 374 pdd->dev->kfd->alloc_watch_ids |= 0x1 << i; 376 spin_unlock(&pdd->dev->kfd->watch_points_lock); 380 spin_unlock(&pdd->dev->kfd->watch_points_lock); 387 spin_lock(&pdd->dev->kfd->watch_points_lock); 392 pdd->dev->kfd->alloc_watch_ids &= ~(0x1 << watch_id); 395 spin_unlock(&pdd->dev->kfd->watch_points_lock); 402 spin_lock(&pdd->dev->kfd->watch_points_lock); 406 spin_unlock(&pdd->dev->kfd [all...] |
H A D | kfd_kernel_queue.c | 78 prop.doorbell_ptr = kfd_get_kernel_doorbell(dev->kfd, &prop.doorbell_off); 115 retval = kfd_gtt_sa_allocate(dev, dev->kfd->device_info.doorbell_size, 192 kfd_release_kernel_doorbell(dev->kfd, prop.doorbell_ptr); 223 kfd_release_kernel_doorbell(kq->dev->kfd, 305 if (kq->dev->kfd->device_info.doorbell_size == 8) { 320 if (kq->dev->kfd->device_info.doorbell_size == 8) {
|
H A D | kfd_priv.h | 311 struct kfd_dev *kfd; member in struct:kfd_node 569 * @process: The kfd process that created this queue. 571 * @device: The kfd device that created this queue. 691 /* doorbells for kfd process */ 939 /* If the process is a kfd debugger, we need to know so we can clean 1074 size_t kfd_doorbell_process_slice(struct kfd_dev *kfd); 1075 int kfd_doorbell_init(struct kfd_dev *kfd); 1076 void kfd_doorbell_fini(struct kfd_dev *kfd); 1079 void __iomem *kfd_get_kernel_doorbell(struct kfd_dev *kfd, 1081 void kfd_release_kernel_doorbell(struct kfd_dev *kfd, u3 [all...] |
H A D | kfd_flat_memory.c | 332 pdd->dev->kfd->shared_resources.gpuvm_size - 1; 351 pdd->dev->kfd->shared_resources.gpuvm_size - 1;
|
H A D | kfd_device_queue_manager.c | 81 int pipe_offset = (mec * dqm->dev->kfd->shared_resources.num_pipe_per_mec 82 + pipe) * dqm->dev->kfd->shared_resources.num_queue_per_pipe; 85 for (i = 0; i < dqm->dev->kfd->shared_resources.num_queue_per_pipe; ++i) 87 dqm->dev->kfd->shared_resources.cp_queue_bitmap)) 94 return bitmap_weight(dqm->dev->kfd->shared_resources.cp_queue_bitmap, 100 return dqm->dev->kfd->shared_resources.num_queue_per_pipe; 105 return dqm->dev->kfd->shared_resources.num_pipe_per_mec; 117 dqm->dev->kfd->device_info.num_sdma_queues_per_engine; 123 dqm->dev->kfd->device_info.num_sdma_queues_per_engine; 136 dqm->dev->kfd [all...] |
H A D | kfd_mqd_manager_v11.c | 112 if (node->kfd->shared_resources.enable_mes) 135 if (mm->dev->kfd->shared_resources.enable_mes) 167 * DISPATCH_PTR. This is required for the kfd debugger 183 if (mm->dev->kfd->cwsr_enabled) { 272 if (mm->dev->kfd->cwsr_enabled) 405 if (mm->dev->kfd->shared_resources.enable_mes) 556 if (dev->kfd->shared_resources.enable_mes) {
|
H A D | kfd_mqd_manager_v10.c | 76 static struct kfd_mem_obj *allocate_mqd(struct kfd_node *kfd, argument 81 if (kfd_gtt_sa_allocate(kfd, sizeof(struct v10_compute_mqd), 120 * DISPATCH_PTR. This is required for the kfd debugger 129 if (mm->dev->kfd->cwsr_enabled) { 218 if (mm->dev->kfd->cwsr_enabled)
|
H A D | kfd_mqd_manager.c | 75 dev->kfd->device_info.num_sdma_queues_per_engine + 112 cu_active_per_node = cu_info->number / mm->dev->kfd->num_nodes;
|
H A D | kfd_topology.c | 512 __ilog2_u32(dev->gpu->kfd->device_info.num_of_watch_points); 534 dev->gpu->kfd->mec_fw_version); 540 dev->gpu->kfd->sdma_fw_version); 1120 /* kfd_assign_gpu - Attach @gpu to the correct kfd topology device. If 1212 if (!dev->gpu->kfd->pci_atomic_requested || 1517 (dev->gpu->kfd->hive_id && 1518 dev->gpu->kfd->hive_id == new_dev->gpu->kfd->hive_id)) 1857 firmware_supported = dev->gpu->kfd->mec_fw_version >= 459 + 32768; 1864 firmware_supported = dev->gpu->kfd [all...] |
H A D | kfd_process.c | 815 * take kfd processes mutex before starting of process creation 827 /* A prior open of /dev/kfd could have already created the process. */ 1039 kfd_free_process_doorbells(pdd->dev->kfd, pdd); 1041 if (pdd->dev->kfd->shared_resources.enable_mes) 1295 if (!dev->kfd->cwsr_enabled || qpd->cwsr_kaddr || qpd->cwsr_base) 1312 memcpy(qpd->cwsr_kaddr, dev->kfd->cwsr_isa, dev->kfd->cwsr_isa_size); 1337 if (!dev->kfd->cwsr_enabled || qpd->cwsr_kaddr || !qpd->cwsr_base) 1350 memcpy(qpd->cwsr_kaddr, dev->kfd->cwsr_isa, dev->kfd [all...] |
H A D | kfd_process_queue_manager.c | 90 if (dev->kfd->shared_resources.enable_mes) 129 if (KFD_GC_VERSION(dev) != IP_VERSION(9, 4, 3) && !dev->kfd->shared_resources.enable_mes) { 192 !dev->kfd->shared_resources.enable_mes) 198 if (dev->kfd->shared_resources.enable_mes) { 246 if (dev->kfd->shared_resources.enable_mes) { 312 max_queues = dev->kfd->device_info.max_no_of_hqd/2; 412 pdd->dev->kfd->device_info.doorbell_size);
|
H A D | kfd_mqd_manager_vi.c | 79 static struct kfd_mem_obj *allocate_mqd(struct kfd_node *kfd, argument 84 if (kfd_gtt_sa_allocate(kfd, sizeof(struct vi_mqd), 138 if (mm->dev->kfd->cwsr_enabled && q->ctx_save_restore_area_address) { 229 if (mm->dev->kfd->cwsr_enabled && q->ctx_save_restore_area_address)
|
H A D | kfd_mqd_manager.h | 55 * @dev: The kfd device structure coupled with this module. 65 * ASIC. Currently the kfd driver supports only Kaveri so there are instances 71 struct kfd_mem_obj* (*allocate_mqd)(struct kfd_node *kfd,
|
/linux-master/drivers/gpu/drm/amd/amdgpu/ |
H A D | amdgpu_amdkfd.h | 408 bool kgd2kfd_device_init(struct kfd_dev *kfd, 410 void kgd2kfd_device_exit(struct kfd_dev *kfd); 411 void kgd2kfd_suspend(struct kfd_dev *kfd, bool run_pm); 412 int kgd2kfd_resume(struct kfd_dev *kfd, bool run_pm); 413 int kgd2kfd_pre_reset(struct kfd_dev *kfd); 414 int kgd2kfd_post_reset(struct kfd_dev *kfd); 415 void kgd2kfd_interrupt(struct kfd_dev *kfd, const void *ih_ring_entry); 416 void kgd2kfd_set_sram_ecc_flag(struct kfd_dev *kfd); 417 void kgd2kfd_smi_event_throttle(struct kfd_dev *kfd, uint64_t throttle_bitmask); 437 bool kgd2kfd_device_init(struct kfd_dev *kfd, argument 443 kgd2kfd_device_exit(struct kfd_dev *kfd) argument 447 kgd2kfd_suspend(struct kfd_dev *kfd, bool run_pm) argument 451 kgd2kfd_resume(struct kfd_dev *kfd, bool run_pm) argument 456 kgd2kfd_pre_reset(struct kfd_dev *kfd) argument 461 kgd2kfd_post_reset(struct kfd_dev *kfd) argument 467 kgd2kfd_interrupt(struct kfd_dev *kfd, const void *ih_ring_entry) argument 472 kgd2kfd_set_sram_ecc_flag(struct kfd_dev *kfd) argument 477 kgd2kfd_smi_event_throttle(struct kfd_dev *kfd, uint64_t throttle_bitmask) argument [all...] |
H A D | amdgpu_amdkfd.c | 77 adev->kfd.dev = kgd2kfd_probe(adev, vf); 128 kfd.reset_work); 149 if (!adev->kfd.init_complete || adev->kfd.client.dev) 152 ret = drm_client_init(&adev->ddev, &adev->kfd.client, "kfd", 160 drm_client_register(&adev->kfd.client); 172 if (adev->kfd.dev) { 223 adev->kfd.init_complete = kgd2kfd_device_init(adev->kfd [all...] |
H A D | amdgpu_umc.c | 185 kgd2kfd_set_sram_ecc_flag(adev->kfd.dev); 236 kgd2kfd_set_sram_ecc_flag(adev->kfd.dev); 260 kgd2kfd_set_sram_ecc_flag(adev->kfd.dev);
|
/linux-master/samples/bpf/ |
H A D | task_fd_query_user.c | 234 int err = -1, res, kfd, efd; local 240 kfd = open(buf, O_WRONLY | O_TRUNC, 0); 241 CHECK_PERROR_RET(kfd < 0); 250 CHECK_PERROR_RET(write(kfd, buf, strlen(buf)) < 0); 252 close(kfd); 253 kfd = -1; 270 kfd = sys_perf_event_open(&attr, -1, 0, -1, PERF_FLAG_FD_CLOEXEC); 271 link = bpf_program__attach_perf_event(progs[0], kfd); 275 close(kfd); 280 err = bpf_task_fd_query(getpid(), kfd, [all...] |
/linux-master/tools/perf/util/ |
H A D | probe-file.h | 42 int probe_file__open_both(int *kfd, int *ufd, int flag);
|
/linux-master/tools/perf/ |
H A D | builtin-probe.c | 443 int ret, ret2, ufd = -1, kfd = -1; local 457 ret = probe_file__open_both(&kfd, &ufd, PF_FL_RW); 468 ret = probe_file__get_events(kfd, filter, klist); 473 ret = probe_file__del_strlist(kfd, klist); 496 if (kfd >= 0) 497 close(kfd);
|