__intel_runt...et_if_active(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… __intel_runtime_pm_get_if_active β€” from the Kernel API Manual, bestie ✨

okay so this page is literally called __intel_runtime_pm_get_if_active and it lives in the Kernel API Manual β€” it's giving very niche, very powerful, iykyk πŸŽ€


🌸 NAME 🌸

__intel_runtime_pm_get_if_active β€” grab a runtime pm reference if the device is active 🫢


✨ SYNOPSIS ✨

intel_wakeref_t __intel_runtime_pm_get_if_active (struct
intel_runtime_pm *rpm , bool ignore_usecount );

like, that's the whole signature, no cap πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • rpm β€” the intel_runtime_pm structure, bestie. that's it, that's the vibe.
  • ignore_usecount β€” get a ref even if dev->power.usage_count is 0 πŸ‘€

πŸ”₯ DESCRIPTION πŸ”₯

so what this function does is: it grabs a device-level runtime pm reference if the device is already active, and it makes sure the device is powered up. main character energy fr fr.

⚠️ okay but listen β€” it is illegal to try and access the HW if intel_runtime_pm_get_if_active reports failure. like, don't. do not do that. 😭

now, if ignore_usecount is true, a reference will be acquired even if there is no user requiring the device to be powered up (dev->power.usage_count == 0). so you're basically pulling a ref out of thin air, and honestly? slay.

and if the function returns false in this case, then it's guaranteed that the device's runtime suspend hook has been called already, or that it will be called β€” which also means it's guaranteed that the device's runtime resume hook will be called eventually. the way the kernel just keeps its promises πŸ’€βœ¨

any runtime pm reference obtained by this function must have a symmetric call to intel_runtime_pm_put to release the reference again. symmetric!! like matching friendship bracelets, you can't just take one off and leave the other 🫢


πŸ’– RETURN πŸ’–

the wakeref cookie to pass to intel_runtime_pm_put. it evaluates as True if the wakeref was acquired, or False otherwise. cute little cookie, very demure, very mindful πŸ“


πŸ‘‘ SEE ALSO πŸ‘‘


okay that's the whole page, bestie, you ate that πŸ§šπŸ’œ and for the record, this icon was served to you by ./drivers/gpu/drm/i915, dated October 2026, straight outta the Kernel API Manual. mwah πŸ’‹πŸŒˆ

πŸ“¦ where this page comes from