xe_pm_runtime_get_if_in_use(9)
π xe_pm_runtime_get_if_in_use(9) β a Kernel API Manual moment π
okay bestie, so we're in the Kernel API Manual today and this one is literally the "hey are you up? cool, adding you to the group chat" of power management calls. it's giving cautious but friendly. let's get into it π«Ά
β¨ NAME β¨
xe_pm_runtime_get_if_in_use β grab a brand-new reference only if the device is already active and somebody already took a reference before you. like, you're not the one waking it up, you're just joining the party that's already going π
πΈ SYNOPSIS πΈ
bool xe_pm_runtime_get_if_in_use (struct xe_device *xe );
yep that's it. one arg, one bool back. slay. β¨
π ARGUMENTS π
xeβ the xe device instance π that's the whole vibe, it's your device, go off.
π₯ RETURN π₯
returns true when all three of these are happening at once, no cap:
- the device is awake π΄β‘οΈπ³
- a previous reference had already been taken π«Ά
- and a new reference was now taken π
otherwise it's false. periodt. that's the whole return contract, don't come for me π
π¦ SEE ALSO π¦
the kernel file lives at ./drivers/gpu/drm/xe/xe_pm.c β that's home base π
and here's the whole friend group, all of them, in order, no skipping (i would never π):
Xe Power Management(9)xe_pm_might_block_on_suspend(9)xe_pm_block_on_suspend(9)xe_rpm_reclaim_safe(9)xe_pm_suspend(9)xe_pm_resume(9)xe_pm_init_early(9)xe_pm_probe(9)xe_pm_init(9)xe_pm_fini(9)xe_pm_runtime_suspended(9)xe_pm_runtime_suspend(9)xe_pm_runtime_resume(9)xe_pm_runtime_get(9)xe_pm_runtime_put(9)xe_pm_runtime_get_ioctl(9)xe_pm_runtime_get_if_active(9)xe_pm_runtime_get_noresume(9)xe_pm_runtime_resume_and_get(9)xe_pm_assert_unbounded_bridge(9)xe_pm_set_vram_threshold(9)xe_pm_d3cold_allowed_toggle(9)xe_pm_module_init(9)
like genuinely obsessed with how many of these there are, the xe_pm family ate and left no crumbs π
π reminder bestie: this is the conditional getter. it does not wake anything up for you. if the device isn't already in use, you get false and zero references. that's not a bug, that's the whole point. iykyk.
sign-off time π§π
this lil page came out of ./drivers/gpu/drm/xe and it's stamped October 2026, manual name Kernel API Manual, page name xe_pm_runtime_get_if_in_use(9) β that's the lore, that's the source, love that for us πβ mwah, go read your kernel docs π
π¦ 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