amdgpu_ttm_tt_set_userptr(9)
β¨ amdgpu_ttm_tt_set_userptr(9) β¨
okay so bestie, welcome to the Kernel API Manual π
this little cutie lives in the kernel and it's giving "let me set up your userptr GTT ttm_tt real quick" energy. buckle up π
π NAME π
amdgpu_ttm_tt_set_userptr β initializes a userptr GTT ttm_tt, but specifically for the current task. like, whoever's running right now? that's the one. no cap π«Ά
πΈ SYNOPSIS πΈ
int amdgpu_ttm_tt_set_userptr (struct ttm_buffer_object *bo , uint64_t
addr , uint32_t flags );
she takes three things and she returns an int, periodt β¨
π¦ ARGUMENTS π¦
boβ thettm_buffer_objectwe're binding this userptr to. this is the main character of the whole operation πaddrβ the address, in the current task's VM space, that we're gonna use. in her address space specifically, iykyk π₯flagsβ the requirements of the userptr object. the vibes/constraints, basically π
π DESCRIPTION π
so here's the tea β this function gets called by amdgpu_gem_userptr_ioctl and kfd_ioctl_alloc_memory_of_gpu to bind userptr pages to the current task, and also by kfd_ioctl_acquire_vm to initialize the GPU VM for a KFD process. that's the whole job description bestie, she does exactly that π
lowkey iconic that one function is out here serving three different callers. multitasking queen π
π SEE ALSO π
the kernel file in question lives right here, go look at her:
./drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
and the whole friend group π:
amdgpu_evict_flags(9)amdgpu_ttm_map_buffer(9)amdgpu_ttm_copy_mem_to_mem(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_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)
<div align="center">πΈ that's the whole page bestie, go read the source and slay πΈ</div>
and yeah β this one comes from ./drivers/gpu/drm/amd/amdgpu, dated October 2026. mwah, xoxo ππ§ββοΈ
π¦ 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