/openbsd/sys/dev/pci/drm/amd/display/modules/vmid/ |
H A D | vmid.c | 43 if (vmid < MAX_VMID) { in add_ptb_to_table() 44 core_vmid->ptb_assigned_to_vmid[vmid] = ptb; in add_ptb_to_table() 51 if (vmid < MAX_VMID) { in clear_entry_from_vmid_table() 52 core_vmid->ptb_assigned_to_vmid[vmid] = 0; in clear_entry_from_vmid_table() 98 int vmid = 0; in mod_vmid_get_for_ptb() local 104 vmid = get_existing_vmid_for_ptb(core_vmid, ptb); in mod_vmid_get_for_ptb() 106 if (vmid == -1) { in mod_vmid_get_for_ptb() 114 vmid = get_next_available_vmid(core_vmid); in mod_vmid_get_for_ptb() 115 if (vmid != -1) { in mod_vmid_get_for_ptb() 116 add_ptb_to_table(core_vmid, vmid, ptb); in mod_vmid_get_for_ptb() [all …]
|
/openbsd/sys/dev/pci/drm/amd/amdkfd/ |
H A D | cik_event_interrupt.c | 37 unsigned int vmid; in cik_event_interrupt_isr() local 53 vmid = f2g->read_vmid_from_vmfault_reg(dev->adev); in cik_event_interrupt_isr() 54 ret = f2g->get_atc_vmid_pasid_mapping_info(dev->adev, vmid, &pasid); in cik_event_interrupt_isr() 57 tmp_ihre->ring_id |= vmid << 8; in cik_event_interrupt_isr() 61 vmid >= dev->vm_info.first_vmid_kfd && in cik_event_interrupt_isr() 62 vmid <= dev->vm_info.last_vmid_kfd; in cik_event_interrupt_isr() 66 vmid = (ihre->ring_id & 0x0000ff00) >> 8; in cik_event_interrupt_isr() 67 if (vmid < dev->vm_info.first_vmid_kfd || in cik_event_interrupt_isr() 68 vmid > dev->vm_info.last_vmid_kfd) in cik_event_interrupt_isr() 94 unsigned int vmid = (ihre->ring_id & 0x0000ff00) >> 8; in cik_event_interrupt_wq() local [all …]
|
H A D | kfd_int_process_v9.c | 218 uint16_t source_id, client_id, pasid, vmid; in event_interrupt_isr_v9() local 225 vmid = SOC15_VMID_FROM_IH_ENTRY(ih_ring_entry); in event_interrupt_isr_v9() 227 (vmid < dev->vm_info.first_vmid_kfd || in event_interrupt_isr_v9() 228 vmid > dev->vm_info.last_vmid_kfd)) in event_interrupt_isr_v9() 264 pasid = dev->dqm->vmid_pasid[vmid]; in event_interrupt_isr_v9() 272 client_id, source_id, vmid, pasid); in event_interrupt_isr_v9() 313 uint16_t source_id, client_id, pasid, vmid; in event_interrupt_wq_v9() local 320 vmid = SOC15_VMID_FROM_IH_ENTRY(ih_ring_entry); in event_interrupt_wq_v9() 422 info.vmid = vmid; in event_interrupt_wq_v9() 455 uint16_t node_id, vmid; in event_interrupt_isr_v9_4_3() local [all …]
|
H A D | kfd_int_process_v10.c | 188 uint16_t source_id, client_id, pasid, vmid; in event_interrupt_isr_v10() local 195 vmid = SOC15_VMID_FROM_IH_ENTRY(ih_ring_entry); in event_interrupt_isr_v10() 197 (vmid < dev->vm_info.first_vmid_kfd || in event_interrupt_isr_v10() 198 vmid > dev->vm_info.last_vmid_kfd)) in event_interrupt_isr_v10() 223 client_id, source_id, vmid, pasid); in event_interrupt_isr_v10() 248 uint16_t source_id, client_id, pasid, vmid; in event_interrupt_wq_v10() local 255 vmid = SOC15_VMID_FROM_IH_ENTRY(ih_ring_entry); in event_interrupt_wq_v10() 376 info.vmid = vmid; in event_interrupt_wq_v10()
|
H A D | kfd_int_process_v11.c | 234 uint16_t source_id, client_id, pasid, vmid; in event_interrupt_isr_v11() local 241 vmid = SOC15_VMID_FROM_IH_ENTRY(ih_ring_entry); in event_interrupt_isr_v11() 243 (vmid < dev->vm_info.first_vmid_kfd || in event_interrupt_isr_v11() 244 vmid > dev->vm_info.last_vmid_kfd)) in event_interrupt_isr_v11() 255 client_id, source_id, vmid, pasid); in event_interrupt_isr_v11() 281 uint16_t source_id, client_id, ring_id, pasid, vmid; in event_interrupt_wq_v11() local 291 vmid = SOC15_VMID_FROM_IH_ENTRY(ih_ring_entry); in event_interrupt_wq_v11() 300 info.vmid = vmid; in event_interrupt_wq_v11()
|
/openbsd/sys/dev/pci/drm/amd/display/dc/dcn20/ |
H A D | dcn20_vmid.c | 32 vmid->regs->reg 35 vmid->ctx 39 vmid->shifts->field_name, vmid->masks->field_name 41 static void dcn20_wait_for_vmid_ready(struct dcn20_vmid *vmid) in dcn20_wait_for_vmid_ready() argument 73 void dcn20_vmid_setup(struct dcn20_vmid *vmid, const struct dcn_vmid_page_table_config *config) in dcn20_vmid_setup() argument 95 dcn20_wait_for_vmid_ready(vmid); in dcn20_vmid_setup()
|
/openbsd/sys/dev/pci/drm/amd/amdgpu/ |
H A D | amdgpu_amdkfd_gfx_v9.h | 23 void kgd_gfx_v9_program_sh_mem_settings(struct amdgpu_device *adev, uint32_t vmid, 28 unsigned int vmid, uint32_t inst); 52 uint8_t vmid, uint16_t *p_pasid); 54 uint32_t vmid, uint64_t page_table_base); 58 uint32_t vmid, uint64_t tba_addr, uint64_t tma_addr, 66 uint32_t vmid, 70 uint32_t vmid); 73 uint32_t vmid); 79 uint32_t vmid); 81 uint32_t vmid,
|
H A D | amdgpu_amdkfd_gfx_v9.c | 126 (1U << vmid))) in kgd_gfx_v9_set_pasid_vmid_mapping() 131 1U << vmid); in kgd_gfx_v9_set_pasid_vmid_mapping() 143 (1U << (vmid + 16)))) in kgd_gfx_v9_set_pasid_vmid_mapping() 623 + vmid); in kgd_gfx_v9_get_atc_vmid_pasid_mapping_info() 674 uint32_t vmid, in kgd_gfx_v9_set_wave_launch_stall() argument 705 uint32_t vmid) in kgd_gfx_v9_enable_debug_trap() argument 728 uint32_t vmid) in kgd_gfx_v9_disable_debug_trap() argument 797 uint32_t vmid) in kgd_gfx_v9_set_wave_launch_mode() argument 920 vmid); in kgd_gfx_v9_set_vm_context_page_table_base() 966 *vmid = 0xFF; in get_wave_count() [all …]
|
H A D | amdgpu_amdkfd_gfx_v10.c | 45 uint32_t queue, uint32_t vmid) in lock_srbm() argument 86 lock_srbm(adev, 0, 0, 0, vmid); in kgd_program_sh_mem_settings() 119 (1U << vmid))) in kgd_set_pasid_vmid_mapping() 125 1U << vmid); in kgd_set_pasid_vmid_mapping() 671 + vmid); in get_atc_vmid_pasid_mapping_info() 706 vmid); in set_vm_context_page_table_base() 755 uint32_t vmid) in kgd_gfx_v10_enable_debug_trap() argument 767 VMID_SEL, 1 << vmid); in kgd_gfx_v10_enable_debug_trap() 792 uint32_t vmid) in kgd_gfx_v10_disable_debug_trap() argument 826 uint32_t vmid, in kgd_gfx_v10_set_wave_launch_trap_override() argument [all …]
|
H A D | gmc_v11_0.c | 131 entry->src_id, entry->ring_id, entry->vmid, in gmc_v11_0_process_interrupt() 180 uint8_t vmid, uint16_t *p_pasid) in gmc_v11_0_get_vmid_pasid_mapping_info() argument 238 tmp &= 1 << vmid; in gmc_v11_0_flush_vm_hub() 306 1 << vmid); in gmc_v11_0_flush_gpu_tlb() 330 int vmid, i; in gmc_v11_0_flush_gpu_tlb_pasid() local 362 for (vmid = 1; vmid < 16; vmid++) { in gmc_v11_0_flush_gpu_tlb_pasid() 369 gmc_v11_0_flush_gpu_tlb(adev, vmid, in gmc_v11_0_flush_gpu_tlb_pasid() 372 gmc_v11_0_flush_gpu_tlb(adev, vmid, in gmc_v11_0_flush_gpu_tlb_pasid() 404 (hub->ctx_addr_distance * vmid), in gmc_v11_0_emit_flush_gpu_tlb() 408 (hub->ctx_addr_distance * vmid), in gmc_v11_0_emit_flush_gpu_tlb() [all …]
|
H A D | amdgpu_amdkfd_gfx_v7.c | 49 uint32_t queue, uint32_t vmid) in lock_srbm() argument 83 lock_srbm(adev, 0, 0, 0, vmid); in kgd_program_sh_mem_settings() 94 unsigned int vmid, uint32_t inst) in kgd_set_pasid_vmid_mapping() argument 105 WREG32(mmATC_VMID0_PASID_MAPPING + vmid, pasid_mapping); in kgd_set_pasid_vmid_mapping() 112 WREG32(mmIH_VMID_0_LUT + vmid, pasid_mapping); in kgd_set_pasid_vmid_mapping() 521 uint8_t vmid, uint16_t *p_pasid) in get_atc_vmid_pasid_mapping_info() argument 525 value = RREG32(mmATC_VMID0_PASID_MAPPING + vmid); in get_atc_vmid_pasid_mapping_info() 532 uint64_t va, uint32_t vmid) in set_scratch_backing_va() argument 534 lock_srbm(adev, 0, 0, 0, vmid); in set_scratch_backing_va() 540 uint32_t vmid, uint64_t page_table_base) in set_vm_context_page_table_base() argument [all …]
|
H A D | amdgpu_amdkfd_gfx_v8.c | 43 uint32_t queue, uint32_t vmid) in lock_srbm() argument 77 lock_srbm(adev, 0, 0, 0, vmid); in kgd_program_sh_mem_settings() 88 unsigned int vmid, uint32_t inst) in kgd_set_pasid_vmid_mapping() argument 100 WREG32(mmATC_VMID0_PASID_MAPPING + vmid, pasid_mapping); in kgd_set_pasid_vmid_mapping() 107 WREG32(mmIH_VMID_0_LUT + vmid, pasid_mapping); in kgd_set_pasid_vmid_mapping() 532 uint8_t vmid, uint16_t *p_pasid) in get_atc_vmid_pasid_mapping_info() argument 536 value = RREG32(mmATC_VMID0_PASID_MAPPING + vmid); in get_atc_vmid_pasid_mapping_info() 567 uint64_t va, uint32_t vmid) in set_scratch_backing_va() argument 569 lock_srbm(adev, 0, 0, 0, vmid); in set_scratch_backing_va() 575 uint32_t vmid, uint64_t page_table_base) in set_vm_context_page_table_base() argument [all …]
|
H A D | gmc_v10_0.c | 215 uint8_t vmid, uint16_t *p_pasid) in gmc_v10_0_get_atc_vmid_pasid_mapping_info() argument 220 + vmid); in gmc_v10_0_get_atc_vmid_pasid_mapping_info() 290 tmp &= 1 << vmid; in gmc_v10_0_flush_vm_hub() 349 1 << vmid); in gmc_v10_0_flush_gpu_tlb() 419 int vmid, i; in gmc_v10_0_flush_gpu_tlb_pasid() local 452 for (vmid = 1; vmid < AMDGPU_NUM_VMID; vmid++) { in gmc_v10_0_flush_gpu_tlb_pasid() 459 gmc_v10_0_flush_gpu_tlb(adev, vmid, in gmc_v10_0_flush_gpu_tlb_pasid() 462 gmc_v10_0_flush_gpu_tlb(adev, vmid, in gmc_v10_0_flush_gpu_tlb_pasid() 496 (hub->ctx_addr_distance * vmid), in gmc_v10_0_emit_flush_gpu_tlb() 500 (hub->ctx_addr_distance * vmid), in gmc_v10_0_emit_flush_gpu_tlb() [all …]
|
H A D | vcn_sw_ring.c | 47 uint32_t vmid = AMDGPU_JOB_GET_VMID(job); in vcn_dec_sw_ring_emit_ib() local 50 amdgpu_ring_write(ring, vmid); in vcn_dec_sw_ring_emit_ib() 66 uint32_t vmid, uint64_t pd_addr) in vcn_dec_sw_ring_emit_vm_flush() argument 71 pd_addr = amdgpu_gmc_emit_flush_gpu_tlb(ring, vmid, pd_addr); in vcn_dec_sw_ring_emit_vm_flush() 74 data0 = hub->ctx0_ptb_addr_lo32 + vmid * hub->ctx_addr_distance; in vcn_dec_sw_ring_emit_vm_flush()
|
H A D | amdgpu_gmc.h | 92 uint32_t (*get_invalidate_req)(unsigned int vmid, uint32_t flush_type); 128 void (*flush_gpu_tlb)(struct amdgpu_device *adev, uint32_t vmid, 135 uint64_t (*emit_flush_gpu_tlb)(struct amdgpu_ring *ring, unsigned vmid, 138 void (*emit_pasid_mapping)(struct amdgpu_ring *ring, unsigned vmid, 338 #define amdgpu_gmc_flush_gpu_tlb(adev, vmid, vmhub, type) ((adev)->gmc.gmc_funcs->flush_gpu_tlb((ad… argument 342 #define amdgpu_gmc_emit_flush_gpu_tlb(r, vmid, addr) (r)->adev->gmc.gmc_funcs->emit_flush_gpu_tlb((… argument 343 #define amdgpu_gmc_emit_pasid_mapping(r, vmid, pasid) (r)->adev->gmc.gmc_funcs->emit_pasid_mapping(… argument
|
H A D | amdgpu_amdkfd_gfx_v10.h | 25 uint32_t vmid); 28 uint32_t vmid); 33 uint32_t vmid, 41 uint32_t vmid);
|
H A D | amdgpu_amdkfd_gfx_v10_3.c | 45 uint32_t queue, uint32_t vmid) in lock_srbm() argument 48 nv_grbm_select(adev, mec, pipe, queue, vmid); in lock_srbm() 86 lock_srbm(adev, 0, 0, 0, vmid); in program_sh_mem_settings_v10_3() 97 unsigned int vmid, uint32_t inst) in set_pasid_vmid_mapping_v10_3() argument 103 vmid, pasid); in set_pasid_vmid_mapping_v10_3() 104 WREG32(SOC15_REG_OFFSET(OSSSYS, 0, mmIH_VMID_0_LUT) + vmid, value); in set_pasid_vmid_mapping_v10_3() 614 uint8_t vmid, uint16_t *p_pasid) in get_atc_vmid_pasid_mapping_info_v10_3() argument 619 + vmid); in get_atc_vmid_pasid_mapping_info_v10_3() 626 uint32_t vmid, uint64_t page_table_base) in set_vm_context_page_table_base_v10_3() argument 633 uint32_t vmid, uint64_t tba_addr, uint64_t tma_addr, in program_trap_handler_settings_v10_3() argument [all …]
|
H A D | gmc_v7_0.c | 429 int vmid; in gmc_v7_0_flush_gpu_tlb_pasid() local 435 for (vmid = 1; vmid < 16; vmid++) { in gmc_v7_0_flush_gpu_tlb_pasid() 437 tmp = RREG32(mmATC_VMID0_PASID_MAPPING + vmid); in gmc_v7_0_flush_gpu_tlb_pasid() 440 WREG32(mmVM_INVALIDATE_REQUEST, 1 << vmid); in gmc_v7_0_flush_gpu_tlb_pasid() 470 WREG32(mmVM_INVALIDATE_REQUEST, 1 << vmid); in gmc_v7_0_flush_gpu_tlb() 474 unsigned int vmid, uint64_t pd_addr) in gmc_v7_0_emit_flush_gpu_tlb() argument 478 if (vmid < 8) in gmc_v7_0_emit_flush_gpu_tlb() 776 protections, vmid, pasid, addr, in gmc_v7_0_vm_decode_fault() 1265 u32 addr, status, mc_client, vmid; in gmc_v7_0_process_interrupt() local 1292 if (amdgpu_amdkfd_is_kfd_vmid(adev, vmid) in gmc_v7_0_process_interrupt() [all …]
|
H A D | amdgpu_trace.h | 84 __field(unsigned, vmid) 96 __entry->vmid = iv->vmid; 109 __entry->ring_id, __entry->vmid, 226 __field(u32, vmid) 235 __entry->vmid = job->vmid; 241 __entry->pasid, __get_str(ring), __entry->vmid, 417 TP_PROTO(struct amdgpu_ring *ring, unsigned vmid, 419 TP_ARGS(ring, vmid, pd_addr), 422 __field(u32, vmid) 429 __entry->vmid = vmid; [all …]
|
H A D | amdgpu_amdkfd_gfx_v11.c | 43 uint32_t queue, uint32_t vmid) in lock_srbm() argument 46 soc21_grbm_select(adev, mec, pipe, queue, vmid); in lock_srbm() 84 lock_srbm(adev, 0, 0, 0, vmid); in program_sh_mem_settings_v11() 93 unsigned int vmid, uint32_t inst) in set_pasid_vmid_mapping_v11() argument 99 vmid, pasid); in set_pasid_vmid_mapping_v11() 599 uint32_t vmid, uint64_t page_table_base) in set_vm_context_page_table_base_v11() argument 603 vmid); in set_vm_context_page_table_base_v11() 622 uint32_t vmid) in kgd_gfx_v11_enable_debug_trap() argument 636 uint32_t vmid) in kgd_gfx_v11_disable_debug_trap() argument 709 uint32_t vmid, in kgd_gfx_v11_set_wave_launch_trap_override() argument [all …]
|
H A D | jpeg_v2_0.c | 538 unsigned vmid = AMDGPU_JOB_GET_VMID(job); in jpeg_v2_0_dec_ring_emit_ib() local 542 amdgpu_ring_write(ring, (vmid << JPEG_IH_CTRL__IH_VMID__SHIFT)); in jpeg_v2_0_dec_ring_emit_ib() 546 amdgpu_ring_write(ring, (vmid | (vmid << 4) | (vmid << 8))); in jpeg_v2_0_dec_ring_emit_ib() 550 amdgpu_ring_write(ring, (vmid | (vmid << 4) | (vmid << 8))); in jpeg_v2_0_dec_ring_emit_ib() 616 unsigned vmid, uint64_t pd_addr) in jpeg_v2_0_dec_ring_emit_vm_flush() argument 621 pd_addr = amdgpu_gmc_emit_flush_gpu_tlb(ring, vmid, pd_addr); in jpeg_v2_0_dec_ring_emit_vm_flush() 624 data0 = hub->ctx0_ptb_addr_lo32 + vmid * hub->ctx_addr_distance; in jpeg_v2_0_dec_ring_emit_vm_flush()
|
H A D | gmc_v9_0.c | 785 uint8_t vmid, uint16_t *p_pasid) in gmc_v9_0_get_atc_vmid_pasid_mapping_info() argument 790 + vmid); in gmc_v9_0_get_atc_vmid_pasid_mapping_info() 854 1 << vmid); in gmc_v9_0_flush_gpu_tlb() 906 if (tmp & (1 << vmid)) in gmc_v9_0_flush_gpu_tlb() 950 int vmid, i; in gmc_v9_0_flush_gpu_tlb_pasid() local 1012 for (vmid = 1; vmid < 16; vmid++) { in gmc_v9_0_flush_gpu_tlb_pasid() 1019 gmc_v9_0_flush_gpu_tlb(adev, vmid, in gmc_v9_0_flush_gpu_tlb_pasid() 1022 gmc_v9_0_flush_gpu_tlb(adev, vmid, in gmc_v9_0_flush_gpu_tlb_pasid() 1057 (hub->ctx_addr_distance * vmid), in gmc_v9_0_emit_flush_gpu_tlb() 1061 (hub->ctx_addr_distance * vmid), in gmc_v9_0_emit_flush_gpu_tlb() [all …]
|
/openbsd/sys/dev/pci/drm/amd/include/ |
H A D | kgd_kfd_interface.h | 51 uint32_t vmid; member 231 void (*program_sh_mem_settings)(struct amdgpu_device *adev, uint32_t vmid, 237 unsigned int vmid, uint32_t inst); 284 uint8_t vmid, 292 uint64_t va, uint32_t vmid); 295 uint32_t vmid, uint64_t page_table_base); 300 uint32_t vmid); 303 uint32_t vmid); 308 uint32_t vmid, 316 uint32_t vmid); [all …]
|
/openbsd/usr.sbin/vmd/ |
H A D | ns8250.c | 82 vcpu_assert_irq(com1_dev.vmid, 0, com1_dev.irq); in ratelimit() 87 ns8250_init(int fd, uint32_t vmid) in ns8250_init() argument 101 com1_dev.vmid = vmid; in ns8250_init() 122 com_rcv_event, (void *)(intptr_t)vmid); in ns8250_init() 130 com_rcv_event, (void *)(intptr_t)vmid); in ns8250_init() 641 ns8250_restore(int fd, int con_fd, uint32_t vmid) in ns8250_restore() argument 659 com1_dev.vmid = vmid; in ns8250_restore() 666 com_rcv_event, (void *)(intptr_t)vmid); in ns8250_restore() 669 com_rcv_event, (void *)(intptr_t)vmid); in ns8250_restore()
|
/openbsd/sys/dev/pci/drm/radeon/ |
H A D | radeon_trace.h | 51 TP_PROTO(unsigned vmid, int ring), 52 TP_ARGS(vmid, ring), 54 __field(u32, vmid) 59 __entry->vmid = vmid; 62 TP_printk("vmid=%u, ring=%u", __entry->vmid, __entry->ring)
|