amdgpu_ttm_copy_mem_to_mem(9)
π 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, auint64_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:
amdgpu_evict_flags(9)amdgpu_ttm_map_buffer(9)amdgpu_res_cpu_visible(9)amdgpu_ttm_domain_start(9)amdgpu_ttm_mmio_remap_alloc_sgt(9)amdgpu_ttm_tt_create(9)amdgpu_ttm_tt_get_userptr(9)amdgpu_ttm_tt_set_userptr(9)amdgpu_ttm_tt_pde_flags(9)amdgpu_ttm_tt_pte_flags(9)amdgpu_ttm_access_memory(9)amdgpu_ttm_training_reserve_vram_fini(9)amdgpu_ttm_alloc_mmio_remap_bo(9)amdgpu_ttm_free_mmio_remap_bo(9)amdgpu_ttm_enable_buffer_funcs(9)amdgpu_ttm_disable_buffer_funcs(9)amdgpu_ttm_clear_buffer(9)amdgpu_ttm_evict_resources(9)
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
- 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