STRUCT PANTHOR_DEVFREQ(9)
π struct panthor_devfreq(9) β the Kernel API Manual, but make it cute
okay so bestie, welcome to struct panthor_devfreq, aka Device frequency management β¨ this is the little struct that keeps track of how hard your GPU is working so the kernel can vibe-check its clock speed accordingly. it's giving "middle management for your GPU's energy levels" π
β¨ NAME β¨
struct panthor_devfreq β Device frequency management π
π¦ SYNOPSIS π¦
here's the whole struct, exactly as it is, no cap:
struct panthor_devfreq {
struct devfreq *devfreq;
struct devfreq_simple_ondemand_data gov_data;
ktime_t busy_time;
ktime_t idle_time;
ktime_t time_last_update;
bool last_busy_state;
spinlock_t lock;
};
look at her. seven fields. main character energy fr fr π
πΈ Members πΈ
okay so let's go through the squad one by one, iykyk:
devfreqβ the devfreq device. literally the whole point, she's the icon πgov_dataβ Governor data. that's the governor's business, not ours π«Άbusy_timeβ Busy time. how much time the GPU spent grinding π₯idle_timeβ Idle time. how much time it spent chilling π΄time_last_updateβ Last update time. the timestamp from the last time we refreshed the state, so we know how much has changed since βlast_busy_stateβtrueif the GPU was busy last time we updated the state. yes it's abool, yes it's literally just a memory of "was she busy tho" πlockβ the lock used to protectbusy_time,idle_time,time_last_updateandlast_busy_state. four fields, one lock, very protective bestie behavior π
π hi bestie, important note: these fields can be accessed concurrently bypanthor_devfreq_get_dev_statusandpanthor_devfreq_record_{busy,idle}(). so like, that's why thelockis there. do not skip the lock. the lock is not optional. periodt.
π₯ SEE ALSO π₯
- Kernel file
./drivers/gpu/drm/panthor/panthor_devfreq.cβ go read the source, it slays π§
and that's the page!! π¦ one last thing β this beauty lives in ./drivers/gpu/drm/panthor, dated October 2026, and it's the struct panthor_devfreq(9) manpage π mwah, go forth and frequency-manage 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