/openbmc/linux/drivers/gpu/drm/amd/amdkfd/ |
H A D | kfd_device.c | 425 kfd = kzalloc(sizeof(*kfd), GFP_KERNEL); in kgd2kfd_probe() 486 struct kfd_dev *kfd = node->kfd; in kfd_gws_init() local 715 kfd->adev, size, &kfd->gtt_mem, in kgd2kfd_device_init() 737 kfd->hive_id = kfd->adev->gmc.xgmi.hive_id; in kgd2kfd_device_init() 745 kfd->hive_id = pci_dev_id(kfd->adev->pdev); in kgd2kfd_device_init() 747 kfd->noretry = kfd->adev->gmc.noretry; in kgd2kfd_device_init() 762 node->kfd = kfd; in kgd2kfd_device_init() 854 kfd_cleanup_nodes(kfd, kfd->num_nodes); in kgd2kfd_device_exit() 1176 struct kfd_dev *kfd = node->kfd; in kfd_gtt_sa_allocate() local 1278 struct kfd_dev *kfd = node->kfd; in kfd_gtt_sa_free() local [all …]
|
H A D | kfd_doorbell.c | 52 if (!kfd->shared_resources.enable_mes) in kfd_doorbell_process_slice() 76 if (!kfd->doorbell_bitmap) { in kfd_doorbell_init() 82 r = amdgpu_bo_create_kernel(kfd->adev, in kfd_doorbell_init() 86 &kfd->doorbells, in kfd_doorbell_init() 91 bitmap_free(kfd->doorbell_bitmap); in kfd_doorbell_init() 101 bitmap_free(kfd->doorbell_bitmap); in kfd_doorbell_fini() 155 mutex_lock(&kfd->doorbell_mutex); in kfd_get_kernel_doorbell() 159 mutex_unlock(&kfd->doorbell_mutex); in kfd_get_kernel_doorbell() 165 kfd->doorbells, in kfd_get_kernel_doorbell() 185 mutex_lock(&kfd->doorbell_mutex); in kfd_release_kernel_doorbell() [all …]
|
H A D | kfd_interrupt.c | 58 KFD_IH_NUM_ENTRIES * node->kfd->device_info.ih_ring_entry_size, in kfd_interrupt_init() 118 node->kfd->device_info.ih_ring_entry_size); in enqueue_ih_ring_entry() 119 if (count != node->kfd->device_info.ih_ring_entry_size) { in enqueue_ih_ring_entry() 137 node->kfd->device_info.ih_ring_entry_size); in dequeue_ih_ring_entry() 139 WARN_ON(count && count != node->kfd->device_info.ih_ring_entry_size); in dequeue_ih_ring_entry() 141 return count == node->kfd->device_info.ih_ring_entry_size; in dequeue_ih_ring_entry() 151 if (dev->kfd->device_info.ih_ring_entry_size > sizeof(ih_ring_entry)) { in interrupt_wq() 157 dev->kfd->device_info.event_interrupt_class->interrupt_wq(dev, in interrupt_wq() 176 wanted |= dev->kfd->device_info.event_interrupt_class->interrupt_isr(dev, in interrupt_is_wanted()
|
H A D | kfd_debug.c | 366 spin_lock(&pdd->dev->kfd->watch_points_lock); in kfd_dbg_get_dev_watch_id() 370 if ((pdd->dev->kfd->alloc_watch_ids >> i) & 0x1) in kfd_dbg_get_dev_watch_id() 374 pdd->dev->kfd->alloc_watch_ids |= 0x1 << i; in kfd_dbg_get_dev_watch_id() 376 spin_unlock(&pdd->dev->kfd->watch_points_lock); in kfd_dbg_get_dev_watch_id() 380 spin_unlock(&pdd->dev->kfd->watch_points_lock); in kfd_dbg_get_dev_watch_id() 387 spin_lock(&pdd->dev->kfd->watch_points_lock); in kfd_dbg_clear_dev_watch_id() 395 spin_unlock(&pdd->dev->kfd->watch_points_lock); in kfd_dbg_clear_dev_watch_id() 402 spin_lock(&pdd->dev->kfd->watch_points_lock); in kfd_dbg_owns_dev_watch_id() 406 spin_unlock(&pdd->dev->kfd->watch_points_lock); in kfd_dbg_owns_dev_watch_id() 431 if (!pdd->dev->kfd->shared_resources.enable_mes) in kfd_dbg_trap_clear_dev_address_watch() [all …]
|
H A D | kfd_packet_manager_v9.c | 37 struct kfd_node *kfd = pm->dqm->dev; in pm_map_process_v9() local 55 if (kfd->dqm->trap_debug_vmid && pdd->process->debug_trap_enabled && in pm_map_process_v9() 57 packet->bitfields2.debug_vmid = kfd->dqm->trap_debug_vmid; in pm_map_process_v9() 91 struct kfd_dev *kfd = pm->dqm->dev->kfd; in pm_map_process_aldebaran() local 113 for (i = 0; i < kfd->device_info.num_of_watch_points; i++) in pm_map_process_aldebaran() 146 struct kfd_node *kfd = pm->dqm->dev; in pm_runlist_v9() local 158 kfd->max_proc_per_quantum); in pm_runlist_v9() 248 !pm_use_ext_eng(q->device->kfd)) in pm_map_queues_v9() 337 pm_use_ext_eng(pm->dqm->dev->kfd) ? in pm_unmap_queues_v9()
|
H A D | kfd_debug.h | 113 && dev->kfd->mec2_fw_version < 0x81b6) || in kfd_dbg_has_gws_support() 116 && dev->kfd->mec2_fw_version < 0x1b6) || in kfd_dbg_has_gws_support() 118 && dev->kfd->mec2_fw_version < 0x1b6) || in kfd_dbg_has_gws_support() 120 && dev->kfd->mec2_fw_version < 0x30) || in kfd_dbg_has_gws_support()
|
H A D | kfd_device_queue_manager.c | 411 dev->kfd->device_info.doorbell_size); in allocate_doorbell() 872 if (!dqm->dev->kfd->shared_resources.enable_mes) in update_queue() 893 (dqm->dev->kfd->cwsr_enabled ? in update_queue() 930 if (!dqm->dev->kfd->shared_resources.enable_mes) in update_queue() 1072 (dqm->dev->kfd->cwsr_enabled ? in evict_process_queues_nocpsch() 1132 if (!dqm->dev->kfd->shared_resources.enable_mes) in evict_process_queues_cpsch() 1275 if (!dqm->dev->kfd->shared_resources.enable_mes) in restore_process_queues_cpsch() 1663 if (!dqm->dev->kfd->shared_resources.enable_mes) in start_cpsch() 1689 if (!dqm->dev->kfd->shared_resources.enable_mes) in start_cpsch() 1716 if (!dqm->dev->kfd->shared_resources.enable_mes) in stop_cpsch() [all …]
|
H A D | kfd_kernel_queue.c | 78 prop.doorbell_ptr = kfd_get_kernel_doorbell(dev->kfd, &prop.doorbell_off); in kq_initialize() 115 retval = kfd_gtt_sa_allocate(dev, dev->kfd->device_info.doorbell_size, in kq_initialize() 192 kfd_release_kernel_doorbell(dev->kfd, prop.doorbell_ptr); in kq_initialize() 223 kfd_release_kernel_doorbell(kq->dev->kfd, in kq_uninitialize() 301 if (kq->dev->kfd->device_info.doorbell_size == 8) { in kq_submit_packet() 314 if (kq->dev->kfd->device_info.doorbell_size == 8) { in kq_rollback_packet()
|
H A D | kfd_priv.h | 311 struct kfd_dev *kfd; member 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, 1085 unsigned int kfd_get_doorbell_dw_offset_in_bar(struct kfd_dev *kfd, 1089 int kfd_alloc_process_doorbells(struct kfd_dev *kfd, 1091 void kfd_free_process_doorbells(struct kfd_dev *kfd, 1128 struct kfd_dev *dev = adev->kfd.dev; in kfd_node_by_irq_ids() 1424 uint64_t kfd_get_number_elems(struct kfd_dev *kfd); [all …]
|
H A D | kfd_device_queue_manager_v9.c | 63 if (dqm->dev->kfd->noretry) in update_qpd_v9() 66 if (KFD_GC_VERSION(dqm->dev->kfd) == IP_VERSION(9, 4, 3)) in update_qpd_v9()
|
H A D | kfd_mqd_manager_v11.c | 112 if (node->kfd->shared_resources.enable_mes) in allocate_mqd() 135 if (mm->dev->kfd->shared_resources.enable_mes) in init_mqd() 183 if (mm->dev->kfd->cwsr_enabled) { in init_mqd() 272 if (mm->dev->kfd->cwsr_enabled) in update_mqd() 405 if (mm->dev->kfd->shared_resources.enable_mes) in init_mqd_sdma() 556 if (dev->kfd->shared_resources.enable_mes) { in mqd_manager_init_v11()
|
H A D | kfd_flat_memory.c | 331 pdd->dev->kfd->shared_resources.gpuvm_size - 1; in kfd_init_apertures_vi() 350 pdd->dev->kfd->shared_resources.gpuvm_size - 1; in kfd_init_apertures_v9()
|
H A D | kfd_topology.c | 534 dev->gpu->kfd->mec_fw_version); in node_show() 540 dev->gpu->kfd->sdma_fw_version); in node_show() 1212 if (!dev->gpu->kfd->pci_atomic_requested || in kfd_set_iolink_no_atomics() 1517 (dev->gpu->kfd->hive_id && in kfd_dev_create_p2p_links() 1518 dev->gpu->kfd->hive_id == new_dev->gpu->kfd->hive_id)) in kfd_dev_create_p2p_links() 1854 firmware_supported = dev->gpu->kfd->mec_fw_version >= 60; in kfd_topology_set_dbg_firmware_support() 1981 gpu->kfd->device_info.gfx_target_version; in kfd_topology_add_device() 1989 if (KFD_GC_VERSION(dev->gpu->kfd) == IP_VERSION(9, 4, 3)) in kfd_topology_add_device() 2002 gpu->kfd->shared_resources.drm_render_minor; in kfd_topology_add_device() 2004 dev->node_props.hive_id = gpu->kfd->hive_id; in kfd_topology_add_device() [all …]
|
H A D | kfd_mqd_manager_vi.c | 79 static struct kfd_mem_obj *allocate_mqd(struct kfd_node *kfd, in allocate_mqd() argument 84 if (kfd_gtt_sa_allocate(kfd, sizeof(struct vi_mqd), in allocate_mqd() 138 if (mm->dev->kfd->cwsr_enabled && q->ctx_save_restore_area_address) { in init_mqd() 229 if (mm->dev->kfd->cwsr_enabled && q->ctx_save_restore_area_address) in __update_mqd()
|
H A D | kfd_mqd_manager_v10.c | 76 static struct kfd_mem_obj *allocate_mqd(struct kfd_node *kfd, in allocate_mqd() argument 81 if (kfd_gtt_sa_allocate(kfd, sizeof(struct v10_compute_mqd), in allocate_mqd() 129 if (mm->dev->kfd->cwsr_enabled) { in init_mqd() 218 if (mm->dev->kfd->cwsr_enabled) in update_mqd()
|
H A D | kfd_process.c | 1046 kfd_free_process_doorbells(pdd->dev->kfd, pdd); in kfd_process_destroy_pdds() 1048 if (pdd->dev->kfd->shared_resources.enable_mes) in kfd_process_destroy_pdds() 1299 if (!dev->kfd->cwsr_enabled || qpd->cwsr_kaddr || qpd->cwsr_base) in kfd_process_init_cwsr_apu() 1316 memcpy(qpd->cwsr_kaddr, dev->kfd->cwsr_isa, dev->kfd->cwsr_isa_size); in kfd_process_init_cwsr_apu() 1341 if (!dev->kfd->cwsr_enabled || qpd->cwsr_kaddr || !qpd->cwsr_base) in kfd_process_device_init_cwsr_dgpu() 1354 memcpy(qpd->cwsr_kaddr, dev->kfd->cwsr_isa, dev->kfd->cwsr_isa_size); in kfd_process_device_init_cwsr_dgpu() 1371 if (!dev->kfd->cwsr_enabled || !qpd->cwsr_kaddr || !qpd->cwsr_base) in kfd_process_device_destroy_cwsr_dgpu() 1438 if (dev->kfd->noretry) in kfd_process_xnack_mode() 1597 if (dev->kfd->shared_resources.enable_mes) { in kfd_create_process_device_data() 2115 if (KFD_GC_VERSION(pdd->dev->kfd) == IP_VERSION(9, 4, 3)) { in kfd_process_drain_interrupts()
|
H A D | kfd_process_queue_manager.c | 90 if (dev->kfd->shared_resources.enable_mes) in kfd_process_dequeue_from_device() 128 if (KFD_GC_VERSION(dev) != IP_VERSION(9, 4, 3) && !dev->kfd->shared_resources.enable_mes) { in pqm_set_gws() 190 !dev->kfd->shared_resources.enable_mes) in pqm_clean_queue_resource() 196 if (dev->kfd->shared_resources.enable_mes) { in pqm_clean_queue_resource() 244 if (dev->kfd->shared_resources.enable_mes) { in init_user_queue() 310 max_queues = dev->kfd->device_info.max_no_of_hqd/2; in pqm_create_queue() 410 pdd->dev->kfd->device_info.doorbell_size); in pqm_create_queue()
|
H A D | kfd_mqd_manager.c | 75 dev->kfd->device_info.num_sdma_queues_per_engine + in allocate_sdma_mqd() 113 cu_active_per_node = cu_info.cu_active_number / mm->dev->kfd->num_nodes; in mqd_symmetrically_map_cu_mask()
|
/openbmc/linux/drivers/gpu/drm/amd/amdgpu/ |
H A D | amdgpu_amdkfd.h | 397 bool kgd2kfd_device_init(struct kfd_dev *kfd, 399 void kgd2kfd_device_exit(struct kfd_dev *kfd); 400 void kgd2kfd_suspend(struct kfd_dev *kfd, bool run_pm); 401 int kgd2kfd_resume(struct kfd_dev *kfd, bool run_pm); 402 int kgd2kfd_pre_reset(struct kfd_dev *kfd); 403 int kgd2kfd_post_reset(struct kfd_dev *kfd); 405 void kgd2kfd_set_sram_ecc_flag(struct kfd_dev *kfd); 426 bool kgd2kfd_device_init(struct kfd_dev *kfd, in kgd2kfd_device_init() argument 445 static inline int kgd2kfd_pre_reset(struct kfd_dev *kfd) in kgd2kfd_pre_reset() argument 450 static inline int kgd2kfd_post_reset(struct kfd_dev *kfd) in kgd2kfd_post_reset() argument [all …]
|
H A D | amdgpu_amdkfd.c | 127 kfd.reset_work); in amdgpu_amdkfd_reset_work() 147 if (adev->kfd.dev) { in amdgpu_amdkfd_device_init() 198 adev->kfd.init_complete = kgd2kfd_device_init(adev->kfd.dev, in amdgpu_amdkfd_device_init() 209 if (adev->kfd.dev) { in amdgpu_amdkfd_device_fini_sw() 211 adev->kfd.dev = NULL; in amdgpu_amdkfd_device_fini_sw() 219 if (adev->kfd.dev) in amdgpu_amdkfd_interrupt() 225 if (adev->kfd.dev) in amdgpu_amdkfd_suspend() 233 if (adev->kfd.dev) in amdgpu_amdkfd_resume() 243 if (adev->kfd.dev) in amdgpu_amdkfd_pre_reset() 253 if (adev->kfd.dev) in amdgpu_amdkfd_post_reset() [all …]
|
/openbmc/u-boot/tools/ |
H A D | fit_check_sign.c | 38 int kfd = -1; in main() local 76 kfd = mmap_fdt(cmdname, keyfile, 0, &key_blob, &ksbuf, false); in main() 77 if (kfd < 0) in main() 94 close(kfd); in main()
|
/openbmc/linux/samples/bpf/ |
H A D | task_fd_query_user.c | 234 int err = -1, res, kfd, efd; in test_debug_fs_uprobe() local 240 kfd = open(buf, O_WRONLY | O_TRUNC, 0); in test_debug_fs_uprobe() 241 CHECK_PERROR_RET(kfd < 0); in test_debug_fs_uprobe() 250 CHECK_PERROR_RET(write(kfd, buf, strlen(buf)) < 0); in test_debug_fs_uprobe() 252 close(kfd); in test_debug_fs_uprobe() 253 kfd = -1; in test_debug_fs_uprobe() 270 kfd = sys_perf_event_open(&attr, -1, 0, -1, PERF_FLAG_FD_CLOEXEC); in test_debug_fs_uprobe() 271 link = bpf_program__attach_perf_event(progs[0], kfd); in test_debug_fs_uprobe() 275 close(kfd); in test_debug_fs_uprobe() 280 err = bpf_task_fd_query(getpid(), kfd, 0, buf, &len, in test_debug_fs_uprobe()
|
/openbmc/linux/tools/perf/ |
H A D | builtin-probe.c | 443 int ret, ret2, ufd = -1, kfd = -1; in perf_del_probe_events() local 457 ret = probe_file__open_both(&kfd, &ufd, PF_FL_RW); in perf_del_probe_events() 468 ret = probe_file__get_events(kfd, filter, klist); in perf_del_probe_events() 473 ret = probe_file__del_strlist(kfd, klist); in perf_del_probe_events() 496 if (kfd >= 0) in perf_del_probe_events() 497 close(kfd); in perf_del_probe_events()
|
/openbmc/linux/tools/perf/util/ |
H A D | probe-file.c | 152 int probe_file__open_both(int *kfd, int *ufd, int flag) in probe_file__open_both() argument 154 if (!kfd || !ufd) in probe_file__open_both() 157 *kfd = open_kprobe_events(flag & PF_FL_RW); in probe_file__open_both() 159 if (*kfd < 0 && *ufd < 0) { in probe_file__open_both() 160 print_both_open_warning(*kfd, *ufd, flag & PF_FL_RW); in probe_file__open_both() 161 return *kfd; in probe_file__open_both()
|
H A D | probe-file.h | 42 int probe_file__open_both(int *kfd, int *ufd, int flag);
|