xe_pm_runtime_get_if_in_use(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 πŸ™ˆ):

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