intel_engine_context_size(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… intel_engine_context_size β€” and yes that's a kernel API manual page, bestie

Okay so picture this: it's a manual page from the Kernel API Manual, the function is intel_engine_context_size, and it does exactly one iconic thing β€” it tells you how big the context for an engine is. That's it. That's the whole vibe. πŸŽ€


✨ NAME ✨

intel_engine_context_size β€” return the size of the context for an engine. literally its whole job, no cap.


πŸ¦‹ SYNOPSIS πŸ¦‹

u32 intel_engine_context_size(struct intel_gt *gt, u8 class);

🌸 ARGUMENTS 🌸

  • gt β€” the gt. that's it, that's the description, the docs really said "the gt" and dipped 😭
  • class β€” the engine class

πŸ’– DESCRIPTION πŸ’–

So here's the tea πŸ“: each engine class may require a different amount of space for a context image. Different class, different amount of room needed. slay for them, honestly.


πŸ‘‘ RETURN πŸ‘‘

It hands you back the size, in bytes, of an engine class specific context image. πŸ’…


⭐ NOTE ⭐

Okay bestie, pay attention, this part matters 🫢 β€” this size includes the HWSP, which is part of the context image in LRC mode. But it does not include the "shared data page" used with GuC submission. So if you're using the GuC, the caller should account for that. not me forgetting the shared data page… πŸ™ˆ


🌈 SEE ALSO 🌈

Kernel file ./drivers/gpu/drm/i915/gt/intel_engine_cs.c


and that's the page, periodt πŸ§šπŸ’œ β€” brought to you by the fine folks over at ./drivers/gpu/drm/i915/gt, dated October 2026, living in the Kernel API Manual. bye bestie, go read your context sizes responsibly πŸ”₯πŸ‘‘

πŸ“¦ where this page comes from