svm_migrate_..._memory_gart(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– svm_migrate_..._memory_gart(9) β€” Kernel API Manual πŸ’–

okay bestie, welcome to the svm_migrate_..._memory_gart(9) page β€” that's the title, and the manual name is Kernel API Manual. this is the kernel API glow-up for the sdma migration copy situation, and we're keeping every detail because that's the vibe. periodt. πŸ’…

πŸŽ€ NAME πŸŽ€

svm_migrate_copy_memory_gart β€” sdma copy data between ram and vram. iconic behavior, no notes. ✨

✨ SYNOPSIS ✨

int svm_migrate_copy_memory_gart (struct amdgpu_device *adev ,
dma_addr_t *sys , u64 *vram , u64 npages , enum MIGRATION_COPY_DIR
direction , struct dma_fence **mfence );

🌸 ARGUMENTS 🌸

  • adev β€” the amdgpu device the sdma ring is running. main character device energy. πŸ‘‘
  • sys β€” system DMA pointer to be copied. yes bestie, that one. 🫢
  • vram β€” vram destination DMA pointer. the destination is giving destination. πŸ’–
  • npages β€” number of pages to copy. count 'em. πŸ”’
  • direction β€” enum MIGRATION_COPY_DIR. that's the enum, exactly like that. πŸ¦‹
  • mfence β€” output, sdma fence to signal after sdma is done. it's literally the output fence situation. ⭐

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the whole deal: the ram address uses GART table continuous entries mapping to ram pages, and the vram address uses direct mapping of vram pages β€” those vram pages must have npages number of continuous pages. no cap. 🌈

GART update and sdma use the same buf copy function ring, sdma is splited to multiple GTT_MAX_PAGES transfer, all sdma operations are serialized, and you wait for the last sdma finish fence β€” which is returned β€” to check copy memory is done. that's the entire pipeline, bestie. don't skip the serialized part. πŸ”₯

πŸ’œ CONTEXT πŸ’œ

Process context β€” that's the context. that's it. that's the whole context section. πŸ’œ

πŸ‘‘ RETURN πŸ‘‘

0 β€” OK, otherwise error code. so like, 0 is the slay outcome, and anything else is an error code. πŸŽ€

🌈 SEE ALSO 🌈


and that's the whole page, bestie β€” source/version: ./drivers/gpu/drm/amd/amdkfd, date: October 2026, page handle: svm_migrate_..._memory_gart(9). mwah πŸ’…πŸ’–

πŸ“¦ where this page comes from