amdgpu_ttm_copy_mem_to_mem(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… amdgpu_ttm_copy_mem_to_mem(9)

Okay so bestie, welcome to the Kernel API Manual entry for amdgpu_ttm_copy_mem_to_mem β€” yes that's a whole mouthful, no we're not renaming it, it's iconic as is πŸŽ€


✨ NAME ✨

amdgpu_ttm_copy_mem_to_mem β€” the helper function for copy πŸ’– literally what it says on the tin, she's a helper, she copies.


🌸 SYNOPSIS 🌸

int amdgpu_ttm_copy_mem_to_mem (struct amdgpu_device *adev , struct
amdgpu_ttm_buffer_entity *entity , const struct amdgpu_copy_mem *src ,
const struct amdgpu_copy_mem *dst , uint64_t size , bool tmz , struct
dma_resv *resv , struct dma_fence **f );

That's the whole signature, copied character for character because we do not play with code integrity in this house 🫢


πŸ¦‹ ARGUMENTS πŸ¦‹

  • adev β€” the amdgpu device. the main character, honestly πŸ‘‘
  • entity β€” the entity to run the jobs. she's the one scheduling the whole thing ✨
  • src β€” buffer/address where to read from. the source, the origin story 🌈
  • dst β€” buffer/address where to write to. the destination, the glow-up destination πŸ’…
  • size β€” number of bytes to copy. yes, a uint64_t, so she can go big πŸ”₯
  • tmz β€” if a secure copy should be used. bool, so it's a yes/no vibe check πŸ”
  • resv β€” resv object to sync to. keep it in sync, bestie, or it's chaos 😭
  • f β€” returns the last fence if multiple jobs are submitted. so you get the last one, not the first, noted πŸ“

πŸ’œ DESCRIPTION πŸ’œ

The function copies size bytes from {src->mem + src->offset} to {dst->mem + dst->offset}. Simple as that, no cap πŸ’€

And here's the cute part: src->bo and dst->bo could be the same BO for a move, and different for a BO to BO copy. So like… same buffer object, different buffer object, she does not care, she slays either way 🧚


⭐ SEE ALSO ⭐

Kernel file ./drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c β€” go read the source, iykyk πŸ“–

And the whole friend group, all of them, in order:


ok that's the whole thing, every flag, every argument, every reference, nothing skipped, we ate and left no crumbs πŸ“

mwuh πŸ’‹ this page lives in ./drivers/gpu/drm/amd/amdgpu and it's dated October 2026 β€” see you in the next one, bestie! πŸŽ€πŸ’–βœ¨

πŸ“¦ where this page comes from