/openbsd/sys/dev/pci/drm/amd/amdkfd/ |
H A D | kfd_device.c | 432 kfd = kzalloc(sizeof(*kfd), GFP_KERNEL); in kgd2kfd_probe() 493 struct kfd_dev *kfd = node->kfd; in kfd_gws_init() local 722 kfd->adev, size, &kfd->gtt_mem, in kgd2kfd_device_init() 744 kfd->hive_id = kfd->adev->gmc.xgmi.hive_id; in kgd2kfd_device_init() 752 kfd->hive_id = pci_dev_id(kfd->adev->pdev); in kgd2kfd_device_init() 754 kfd->noretry = kfd->adev->gmc.noretry; in kgd2kfd_device_init() 769 node->kfd = kfd; in kgd2kfd_device_init() 861 kfd_cleanup_nodes(kfd, kfd->num_nodes); in kgd2kfd_device_exit() 1183 struct kfd_dev *kfd = node->kfd; in kfd_gtt_sa_allocate() local 1285 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_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_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_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_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_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_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 | 1038 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()
|
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_crat.c | 1526 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()
|
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()
|
H A D | kfd_mqd_manager_v9.c | 44 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()
|
H A D | kfd_packet_manager_vi.c | 80 struct kfd_node *kfd = pm->dqm->dev; in pm_runlist_vi() local 95 kfd->max_proc_per_quantum); in pm_runlist_vi()
|
/openbsd/sys/dev/pci/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 | 132 kfd.reset_work); in amdgpu_amdkfd_reset_work() 152 if (adev->kfd.dev) { in amdgpu_amdkfd_device_init() 203 adev->kfd.init_complete = kgd2kfd_device_init(adev->kfd.dev, in amdgpu_amdkfd_device_init() 214 if (adev->kfd.dev) { in amdgpu_amdkfd_device_fini_sw() 216 adev->kfd.dev = NULL; in amdgpu_amdkfd_device_fini_sw() 224 if (adev->kfd.dev) in amdgpu_amdkfd_interrupt() 230 if (adev->kfd.dev) in amdgpu_amdkfd_suspend() 238 if (adev->kfd.dev) in amdgpu_amdkfd_resume() 248 if (adev->kfd.dev) in amdgpu_amdkfd_pre_reset() 258 if (adev->kfd.dev) in amdgpu_amdkfd_post_reset() [all …]
|
/openbsd/usr.sbin/rdsetroot/ |
H A D | rdsetroot.c | 50 int ch, debug = 0, fsfd, kfd, n, sflag = 0, xflag = 0; in main() local 81 if ((kfd = open(kernel, xflag ? O_RDONLY : O_RDWR)) < 0) in main() 104 if ((e = elf_begin(kfd, xflag ? ELF_C_READ : ELF_C_RDWR, NULL)) == NULL) in main() 161 MAP_SHARED, kfd, mmap_off); in main()
|
/openbsd/usr.sbin/acme-client/ |
H A D | netproc.c | 660 netproc(int kfd, int afd, int Cfd, int cfd, int dfd, int rfd, in netproc() argument 710 if ((lval = readop(kfd, COMM_KEY_STAT)) == 0) { in netproc() 849 if ((cert = readstr(kfd, COMM_CERT)) == NULL) in netproc() 895 close(kfd); in netproc()
|