cik_sdma_emit_copy_buffer(9)
π cik_sdma_emit_copy_buffer(9) β the Kernel API Manual, bestie edition β¨
okay so this is a page out of the Kernel API Manual and honestly? it's giving "small function, big responsibilities" energy. sit down, grab a π, we're learning how the sDMA engine copies buffers π
πΈ NAME πΈ
cik_sdma_emit_copy_buffer β copy buffer using the sDMA engine β¨
π¦ SYNOPSIS π¦
void cik_sdma_emit_copy_buffer (struct amdgpu_ib *ib , uint64_t
src_offset , uint64_t dst_offset , uint32_t byte_count , uint32_t
copy_flags );
like, that's the whole vibe. void return, five args, no drama π
π ARGUMENTS π
ibβ the indirect buffer we're copying to. this is the destination of the emit, not the copy, don't get it twisted π«Άsrc_offsetβ the src GPU address (where the bytes are coming from) βdst_offsetβ the dst GPU address (where they're going to) πbyte_countβ number of bytes to xfer, auint32_t, so yes the count has a ceiling, no cap π§’copy_flagsβ unused. literally unused. it's there, it's invited, it does nothing π
π₯ DESCRIPTION π₯
so what it does: it copies GPU buffers using the DMA engine (CIK). that's it, that's the whole thing π
and who's out here calling it? the amdgpu ttm implementation, to move pages β but only if this thing is registered as the asic copy callback. main character energy, but conditional π
ngl if you're reading this expecting extra lore, there isn't any β the original page is short and sweet and we respect that π
π SEE ALSO π
first up, the kernel file it lives in β go read the source, bestie, it's right there:
- Kernel file
./drivers/gpu/drm/amd/amdgpu/cik_sdma.c
and then the whole friend group ππ:
cik_sdma_init_microcode(9)cik_sdma_ring_get_rptr(9)cik_sdma_ring_get_wptr(9)cik_sdma_ring_set_wptr(9)cik_sdma_ring_emit_ib(9)cik_sdma_ring_emit_hdp_flush(9)cik_sdma_ring_emit_fence(9)cik_sdma_gfx_stop(9)cik_sdma_rlc_stop(9)cik_ctx_switch_enable(9)cik_sdma_enable(9)cik_sdma_gfx_resume(9)cik_sdma_rlc_resume(9)cik_sdma_load_microcode(9)cik_sdma_start(9)cik_sdma_ring_test_ring(9)cik_sdma_ring_test_ib(9)cik_sdma_vm_copy_pte(9)cik_sdma_vm_write_pte(9)cik_sdma_vm_set_pte_pde(9)cik_sdma_ring_pad_ib(9)cik_sdma_ring_emit_pipeline_sync(9)cik_sdma_ring_emit_vm_flush(9)cik_sdma_emit_fill_buffer(9)
β¨ and that's the page!! β¨ this came to you from the source dir ./drivers/gpu/drm/amd/amdgpu, dated October 2026, and it's the cik_sdma_emit_copy_buffer(9) page β go copy some buffers, bestie, you're gonna slay π
π«Άπ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms