amdgpu_devic...gating_state(9)
β¨ 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 theamdgpu_devicestruct. the main character herself πblock_typeβ the type of hardware IP you want, like SMU, GFX, UVD, etc. etc. β pick your fave enumamd_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 β
- kernel file:
./drivers/gpu/drm/amd/amdgpu/amdgpu_ip.c amdgpu_device_ip_get_ip_block(9)amdgpu_device_ip_block_version_cmp(9)amdgpu_device_ip_block_add(9)amdgpu_device_ip_set_clockgating_state(9)amdgpu_device_ip_get_clockgating_state(9)amdgpu_device_ip_wait_for_idle(9)amdgpu_device_ip_is_valid(9)amdgpu_ip_from_ring(9)amdgpu_ring_mask_from_ip(9)amdgpu_device_ip_soft_reset(9)
π«Ά 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
- 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