Home
last modified time | relevance | path

Searched refs:kfd (Results 1 – 25 of 47) sorted by relevance

12

/Linux-v6.6/drivers/gpu/drm/amd/amdkfd/
Dkfd_device.c60 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) in kfd_device_info_set_sdma_info() argument
68 uint32_t sdma_version = kfd->adev->ip_versions[SDMA0_HWIP][0]; in kfd_device_info_set_sdma_info()
80 kfd->device_info.num_sdma_queues_per_engine = 2; in kfd_device_info_set_sdma_info()
98 kfd->device_info.num_sdma_queues_per_engine = 8; in kfd_device_info_set_sdma_info()
104 kfd->device_info.num_sdma_queues_per_engine = 8; in kfd_device_info_set_sdma_info()
107 bitmap_zero(kfd->device_info.reserved_sdma_queues_bitmap, KFD_MAX_SDMA_QUEUES); in kfd_device_info_set_sdma_info()
115 kfd->device_info.num_reserved_sdma_queues_per_engine = 2; in kfd_device_info_set_sdma_info()
[all …]
Dkfd_doorbell.c50 size_t kfd_doorbell_process_slice(struct kfd_dev *kfd) in kfd_doorbell_process_slice() argument
52 if (!kfd->shared_resources.enable_mes) in kfd_doorbell_process_slice()
53 return roundup(kfd->device_info.doorbell_size * in kfd_doorbell_process_slice()
58 (struct amdgpu_device *)kfd->adev); in kfd_doorbell_process_slice()
62 int kfd_doorbell_init(struct kfd_dev *kfd) in kfd_doorbell_init() argument
75 kfd->doorbell_bitmap = bitmap_zalloc(size / sizeof(u32), GFP_KERNEL); in kfd_doorbell_init()
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()
88 (void **)&kfd->doorbell_kernel_ptr); in kfd_doorbell_init()
[all …]
Dkfd_interrupt.c58 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()
Dkfd_debug.c366 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()
392 pdd->dev->kfd->alloc_watch_ids &= ~(0x1 << watch_id); 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()
[all …]
Dkfd_packet_manager_v9.c37 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()
Dkfd_device_queue_manager.c81 int pipe_offset = (mec * dqm->dev->kfd->shared_resources.num_pipe_per_mec in is_pipe_enabled()
82 + pipe) * dqm->dev->kfd->shared_resources.num_queue_per_pipe; in is_pipe_enabled()
85 for (i = 0; i < dqm->dev->kfd->shared_resources.num_queue_per_pipe; ++i) in is_pipe_enabled()
87 dqm->dev->kfd->shared_resources.cp_queue_bitmap)) in is_pipe_enabled()
94 return bitmap_weight(dqm->dev->kfd->shared_resources.cp_queue_bitmap, in get_cp_queues_num()
100 return dqm->dev->kfd->shared_resources.num_queue_per_pipe; in get_queues_per_pipe()
105 return dqm->dev->kfd->shared_resources.num_pipe_per_mec; in get_pipes_per_mec()
117 dqm->dev->kfd->device_info.num_sdma_queues_per_engine; in get_num_sdma_queues()
123 dqm->dev->kfd->device_info.num_sdma_queues_per_engine; in get_num_xgmi_sdma_queues()
136 dqm->dev->kfd->device_info.reserved_sdma_queues_bitmap, in init_sdma_bitmaps()
[all …]
Dkfd_debug.h113 && 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()
Dkfd_priv.h311 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,
1081 void kfd_release_kernel_doorbell(struct kfd_dev *kfd, u32 __iomem *db_addr);
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()
[all …]
Dkfd_kernel_queue.c78 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()
Dkfd_flat_memory.c331 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()
359 pdd->qpd.cwsr_base = pdd->dev->kfd->shared_resources.gpuvm_size; in kfd_init_apertures_v9()
Dkfd_device_queue_manager_v9.c63 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()
Dkfd_mqd_manager_v11.c112 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()
271 if (mm->dev->kfd->cwsr_enabled) in update_mqd()
404 if (mm->dev->kfd->shared_resources.enable_mes) in init_mqd_sdma()
555 if (dev->kfd->shared_resources.enable_mes) { in mqd_manager_init_v11()
Dkfd_topology.c512 __ilog2_u32(dev->gpu->kfd->device_info.num_of_watch_points); in node_show()
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()
1512 (dev->gpu->kfd->hive_id && in kfd_dev_create_p2p_links()
1513 dev->gpu->kfd->hive_id == new_dev->gpu->kfd->hive_id)) in kfd_dev_create_p2p_links()
1839 firmware_supported = dev->gpu->kfd->mec_fw_version >= 459 + 32768; in kfd_topology_set_dbg_firmware_support()
1846 firmware_supported = dev->gpu->kfd->mec_fw_version >= 459; in kfd_topology_set_dbg_firmware_support()
1849 firmware_supported = dev->gpu->kfd->mec_fw_version >= 60; in kfd_topology_set_dbg_firmware_support()
1852 firmware_supported = dev->gpu->kfd->mec_fw_version >= 51; in kfd_topology_set_dbg_firmware_support()
[all …]
Dkfd_mqd_manager_vi.c79 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()
Dkfd_mqd_manager_v10.c76 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()
217 if (mm->dev->kfd->cwsr_enabled) in update_mqd()
Dkfd_process.c1038 kfd_free_process_doorbells(pdd->dev->kfd, pdd); in kfd_process_destroy_pdds()
1040 if (pdd->dev->kfd->shared_resources.enable_mes) in kfd_process_destroy_pdds()
1291 if (!dev->kfd->cwsr_enabled || qpd->cwsr_kaddr || qpd->cwsr_base) in kfd_process_init_cwsr_apu()
1308 memcpy(qpd->cwsr_kaddr, dev->kfd->cwsr_isa, dev->kfd->cwsr_isa_size); in kfd_process_init_cwsr_apu()
1333 if (!dev->kfd->cwsr_enabled || qpd->cwsr_kaddr || !qpd->cwsr_base) in kfd_process_device_init_cwsr_dgpu()
1346 memcpy(qpd->cwsr_kaddr, dev->kfd->cwsr_isa, dev->kfd->cwsr_isa_size); in kfd_process_device_init_cwsr_dgpu()
1363 if (!dev->kfd->cwsr_enabled || !qpd->cwsr_kaddr || !qpd->cwsr_base) in kfd_process_device_destroy_cwsr_dgpu()
1430 if (dev->kfd->noretry) in kfd_process_xnack_mode()
1589 if (dev->kfd->shared_resources.enable_mes) { in kfd_create_process_device_data()
2107 if (KFD_GC_VERSION(pdd->dev->kfd) == IP_VERSION(9, 4, 3)) { in kfd_process_drain_interrupts()
Dkfd_process_queue_manager.c126 if (KFD_GC_VERSION(dev) != IP_VERSION(9, 4, 3) && !dev->kfd->shared_resources.enable_mes) { in pqm_set_gws()
179 !pqn->q->device->kfd->shared_resources.enable_mes) in pqm_uninit()
215 if (dev->kfd->shared_resources.enable_mes) { in init_user_queue()
281 max_queues = dev->kfd->device_info.max_no_of_hqd/2; in pqm_create_queue()
465 !dev->kfd->shared_resources.enable_mes) in pqm_destroy_queue()
472 if (dev->kfd->shared_resources.enable_mes) { in pqm_destroy_queue()
Dkfd_mqd_manager.c75 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()
Dkfd_crat.c1526 kfd_fill_gpu_cache_info_from_gfx_config(kdev->kfd, *pcache_info); in kfd_get_gpu_cache_info()
1990 bool use_ta_info = kdev->kfd->num_nodes == 1; in kfd_fill_gpu_xgmi_link_to_gpu()
2016 bool is_single_hop = kdev->kfd == peer_kdev->kfd; in kfd_fill_gpu_xgmi_link_to_gpu()
2091 (cu_info.cu_active_number / kdev->kfd->num_nodes); in kfd_create_vcrat_image_gpu()
2166 if (kdev->kfd->hive_id) { in kfd_create_vcrat_image_gpu()
2171 if (peer_dev->gpu->kfd->hive_id != kdev->kfd->hive_id) in kfd_create_vcrat_image_gpu()
Dkfd_mqd_manager_v9.c44 if (mm->dev->kfd->cwsr_enabled && in mqd_stride_v9()
132 if (node->kfd->cwsr_enabled && (q->type == KFD_QUEUE_TYPE_COMPUTE)) { in allocate_mqd()
207 if (mm->dev->kfd->cwsr_enabled && q->ctx_save_restore_area_address) { in init_mqd()
299 if (mm->dev->kfd->cwsr_enabled && q->ctx_save_restore_area_address) in update_mqd()
636 if (mm->dev->kfd->cwsr_enabled && in init_mqd_v9_4_3()
/Linux-v6.6/drivers/gpu/drm/amd/amdgpu/
Damdgpu_amdkfd.h397 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);
404 void kgd2kfd_interrupt(struct kfd_dev *kfd, const void *ih_ring_entry);
405 void kgd2kfd_set_sram_ecc_flag(struct kfd_dev *kfd);
406 void kgd2kfd_smi_event_throttle(struct kfd_dev *kfd, uint64_t throttle_bitmask);
426 bool kgd2kfd_device_init(struct kfd_dev *kfd, in kgd2kfd_device_init() argument
[all …]
Damdgpu_amdkfd.c76 adev->kfd.dev = kgd2kfd_probe(adev, vf); in amdgpu_amdkfd_device_probe()
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()
203 INIT_WORK(&adev->kfd.reset_work, amdgpu_amdkfd_reset_work); in amdgpu_amdkfd_device_init()
209 if (adev->kfd.dev) { in amdgpu_amdkfd_device_fini_sw()
210 kgd2kfd_device_exit(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()
220 kgd2kfd_interrupt(adev->kfd.dev, ih_ring_entry); in amdgpu_amdkfd_interrupt()
[all …]
/Linux-v6.6/samples/bpf/
Dtask_fd_query_user.c234 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()
/Linux-v6.6/tools/perf/
Dbuiltin-probe.c443 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()
/Linux-v6.6/tools/perf/util/
Dprobe-file.c152 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()

12