/openbsd-current/sys/dev/pci/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 = kfd->adev->ip_versions[SDMA0_HWIP][0]; 80 kfd->device_info.num_sdma_queues_per_engine = 2; 98 kfd->device_info.num_sdma_queues_per_engine = 8; 104 kfd 126 kfd_device_info_set_event_interrupt_class(struct kfd_dev *kfd) argument 174 kfd_device_info_init(struct kfd_dev *kfd, bool vf, uint32_t gfx_target_version) argument 236 struct kfd_dev *kfd = NULL; local 442 kfd_cwsr_init(struct kfd_dev *kfd) argument 486 struct kfd_dev *kfd = node->kfd; local 568 kfd_cleanup_nodes(struct kfd_dev *kfd, unsigned int num_nodes) argument 620 kgd2kfd_device_init(struct kfd_dev *kfd, const struct kgd2kfd_shared_resources *gpu_resources) argument 850 kgd2kfd_device_exit(struct kfd_dev *kfd) argument 865 kgd2kfd_pre_reset(struct kfd_dev *kfd) argument 893 kgd2kfd_post_reset(struct kfd_dev *kfd) argument 927 kgd2kfd_suspend(struct kfd_dev *kfd, bool run_pm) argument 950 kgd2kfd_resume(struct kfd_dev *kfd, bool run_pm) argument 1004 kgd2kfd_interrupt(struct kfd_dev *kfd, const void *ih_ring_entry) argument 1126 kfd_gtt_sa_init(struct kfd_dev *kfd, unsigned int buf_size, unsigned int chunk_size) argument 1152 kfd_gtt_sa_fini(struct kfd_dev *kfd) argument 1176 struct kfd_dev *kfd = node->kfd; local 1278 struct kfd_dev *kfd = node->kfd; local 1299 kgd2kfd_set_sram_ecc_flag(struct kfd_dev *kfd) argument 1325 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); 248 !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, 301 if (kq->dev->kfd->device_info.doorbell_size == 8) { 314 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 568 * @process: The kfd process that created this queue. 570 * @device: The kfd device that created this queue. 690 /* 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 | 331 pdd->dev->kfd->shared_resources.gpuvm_size - 1; 350 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 + 113 cu_active_per_node = cu_info.cu_active_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)) 1844 firmware_supported = dev->gpu->kfd->mec_fw_version >= 459 + 32768; 1851 firmware_supported = dev->gpu->kfd [all...] |
H A D | kfd_process_queue_manager.c | 90 if (dev->kfd->shared_resources.enable_mes) 128 if (KFD_GC_VERSION(dev) != IP_VERSION(9, 4, 3) && !dev->kfd->shared_resources.enable_mes) { 190 !dev->kfd->shared_resources.enable_mes) 196 if (dev->kfd->shared_resources.enable_mes) { 244 if (dev->kfd->shared_resources.enable_mes) { 310 max_queues = dev->kfd->device_info.max_no_of_hqd/2; 410 pdd->dev->kfd->device_info.doorbell_size);
|
H A D | kfd_process.c | 814 * take kfd processes mutex before starting of process creation 826 /* A prior open of /dev/kfd could have already created the process. */ 1046 kfd_free_process_doorbells(pdd->dev->kfd, pdd); 1048 if (pdd->dev->kfd->shared_resources.enable_mes) 1299 if (!dev->kfd->cwsr_enabled || qpd->cwsr_kaddr || qpd->cwsr_base) 1316 memcpy(qpd->cwsr_kaddr, dev->kfd->cwsr_isa, dev->kfd->cwsr_isa_size); 1341 if (!dev->kfd->cwsr_enabled || qpd->cwsr_kaddr || !qpd->cwsr_base) 1354 memcpy(qpd->cwsr_kaddr, dev->kfd->cwsr_isa, dev->kfd [all...] |
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,
|
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_packet_manager_vi.c | 80 struct kfd_node *kfd = pm->dqm->dev; local 88 * of processes in the runlist and kfd module parameter 95 kfd->max_proc_per_quantum);
|
H A D | kfd_mqd_manager_v9.c | 44 if (mm->dev->kfd->cwsr_enabled && 132 if (node->kfd->cwsr_enabled && (q->type == KFD_QUEUE_TYPE_COMPUTE)) { 194 * DISPATCH_PTR. This is required for the kfd debugger 207 if (mm->dev->kfd->cwsr_enabled && q->ctx_save_restore_area_address) { 299 if (mm->dev->kfd->cwsr_enabled && q->ctx_save_restore_area_address) 636 if (mm->dev->kfd->cwsr_enabled &&
|
/openbsd-current/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); 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, argument 432 kgd2kfd_device_exit(struct kfd_dev *kfd) argument 436 kgd2kfd_suspend(struct kfd_dev *kfd, bool run_pm) argument 440 kgd2kfd_resume(struct kfd_dev *kfd, bool run_pm) argument 445 kgd2kfd_pre_reset(struct kfd_dev *kfd) argument 450 kgd2kfd_post_reset(struct kfd_dev *kfd) argument 456 kgd2kfd_interrupt(struct kfd_dev *kfd, const void *ih_ring_entry) argument 461 kgd2kfd_set_sram_ecc_flag(struct kfd_dev *kfd) argument 466 kgd2kfd_smi_event_throttle(struct kfd_dev *kfd, uint64_t throttle_bitmask) argument [all...] |
H A D | amdgpu_amdkfd.c | 81 adev->kfd.dev = kgd2kfd_probe(adev, vf); 132 kfd.reset_work); 152 if (adev->kfd.dev) { 203 adev->kfd.init_complete = kgd2kfd_device_init(adev->kfd.dev, 208 INIT_WORK(&adev->kfd.reset_work, amdgpu_amdkfd_reset_work); 214 if (adev->kfd.dev) { 215 kgd2kfd_device_exit(adev->kfd.dev); 216 adev->kfd.dev = NULL; 224 if (adev->kfd [all...] |
H A D | amdgpu_umc.c | 88 kgd2kfd_set_sram_ecc_flag(adev->kfd.dev); 178 kgd2kfd_set_sram_ecc_flag(adev->kfd.dev);
|
/openbsd-current/usr.sbin/rdsetroot/ |
H A D | rdsetroot.c | 50 int ch, debug = 0, fsfd, kfd, n, sflag = 0, xflag = 0; local 81 if ((kfd = open(kernel, xflag ? O_RDONLY : O_RDWR)) < 0) 104 if ((e = elf_begin(kfd, xflag ? ELF_C_READ : ELF_C_RDWR, NULL)) == NULL) 161 MAP_SHARED, kfd, mmap_off);
|