STRUCT PANTHOR_DEVFREQ(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 β€” true if the GPU was busy last time we updated the state. yes it's a bool, yes it's literally just a memory of "was she busy tho" πŸ™ˆ
  • lock β€” the lock used to protect busy_time, idle_time, time_last_update and last_busy_state. four fields, one lock, very protective bestie behavior πŸŽ€
πŸ’€ hi bestie, important note: these fields can be accessed concurrently by panthor_devfreq_get_dev_status and panthor_devfreq_record_{busy,idle}(). so like, that's why the lock is 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