amdgpu_hmm_range_alloc(9)
β¨ amdgpu_hmm_range_alloc(9) β¨
okay so bestie, welcome to the Kernel API Manual π
this one's all about amdgpu_hmm_range_alloc β the little function that gets your AMDGPU HMM range born and ready π
πΈ NAME πΈ
amdgpu_hmm_range_alloc β allocate and initialize an AMDGPU HMM range β¨
π¦ SYNOPSIS π¦
struct amdgpu_hmm_range * amdgpu_hmm_range_alloc (struct amdgpu_bo *bo
);
literally that's the whole signature, no cap π«Ά
π ARGUMENTS π
boβ an optional buffer object to associate with this HMM range. yes bestie, it's optional, nobody's forcing you π
π DESCRIPTION π
so what does it actually do? it allocates memory for amdgpu_hmm_range and associates it with the bo you passed in. and here's the part you gotta remember: the reference count of the bo gets incremented π₯ so like, it's holding a ref for you, don't forget that.
β RETURN β
it hands you back a pointer to a newly allocated struct amdgpu_hmm_range on success π or NULL if the memory allocation fails π (yeah, allocation can just... not happen. rude but true.)
π SEE ALSO π
- Kernel file
./drivers/gpu/drm/amd/amdgpu/amdgpu_hmm.c MMU Notifier(9)amdgpu_hmm_invalidate_gfx(9)amdgpu_hmm_invalidate_hsa(9)amdgpu_hmm_register(9)amdgpu_hmm_unregister(9)amdgpu_hmm_range_valid(9)amdgpu_hmm_range_free(9)
like, the whole friend group fr fr π«Ά go read them too, iykyk
and that's the page bestie!! this gem lives in ./drivers/gpu/drm/amd/amdgpu, dated October 2026, and it's page amdgpu_hmm_range_alloc(9) of the Kernel API Manual πΈ slay, go allocate responsibly ππ§ββοΈ
π¦ 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