get_tonga_state_array(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 πŸ”₯

  • 0 on 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:

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