amdgpu_bo_ge...erred_domain(9)
π NAME
ok so this is amdgpu_bo_ge...erred_domain(9) from the Kernel API Manual, and bestie, the whole personality of this page is literally just: amdgpu_bo_get_preferred_domain β get preferred domain. that's it. that's the vibe. short king energy π
β¨ SYNOPSIS β¨
uint32_t amdgpu_bo_get_preferred_domain (struct amdgpu_device *adev ,
uint32_t domain );
lowkey the cleanest signature ever β you hand it a device and a domain mask, you get back a uint32_t, no drama π
πΈ ARGUMENTS πΈ
adevβ the amdgpu device object π₯οΈ like, the actual GPU you're talking aboutdomainβ the allowed memory domains, i.e. thememory domains <amdgpu_memory_domains>ref. think of it as the menu of places the buffer could live, and this is the list of what's on the menu π
π¦ RETURN π¦
it tells you which of the allowed domains is the preferred one for allocating the BO. so like, out of everything you said was legal, which one does the kernel actually want? that one. slay π β¨
ngl the return value is only as good as the domain mask you feed it β the allowed domains are exactly what you passed in, no cap.
π₯ SEE ALSO π₯
the kernel file is right here, go read it:
./drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
and here's the whole friend group (yes, all of them, i'm not skipping anyone, that would be rude π):
amdgpu_object(9)amdgpu_bo_is_amdgpu_bo(9)amdgpu_bo_placement_from_domain(9)amdgpu_bo_create_reserved(9)amdgpu_bo_create_kernel(9)amdgpu_bo_create_isp_user(9)amdgpu_bo_create_kernel_at(9)amdgpu_bo_free_kernel(9)amdgpu_bo_free_isp_user(9)amdgpu_bo_create(9)amdgpu_bo_create_user(9)amdgpu_bo_create_vm(9)amdgpu_bo_kmap(9)amdgpu_bo_kptr(9)amdgpu_bo_kunmap(9)amdgpu_bo_ref(9)amdgpu_bo_unref(9)amdgpu_bo_pin(9)amdgpu_bo_unpin(9)amdgpu_bo_init(9)amdgpu_bo_fini(9)amdgpu_bo_set_tiling_flags(9)amdgpu_bo_get_tiling_flags(9)amdgpu_bo_set_metadata(9)amdgpu_bo_get_metadata(9)amdgpu_bo_move_notify(9)amdgpu_bo_release_notify(9)amdgpu_bo_fault_reserve_notify(9)amdgpu_bo_fence(9)amdgpu_bo_sync_wait_resv(9)amdgpu_bo_sync_wait(9)amdgpu_bo_gpu_offset(9)amdgpu_bo_fb_aper_addr(9)amdgpu_bo_gpu_offset_no_check(9)amdgpu_bo_mem_stats_placement(9)amdgpu_bo_print_info(9)
ok that's the whole page, go allocate something iconic ππ«Ά
./drivers/gpu/drm/amd/amdgpu Β· October 2026 Β· amdgpu_bo_ge...erred_domain(9) β mwah, that's a wrap, stream it, cite it, love it πβ
π¦ 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