Lines Matching full:sdma

272 	struct amdgpu_sdma_instance *sdma = amdgpu_sdma_get_instance_from_ring(ring);  in sdma_v7_0_ring_insert_nop()  local
276 if (sdma && sdma->burst_nop && (i == 0)) in sdma_v7_0_ring_insert_nop()
430 for (i = 0; i < adev->sdma.num_instances; i++) { in sdma_v7_0_gfx_stop()
485 for (i = 0; i < adev->sdma.num_instances; i++) { in sdma_v7_0_enable()
511 for (i = 0; i < adev->sdma.num_instances; i++) { in sdma_v7_0_gfx_resume()
512 ring = &adev->sdma.instance[i].ring; in sdma_v7_0_gfx_resume()
584 adev->doorbell_index.sdma_doorbell_range * adev->sdma.num_instances); in sdma_v7_0_gfx_resume()
592 /* Set up sdma hang watchdog */ in sdma_v7_0_gfx_resume()
668 for (i = 0; i < adev->sdma.num_instances; i++) { in sdma_v12_0_free_ucode_buffer()
669 amdgpu_bo_free_kernel(&adev->sdma.instance[i].sdma_fw_obj, in sdma_v12_0_free_ucode_buffer()
670 &adev->sdma.instance[i].sdma_fw_gpu_addr, in sdma_v12_0_free_ucode_buffer()
671 (void **)&adev->sdma.instance[i].sdma_fw_ptr); in sdma_v12_0_free_ucode_buffer()
676 * sdma_v7_0_load_microcode - load the sDMA ME ucode
694 if (!adev->sdma.instance[0].fw) in sdma_v7_0_load_microcode()
698 adev->sdma.instance[0].fw->data; in sdma_v7_0_load_microcode()
701 fw_data = (const __le32 *)(adev->sdma.instance[0].fw->data + in sdma_v7_0_load_microcode()
705 for (i = 0; i < adev->sdma.num_instances; i++) { in sdma_v7_0_load_microcode()
709 &adev->sdma.instance[i].sdma_fw_obj, in sdma_v7_0_load_microcode()
710 &adev->sdma.instance[i].sdma_fw_gpu_addr, in sdma_v7_0_load_microcode()
711 (void **)&adev->sdma.instance[i].sdma_fw_ptr); in sdma_v7_0_load_microcode()
713 dev_err(adev->dev, "(%d) failed to create sdma ucode bo\n", r); in sdma_v7_0_load_microcode()
717 memcpy(adev->sdma.instance[i].sdma_fw_ptr, fw_data, fw_size); in sdma_v7_0_load_microcode()
719 amdgpu_bo_kunmap(adev->sdma.instance[i].sdma_fw_obj); in sdma_v7_0_load_microcode()
720 amdgpu_bo_unreserve(adev->sdma.instance[i].sdma_fw_obj); in sdma_v7_0_load_microcode()
727 lower_32_bits(adev->sdma.instance[i].sdma_fw_gpu_addr)); in sdma_v7_0_load_microcode()
729 upper_32_bits(adev->sdma.instance[i].sdma_fw_gpu_addr)); in sdma_v7_0_load_microcode()
735 /* Wait for sdma ucode init complete */ in sdma_v7_0_load_microcode()
748 dev_err(adev->dev, "failed to init sdma ucode\n"); in sdma_v7_0_load_microcode()
764 for (i = 0; i < adev->sdma.num_instances; i++) { in sdma_v7_0_soft_reset()
799 for (i = 0; i < adev->sdma.num_instances; i++) { in sdma_v7_0_check_soft_reset()
800 ring = &adev->sdma.instance[i].ring; in sdma_v7_0_check_soft_reset()
843 /* enable sdma ring preemption */ in sdma_v7_0_start()
1080 * Update PTEs by copying them from the GART using sDMA.
1111 * Update PTEs by writing them manually using sDMA.
1132 * sdma_v7_0_vm_set_pte_pde - update the page tables using sDMA
1141 * Update the page tables using sDMA.
1171 struct amdgpu_sdma_instance *sdma = amdgpu_sdma_get_instance_from_ring(ring); in sdma_v7_0_ring_pad_ib() local
1177 if (sdma && sdma->burst_nop && (i == 0)) in sdma_v7_0_ring_pad_ib()
1212 * sdma_v7_0_ring_emit_vm_flush - vm flush using sDMA
1219 * using sDMA.
1230 /* SRBM WRITE command will not support on sdma v7. in sdma_v7_0_ring_emit_wreg()
1269 DRM_ERROR("Failed to init sdma firmware!\n"); in sdma_v7_0_early_init()
1290 /* SDMA trap event */ in sdma_v7_0_sw_init()
1293 &adev->sdma.trap_irq); in sdma_v7_0_sw_init()
1297 for (i = 0; i < adev->sdma.num_instances; i++) { in sdma_v7_0_sw_init()
1298 ring = &adev->sdma.instance[i].ring; in sdma_v7_0_sw_init()
1303 DRM_DEBUG("SDMA %d use_doorbell being set to: [%s]\n", i, in sdma_v7_0_sw_init()
1310 sprintf(ring->name, "sdma%d", i); in sdma_v7_0_sw_init()
1312 &adev->sdma.trap_irq, in sdma_v7_0_sw_init()
1319 /* Allocate memory for SDMA IP Dump buffer */ in sdma_v7_0_sw_init()
1320 ptr = kcalloc(adev->sdma.num_instances * reg_count, sizeof(uint32_t), GFP_KERNEL); in sdma_v7_0_sw_init()
1322 adev->sdma.ip_dump = ptr; in sdma_v7_0_sw_init()
1324 DRM_ERROR("Failed to allocated memory for SDMA IP Dump\n"); in sdma_v7_0_sw_init()
1334 for (i = 0; i < adev->sdma.num_instances; i++) in sdma_v7_0_sw_fini()
1335 amdgpu_ring_fini(&adev->sdma.instance[i].ring); in sdma_v7_0_sw_fini()
1342 kfree(adev->sdma.ip_dump); in sdma_v7_0_sw_fini()
1386 for (i = 0; i < adev->sdma.num_instances; i++) { in sdma_v7_0_is_idle()
1486 DRM_DEBUG("IH: SDMA trap\n"); in sdma_v7_0_process_trap_irq()
1506 DRM_ERROR("IH: wrong ring_ID detected, as wrong sdma instance\n"); in sdma_v7_0_process_trap_irq()
1514 amdgpu_fence_process(&adev->sdma.instance[instances].ring); in sdma_v7_0_process_trap_irq()
1554 if (!adev->sdma.ip_dump) in sdma_v7_0_print_ip_state()
1557 drm_printf(p, "num_instances:%d\n", adev->sdma.num_instances); in sdma_v7_0_print_ip_state()
1558 for (i = 0; i < adev->sdma.num_instances; i++) { in sdma_v7_0_print_ip_state()
1564 adev->sdma.ip_dump[instance_offset + j]); in sdma_v7_0_print_ip_state()
1575 if (!adev->sdma.ip_dump) in sdma_v7_0_dump_ip_state()
1579 for (i = 0; i < adev->sdma.num_instances; i++) { in sdma_v7_0_dump_ip_state()
1582 adev->sdma.ip_dump[instance_offset + j] = in sdma_v7_0_dump_ip_state()
1649 for (i = 0; i < adev->sdma.num_instances; i++) { in sdma_v7_0_set_ring_funcs()
1650 adev->sdma.instance[i].ring.funcs = &sdma_v7_0_ring_funcs; in sdma_v7_0_set_ring_funcs()
1651 adev->sdma.instance[i].ring.me = i; in sdma_v7_0_set_ring_funcs()
1666 adev->sdma.trap_irq.num_types = AMDGPU_SDMA_IRQ_INSTANCE0 + in sdma_v7_0_set_irq_funcs()
1667 adev->sdma.num_instances; in sdma_v7_0_set_irq_funcs()
1668 adev->sdma.trap_irq.funcs = &sdma_v7_0_trap_irq_funcs; in sdma_v7_0_set_irq_funcs()
1669 adev->sdma.illegal_inst_irq.funcs = &sdma_v7_0_illegal_inst_irq_funcs; in sdma_v7_0_set_irq_funcs()
1673 * sdma_v7_0_emit_copy_buffer - copy buffer using the sDMA engine
1719 * sdma_v7_0_emit_fill_buffer - fill buffer using the sDMA engine
1753 adev->mman.buffer_funcs_ring = &adev->sdma.instance[0].ring; in sdma_v7_0_set_buffer_funcs()
1768 for (i = 0; i < adev->sdma.num_instances; i++) { in sdma_v7_0_set_vm_pte_funcs()
1770 &adev->sdma.instance[i].ring.sched; in sdma_v7_0_set_vm_pte_funcs()
1772 adev->vm_manager.vm_pte_num_scheds = adev->sdma.num_instances; in sdma_v7_0_set_vm_pte_funcs()