amdgpu_devic...gating_state(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ amdgpu_device_ip_set_powergating_state ✨

okay so bestie, welcome to the kernel API manual for amdgpu_device_ip_set_powergating_state β€” this one lives in the kernel docs (section 9, the kernel API section πŸ’…) and it's basically the function that flips the power-gating switch for your GPU's IP blocks. she's giving "lights off, bestie" energy fr fr πŸŽ€


🌸 NAME 🌸

amdgpu_device_ip_set_powergating_state β€” set the PG state πŸ’€βš‘

πŸ¦‹ SYNOPSIS πŸ¦‹

int amdgpu_device_ip_set_powergating_state (struct amdgpu_device *adev ,
       enum amd_ip_block_type block_type , enum amd_powergating_state state );

that's the whole signature, no cap β€” it returns an int, and the three args are asterisk-free except for adev which is a pointer obvi πŸ’…

πŸŽ€ ARGUMENTS πŸŽ€

  • adev β€” a pointer to the amdgpu_device struct. the main character herself πŸ’–
  • block_type β€” the type of hardware IP you want, like SMU, GFX, UVD, etc. etc. β€” pick your fave enum amd_ip_block_type πŸ’œ
  • state β€” the powergating state you want (gate or ungate, bestie β€” it's giving binary) 🌸

πŸ”₯ DESCRIPTION πŸ”₯

so what does she actually do? <hotpink>Sets the requested powergating state</hotpink> for all instances of the hardware IP specified. all of them. every single one. no leaving anyone behind πŸ’…

and when she's done, she returns <cyan>the error code from the last instance</cyan> β€” so like, she doesn't stop at the first error, she goes all the way through and then reports what the last one said. iconic behaviour honestly πŸ‘‘

ok but fr: if you're checking for success, remember the return value is from the last instance, not the first failure. just so you're not surprised, bestie πŸ™ˆ

⭐ SEE ALSO ⭐


🫢 and that's a wrap, bestie!! this page is brought to you by the fine folks over at ./drivers/gpu/drm/amd/amdgpu β€” dated October 2026, section 9 of the kernel API manual. go forth and gate responsibly πŸ’–βœ¨πŸŽ€πŸ¦‹πŸ’…

πŸ“¦ where this page comes from