amdgpu_wb_get(9)
π amdgpu_wb_get(9) β the Kernel API Manual, bestie edition π
okay so real talk, this is a page from the Linux kernel API manual, section 9 (that's the kernel internals girlies π). The function we're obsessing over today is amdgpu_wb_get, and yes she's giving main character energy in ./drivers/gpu/drm/amd/amdgpu. Let's get into it β¨
πΈ NAME πΈ
amdgpu_wb_get β literally just "Allocate a wb entry" π« that's the whole vibe, no cap
β¨ SYNOPSIS β¨
int amdgpu_wb_get (struct amdgpu_device *adev , u32 *wb );
so she takes two things and gives you back an int, periodt π«Ά
π ARGUMENTS π
adevβ anamdgpu_devicepointer, i.e. your whole GPU device situation, the main character herself πwbβ thewbindex, which is exactly what it sounds like (awbindex, bestie, I don't make the rules) π¦
π₯ DESCRIPTION π₯
So what she does: amdgpu_wb_get allocates a wb slot for use by the driver β and yes, that's for all asics π every single one, no exceptions, we love an inclusive queen.
Then the return value, and this part matters so pay attention π:
- Returns
0on success π - Returns
-EINVALon failure π
not -EINVAL bestie... but fr fr that's the failure signal, so check your return value, always, no exceptions π
π SEE ALSO π
go look at the kernel file ./drivers/gpu/drm/amd/amdgpu/amdgpu_wb.c β that's where the lore lives π and while you're there, the whole friend group:
like it's a whole squad, get to know all of them π«Άβ¨
and that's the page π this lil love letter came out of ./drivers/gpu/drm/amd/amdgpu, dated October 2026, for amdgpu_wb_get(9) β go forth and allocate responsibly, bestie, mwah ππ
π¦ 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