sdma_v4_0_emit_copy_buffer(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… sdma_v4_0_emit_copy_buffer β€” kernel API manual, bestie edition ✨

okay so real talk, this is a page from the Kernel API Manual and it's genuinely iconic: sdma_v4_0_emit_copy_buffer β€” literally the function that copies buffers using the sDMA engine. no cap. let's get into it 🫢


🌸 NAME 🌸

sdma_v4_0_emit_copy_buffer β€” copy buffer using the sDMA engine πŸ’–


✨ SYNOPSIS ✨

void sdma_v4_0_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 signature. void return, five args, we move. πŸŽ€


πŸ¦‹ ARGUMENTS πŸ¦‹

okay so every single one of these matters, don't skip:

  • ib β€” the indirect buffer to copy to. that's the destination of the command, bestie, not the data. iykyk πŸ’…
  • src_offset β€” src GPU address 🌟
  • dst_offset β€” dst GPU address 🌟
  • byte_count β€” number of bytes to xfer. yes, xfer. that's the word. we respect the word. πŸ’€
  • copy_flags β€” copy flags for the buffers 🚩

πŸ”₯ DESCRIPTION πŸ”₯

so what does it actually do? it copies GPU buffers using the DMA engine, specifically for VEGA10/12. main character energy fr fr πŸ‘‘

and who's out here calling it? the amdgpu ttm implementation uses it to move pages β€” but only if it's registered as the asic copy callback. that conditional is doing a lot of work, don't sleep on it πŸ™ˆ


🌈 SEE ALSO 🌈

the whole friend group, in order, no one left out:


and that's the page!! 🧚 this lil beauty lives in ./drivers/gpu/drm/amd/amdgpu, dated October 2026, and the whole thing is sdma_v4_0_emit_copy_buffer(9) β€” go forth and emit those copy buffers, bestie πŸ’œβœ¨

πŸ“¦ where this page comes from