get_tonga_state_array(9)
π get_tonga_state_array β bestie's guide to grabbing the Tonga state array π
okay so this is a page from the Kernel API Manual, section 9 (that's the kernel API girlies β¨), and it's literally all about one little function: get_tonga_state_array. And yes it does exactly what it says on the tin β it gets the Tonga state array out of the PowerPlay table. no cap. π«Ά
πΈ NAME πΈ
get_tonga_state_array β it gets the Tonga state array from the PowerPlay table. that's the whole vibe. π
β¨ SYNOPSIS β¨
int get_tonga_state_array (struct pp_hwmgr *hwmgr , const
ATOM_Tonga_POWERPLAYTABLE *powerplay_table , const
ATOM_Tonga_State_Array **state_array );
like, she takes three things and gives you back an int. iconic signature honestly. π
π ARGUMENTS π
okay so here's who's invited to the function party:
hwmgrβ pointer to the hardware manager. she's the main character here, the one running the show. π§powerplay_tableβ pointer to the PowerPlay Table. the source of truth, the sacred text. π¦state_arrayβ pointer to the returned Tonga state array. this is where the good stuff comes back out β note it's a pointer to a pointer, so she's writing into your pointer, iykyk. π
π₯ RETURN π₯
0on success β slay, everything worked β¨- a negative error code on failure β π not the vibe, but at least she tells you
π SEE ALSO π
the kernel file in question, exact path and everything, no edits:
./drivers/gpu/drm/amd/pm/powerplay/hwmgr/process_pptables_v1_0.c
and the whole friend group of related man pages, all of them, in order:
set_hw_cap(9)set_platform_caps(9)get_platform_power_management_table(9)init_dpm_2_parameters(9)init_clock_voltage_dependency(9)init_over_drive_limits(9)init_thermal_controller(9)get_powerplay_table_entry_v1_0(9)
go read those too bestie, they're all in the same friend group π«Ά
ngl if that state array pointer comes back null-ish or the call returns negative, don't just ignore it β check the return value. she's telling you something. π
kisses and bye bye mwah π β this one's from ./drivers/gpu/drm/amd/pm/power... (yes that's the truncated source path, she's mysterious like that π), dated October 2026, and it's get_tonga_state_array(9) forever and always. ππβ
π¦ 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