Streams(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… Streams(9) β€” Kernel API Manual, but make it group chat πŸ’…

okay so bestie, welcome to Streams(9) from the Kernel API Manual πŸ’–. The vibe check is simple: commands are submitted to the kernel driver in the form of streams. That's the whole main character energy of this page. ✨

πŸ¦‹ Streams πŸ¦‹

A command stream has the following layout:

and yes we're doing nested bullets because the structure is literally nested, iykyk 🫢:

  • A 64-bit header containing:
    • A u32 containing the length of the main stream inclusive of the length of the header.
    • A u32 for padding.
  • The main stream data.
  • The extension stream (optional), which is composed of:
    • One or more headers.
    • The extension stream data, corresponding to the extension headers.

The main stream provides the base command data. This has a fixed layout based on the features supported by a given GPU. No cap. 🫢

The extension stream provides the command parameters that are required for BRNs & ERNs for the current GPU. This stream is comprised of one or more headers, followed by data for each given BRN/ERN. It's giving "parameters for the current GPU" πŸ’….

Each header is a u32 containing a bitmask of quirks & enhancements in the extension stream, a "type" field determining the set of quirks & enhancements the bitmask represents, and a continuation bit determining whether any more headers are present. The headers are then followed by command data; this is specific to each quirk/enhancement. All unused / reserved bits in the header must be set to 0. That last bit is not a suggestion, bestie β€” reserved bits stay 0, periodt. 🚨

All parameters and headers in the main and extension streams must be naturally aligned. ngl, alignment check: slay. πŸ“βœ¨

If a parameter appears in both the main and extension streams, then the extension parameter is used. So the extension stream wins the argument, lowkey. πŸ‘‘


πŸ‘€ SEE ALSO πŸ‘€

  • Kernel file ./drivers/gpu/drm/imagination/pvr_rogue_fwif_stream.h β€” the source file is right there, bestie, go peek. I'm obsessed. πŸ“

mwah πŸ’‹ β€” this lil beauty is from ./drivers/gpu/drm/imagination, dated October 2026, and it's Streams(9). πŸŽ€

πŸ“¦ where this page comes from