xe_force_wake_get(9)
β¨ xe_force_wake_get(9) β¨
okay so this is a page from the Kernel API Manual bestie, and it's all about xe_force_wake_get β the little function that bumps your domain refcount π
buckle up, it's honestly not that deep but the vibes are immaculate.
πΈ NAME πΈ
xe_force_wake_get β increase the domain refcount π₯ like, that's literally it, that's the whole job.
π¦ SYNOPSIS π¦
unsigned int xe_force_wake_get (struct xe_force_wake *fw , enum
xe_force_wake_domains domains );
copy it exactly, don't freestyle the signature, i'm begging π
π ARGUMENTS π
fwβ astruct xe_force_wake, the main character of this whole operation πdomainsβ the forcewake domains you wanna get a refcount on, like picking which ones get the love π«Ά
π DESCRIPTION π
so, what does it do? it wakes up the domains if they're asleep π΄β‘οΈπ³ and then takes references on them. that's the tea.
here's the part where you gotta pay attention though, no cap: if the requested domain is XE_FORCEWAKE_ALL, then only the applicable/initialized domains get considered for the refcount. and it is your responsibility as the caller to check the returned ref β specifically whether it includes any specific domain β by using xe_force_wake_ref_has_domain. like, the function isn't gonna hold your hand on that one π
also, you must call xe_force_wake_put to decrease the refcounts you just incremented. don't leave them hanging, that's rude, fr fr.
and now the big sister advice section: when possible, use scope-based forcewake instead of calling this function directly. that means going throughCLASS(xe_force_wake, ...)orxe_with_force_wake. it's giving responsible adult energy β¨
so when is direct usage of get/put actually okay? two situations, and only two:
- the function has goto-based flows that can interfere with scope-based cleanup (yeah, the goto jumps really said "not today") π
- the lifetime of the forcewake reference doesn't match a specific scope β e.g. forcewake obtained in one function and released in a different one. different function, different vibe, it happens π§
π RETURN π
an opaque reference to the woken domains π or zero if none of the requested domains were awake. zero means nobody showed up to the party, don't take it personally π
β SEE ALSO β
- the Kernel file
./drivers/gpu/drm/xe/xe_force_wake.cβ literally the source, go read it, it's iconic xe_force_wake_put(9)β the other half of the get/put duo, you can't have one without the other π«Ά
okay that's the whole page bestie, you ate that π
and for the cute little sign-off: this legendary document comes from ./drivers/gpu/drm/xe, dated October 2026, and stars xe_force_wake_get(9) β go forth and refcount 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