Lines Matching full:sdma
229 /* SDMA seems to miss doorbells sometimes when powergating kicks in. in sdma_v5_2_ring_set_wptr()
255 struct amdgpu_sdma_instance *sdma = amdgpu_sdma_get_instance_from_ring(ring); in sdma_v5_2_ring_insert_nop() local
259 if (sdma && sdma->burst_nop && (i == 0)) in sdma_v5_2_ring_insert_nop()
418 for (i = 0; i < adev->sdma.num_instances; i++) { in sdma_v5_2_gfx_stop()
477 for (i = 0; i < adev->sdma.num_instances; i++) { in sdma_v5_2_ctx_switch_enable()
516 for (i = 0; i < adev->sdma.num_instances; i++) { in sdma_v5_2_enable()
544 for (i = 0; i < adev->sdma.num_instances; i++) { in sdma_v5_2_gfx_resume()
545 ring = &adev->sdma.instance[i].ring; in sdma_v5_2_gfx_resume()
696 * sdma_v5_2_load_microcode - load the sDMA ME ucode
713 for (i = 0; i < adev->sdma.num_instances; i++) { in sdma_v5_2_load_microcode()
714 if (!adev->sdma.instance[i].fw) in sdma_v5_2_load_microcode()
717 hdr = (const struct sdma_firmware_header_v1_0 *)adev->sdma.instance[i].fw->data; in sdma_v5_2_load_microcode()
722 (adev->sdma.instance[i].fw->data + in sdma_v5_2_load_microcode()
733 WREG32(sdma_v5_2_get_reg_offset(adev, i, mmSDMA0_UCODE_ADDR), adev->sdma.instance[i].fw_version); in sdma_v5_2_load_microcode()
746 for (i = 0; i < adev->sdma.num_instances; i++) { in sdma_v5_2_soft_reset()
804 /* enable sdma ring preemption */ in sdma_v5_2_start()
1040 * Update PTEs by copying them from the GART using sDMA.
1068 * Update PTEs by writing them manually using sDMA.
1089 * sdma_v5_2_vm_set_pte_pde - update the page tables using sDMA
1098 * Update the page tables using sDMA.
1128 struct amdgpu_sdma_instance *sdma = amdgpu_sdma_get_instance_from_ring(ring); in sdma_v5_2_ring_pad_ib() local
1134 if (sdma && sdma->burst_nop && (i == 0)) in sdma_v5_2_ring_pad_ib()
1171 * sdma_v5_2_ring_emit_vm_flush - vm flush using sDMA
1178 * using sDMA.
1279 /* SDMA trap event */ in sdma_v5_2_sw_init()
1280 for (i = 0; i < adev->sdma.num_instances; i++) { in sdma_v5_2_sw_init()
1283 &adev->sdma.trap_irq); in sdma_v5_2_sw_init()
1288 for (i = 0; i < adev->sdma.num_instances; i++) { in sdma_v5_2_sw_init()
1289 ring = &adev->sdma.instance[i].ring; in sdma_v5_2_sw_init()
1301 sprintf(ring->name, "sdma%d", i); in sdma_v5_2_sw_init()
1302 r = amdgpu_ring_init(adev, ring, 1024, &adev->sdma.trap_irq, in sdma_v5_2_sw_init()
1309 /* Allocate memory for SDMA IP Dump buffer */ in sdma_v5_2_sw_init()
1310 ptr = kcalloc(adev->sdma.num_instances * reg_count, sizeof(uint32_t), GFP_KERNEL); in sdma_v5_2_sw_init()
1312 adev->sdma.ip_dump = ptr; in sdma_v5_2_sw_init()
1314 DRM_ERROR("Failed to allocated memory for SDMA IP Dump\n"); in sdma_v5_2_sw_init()
1324 for (i = 0; i < adev->sdma.num_instances; i++) in sdma_v5_2_sw_fini()
1325 amdgpu_ring_fini(&adev->sdma.instance[i].ring); in sdma_v5_2_sw_fini()
1329 kfree(adev->sdma.ip_dump); in sdma_v5_2_sw_fini()
1373 for (i = 0; i < adev->sdma.num_instances; i++) { in sdma_v5_2_is_idle()
1471 DRM_DEBUG("IH: SDMA trap\n"); in sdma_v5_2_process_trap_irq()
1492 amdgpu_fence_process(&adev->sdma.instance[0].ring); in sdma_v5_2_process_trap_irq()
1508 amdgpu_fence_process(&adev->sdma.instance[1].ring); in sdma_v5_2_process_trap_irq()
1524 amdgpu_fence_process(&adev->sdma.instance[2].ring); in sdma_v5_2_process_trap_irq()
1540 amdgpu_fence_process(&adev->sdma.instance[3].ring); in sdma_v5_2_process_trap_irq()
1569 if (adev->sdma.instance[i].fw_version < 70) in sdma_v5_2_firmware_mgcg_support()
1573 if (adev->sdma.instance[i].fw_version < 47) in sdma_v5_2_firmware_mgcg_support()
1577 if (adev->sdma.instance[i].fw_version < 9) in sdma_v5_2_firmware_mgcg_support()
1594 for (i = 0; i < adev->sdma.num_instances; i++) { in sdma_v5_2_update_medium_grain_clock_gating()
1600 /* Enable sdma clock gating */ in sdma_v5_2_update_medium_grain_clock_gating()
1611 /* Disable sdma clock gating */ in sdma_v5_2_update_medium_grain_clock_gating()
1631 for (i = 0; i < adev->sdma.num_instances; i++) { in sdma_v5_2_update_medium_grain_light_sleep()
1632 if (adev->sdma.instance[i].fw_version < 70 && in sdma_v5_2_update_medium_grain_light_sleep()
1638 /* Enable sdma mem light sleep */ in sdma_v5_2_update_medium_grain_light_sleep()
1645 /* Disable sdma mem light sleep */ in sdma_v5_2_update_medium_grain_light_sleep()
1713 /* SDMA 5.2.3 (RMB) FW doesn't seem to properly in sdma_v5_2_ring_begin_use()
1715 * hangs in SDMA. Disallow GFXOFF while SDMA is active. in sdma_v5_2_ring_begin_use()
1718 * this GFXOFF will be disallowed anyway when SDMA is in sdma_v5_2_ring_begin_use()
1721 * to update the wptr because sometimes SDMA seems to miss in sdma_v5_2_ring_begin_use()
1732 /* SDMA 5.2.3 (RMB) FW doesn't seem to properly in sdma_v5_2_ring_end_use()
1734 * hangs in SDMA. Allow GFXOFF when SDMA is complete. in sdma_v5_2_ring_end_use()
1746 if (!adev->sdma.ip_dump) in sdma_v5_2_print_ip_state()
1749 drm_printf(p, "num_instances:%d\n", adev->sdma.num_instances); in sdma_v5_2_print_ip_state()
1750 for (i = 0; i < adev->sdma.num_instances; i++) { in sdma_v5_2_print_ip_state()
1756 adev->sdma.ip_dump[instance_offset + j]); in sdma_v5_2_print_ip_state()
1767 if (!adev->sdma.ip_dump) in sdma_v5_2_dump_ip_state()
1771 for (i = 0; i < adev->sdma.num_instances; i++) { in sdma_v5_2_dump_ip_state()
1774 adev->sdma.ip_dump[instance_offset + j] = in sdma_v5_2_dump_ip_state()
1843 for (i = 0; i < adev->sdma.num_instances; i++) { in sdma_v5_2_set_ring_funcs()
1844 adev->sdma.instance[i].ring.funcs = &sdma_v5_2_ring_funcs; in sdma_v5_2_set_ring_funcs()
1845 adev->sdma.instance[i].ring.me = i; in sdma_v5_2_set_ring_funcs()
1860 adev->sdma.trap_irq.num_types = AMDGPU_SDMA_IRQ_INSTANCE0 + in sdma_v5_2_set_irq_funcs()
1861 adev->sdma.num_instances; in sdma_v5_2_set_irq_funcs()
1862 adev->sdma.trap_irq.funcs = &sdma_v5_2_trap_irq_funcs; in sdma_v5_2_set_irq_funcs()
1863 adev->sdma.illegal_inst_irq.funcs = &sdma_v5_2_illegal_inst_irq_funcs; in sdma_v5_2_set_irq_funcs()
1867 * sdma_v5_2_emit_copy_buffer - copy buffer using the sDMA engine
1897 * sdma_v5_2_emit_fill_buffer - fill buffer using the sDMA engine
1932 adev->mman.buffer_funcs_ring = &adev->sdma.instance[0].ring; in sdma_v5_2_set_buffer_funcs()
1949 for (i = 0; i < adev->sdma.num_instances; i++) { in sdma_v5_2_set_vm_pte_funcs()
1951 &adev->sdma.instance[i].ring.sched; in sdma_v5_2_set_vm_pte_funcs()
1953 adev->vm_manager.vm_pte_num_scheds = adev->sdma.num_instances; in sdma_v5_2_set_vm_pte_funcs()