Lines Matching full:sdma
240 struct amdgpu_sdma_instance *sdma = amdgpu_sdma_get_instance_from_ring(ring); in sdma_v6_0_ring_insert_nop() local
244 if (sdma && sdma->burst_nop && (i == 0)) in sdma_v6_0_ring_insert_nop()
398 for (i = 0; i < adev->sdma.num_instances; i++) { in sdma_v6_0_gfx_stop()
434 for (i = 0; i < adev->sdma.num_instances; i++) { in sdma_v6_0_ctxempty_int_enable()
464 for (i = 0; i < adev->sdma.num_instances; i++) { in sdma_v6_0_enable()
490 for (i = 0; i < adev->sdma.num_instances; i++) { in sdma_v6_0_gfx_resume()
491 ring = &adev->sdma.instance[i].ring; in sdma_v6_0_gfx_resume()
560 adev->doorbell_index.sdma_doorbell_range * adev->sdma.num_instances); in sdma_v6_0_gfx_resume()
568 /* Set up sdma hang watchdog */ in sdma_v6_0_gfx_resume()
635 * sdma_v6_0_load_microcode - load the sDMA ME ucode
653 if (!adev->sdma.instance[0].fw) in sdma_v6_0_load_microcode()
656 /* use broadcast mode to load SDMA microcode by default */ in sdma_v6_0_load_microcode()
660 dev_info(adev->dev, "Use broadcast method to load SDMA firmware\n"); in sdma_v6_0_load_microcode()
662 hdr = (const struct sdma_firmware_header_v2_0 *)adev->sdma.instance[0].fw->data; in sdma_v6_0_load_microcode()
667 (adev->sdma.instance[0].fw->data + in sdma_v6_0_load_microcode()
682 (adev->sdma.instance[0].fw->data + in sdma_v6_0_load_microcode()
693 dev_info(adev->dev, "Use legacy method to load SDMA firmware\n"); in sdma_v6_0_load_microcode()
694 for (i = 0; i < adev->sdma.num_instances; i++) { in sdma_v6_0_load_microcode()
696 hdr = (const struct sdma_firmware_header_v2_0 *)adev->sdma.instance[0].fw->data; in sdma_v6_0_load_microcode()
701 (adev->sdma.instance[0].fw->data + in sdma_v6_0_load_microcode()
712 … WREG32(sdma_v6_0_get_reg_offset(adev, i, regSDMA0_UCODE_ADDR), adev->sdma.instance[0].fw_version); in sdma_v6_0_load_microcode()
718 (adev->sdma.instance[0].fw->data + in sdma_v6_0_load_microcode()
729 … WREG32(sdma_v6_0_get_reg_offset(adev, i, regSDMA0_UCODE_ADDR), adev->sdma.instance[0].fw_version); in sdma_v6_0_load_microcode()
744 for (i = 0; i < adev->sdma.num_instances; i++) { in sdma_v6_0_soft_reset()
779 for (i = 0; i < adev->sdma.num_instances; i++) { in sdma_v6_0_check_soft_reset()
780 ring = &adev->sdma.instance[i].ring; in sdma_v6_0_check_soft_reset()
821 /* enable sdma ring preemption */ in sdma_v6_0_start()
1061 * Update PTEs by copying them from the GART using sDMA.
1089 * Update PTEs by writing them manually using sDMA.
1110 * sdma_v6_0_vm_set_pte_pde - update the page tables using sDMA
1119 * Update the page tables using sDMA.
1148 struct amdgpu_sdma_instance *sdma = amdgpu_sdma_get_instance_from_ring(ring); in sdma_v6_0_ring_pad_ib() local
1154 if (sdma && sdma->burst_nop && (i == 0)) in sdma_v6_0_ring_pad_ib()
1189 * sdma_v6_0_ring_emit_vm_flush - vm flush using sDMA
1196 * using sDMA.
1268 adev->sdma.ras = &sdma_v6_0_3_ras; in sdma_v6_0_set_ras_funcs()
1302 /* SDMA trap event */ in sdma_v6_0_sw_init()
1305 &adev->sdma.trap_irq); in sdma_v6_0_sw_init()
1309 for (i = 0; i < adev->sdma.num_instances; i++) { in sdma_v6_0_sw_init()
1310 ring = &adev->sdma.instance[i].ring; in sdma_v6_0_sw_init()
1315 DRM_DEBUG("SDMA %d use_doorbell being set to: [%s]\n", i, in sdma_v6_0_sw_init()
1322 sprintf(ring->name, "sdma%d", i); in sdma_v6_0_sw_init()
1324 &adev->sdma.trap_irq, in sdma_v6_0_sw_init()
1332 dev_err(adev->dev, "Failed to initialize sdma ras block!\n"); in sdma_v6_0_sw_init()
1336 /* Allocate memory for SDMA IP Dump buffer */ in sdma_v6_0_sw_init()
1337 ptr = kcalloc(adev->sdma.num_instances * reg_count, sizeof(uint32_t), GFP_KERNEL); in sdma_v6_0_sw_init()
1339 adev->sdma.ip_dump = ptr; in sdma_v6_0_sw_init()
1341 DRM_ERROR("Failed to allocated memory for SDMA IP Dump\n"); in sdma_v6_0_sw_init()
1351 for (i = 0; i < adev->sdma.num_instances; i++) in sdma_v6_0_sw_fini()
1352 amdgpu_ring_fini(&adev->sdma.instance[i].ring); in sdma_v6_0_sw_fini()
1356 kfree(adev->sdma.ip_dump); in sdma_v6_0_sw_fini()
1400 for (i = 0; i < adev->sdma.num_instances; i++) { in sdma_v6_0_is_idle()
1498 DRM_DEBUG("IH: SDMA trap\n"); in sdma_v6_0_process_trap_irq()
1518 DRM_ERROR("IH: wrong ring_ID detected, as wrong sdma instance\n"); in sdma_v6_0_process_trap_irq()
1526 amdgpu_fence_process(&adev->sdma.instance[instances].ring); in sdma_v6_0_process_trap_irq()
1566 if (!adev->sdma.ip_dump) in sdma_v6_0_print_ip_state()
1569 drm_printf(p, "num_instances:%d\n", adev->sdma.num_instances); in sdma_v6_0_print_ip_state()
1570 for (i = 0; i < adev->sdma.num_instances; i++) { in sdma_v6_0_print_ip_state()
1576 adev->sdma.ip_dump[instance_offset + j]); in sdma_v6_0_print_ip_state()
1587 if (!adev->sdma.ip_dump) in sdma_v6_0_dump_ip_state()
1591 for (i = 0; i < adev->sdma.num_instances; i++) { in sdma_v6_0_dump_ip_state()
1594 adev->sdma.ip_dump[instance_offset + j] = in sdma_v6_0_dump_ip_state()
1661 for (i = 0; i < adev->sdma.num_instances; i++) { in sdma_v6_0_set_ring_funcs()
1662 adev->sdma.instance[i].ring.funcs = &sdma_v6_0_ring_funcs; in sdma_v6_0_set_ring_funcs()
1663 adev->sdma.instance[i].ring.me = i; in sdma_v6_0_set_ring_funcs()
1678 adev->sdma.trap_irq.num_types = AMDGPU_SDMA_IRQ_INSTANCE0 + in sdma_v6_0_set_irq_funcs()
1679 adev->sdma.num_instances; in sdma_v6_0_set_irq_funcs()
1680 adev->sdma.trap_irq.funcs = &sdma_v6_0_trap_irq_funcs; in sdma_v6_0_set_irq_funcs()
1681 adev->sdma.illegal_inst_irq.funcs = &sdma_v6_0_illegal_inst_irq_funcs; in sdma_v6_0_set_irq_funcs()
1685 * sdma_v6_0_emit_copy_buffer - copy buffer using the sDMA engine
1715 * sdma_v6_0_emit_fill_buffer - fill buffer using the sDMA engine
1749 adev->mman.buffer_funcs_ring = &adev->sdma.instance[0].ring; in sdma_v6_0_set_buffer_funcs()
1764 for (i = 0; i < adev->sdma.num_instances; i++) { in sdma_v6_0_set_vm_pte_funcs()
1766 &adev->sdma.instance[i].ring.sched; in sdma_v6_0_set_vm_pte_funcs()
1768 adev->vm_manager.vm_pte_num_scheds = adev->sdma.num_instances; in sdma_v6_0_set_vm_pte_funcs()