STRUCT IRIS_HFI_BUFFER(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ struct iris_hfi_buffer(9) πŸ¦‹

okay so bestie, welcome to the Kernel API Manual β€” this is the struct iris_hfi_buffer(9) page and honestly it's giving "the blueprint of how a buffer talks to firmware." no cap, she's iconic. let's get into it πŸ’…


✨ NAME ✨

struct iris_hfi_buffer β€” literally just her name, that's it, that's the whole entry πŸŽ€ (the original page had a lil dash and nothing after it, so we're not making stuff up)


🌸 SYNOPSIS 🌸

here's the whole struct, copied exactly, do not touch, do not edit, she is perfect:

struct iris_hfi_buffer {
    u32 type;
    u32 index;
    u64 base_address;
    u32 addr_offset;
    u32 buffer_size;
    u32 data_offset;
    u32 data_size;
    u64 timestamp;
    u32 flags;
    u32 reserved[5];
 };

πŸ‘‘ Members πŸ‘‘

okay so each of these is a member of the struct, and every single one is lowkey important, so let's do a vibe check one by one 🫢

  • type β€” the buffer type, indicated by "enum hfi_buffer_type". FW needs to return the proper type for any buffer command. fr fr, firmware's gotta get the type right or it's a whole mess 😭
  • index β€” the index of the buffer. that's it, that's the whole thing ✨
  • base_address β€” base address of the buffer. this buffer address is always 4KBytes aligned. always. no exceptions, bestie πŸ’€
  • addr_offset β€” the accessible buffer offset from the base address.
    • decoder bitstream buffer: 256 Bytes aligned.
    • firmware can uniquely identify a buffer based on base_address & addr_offset.
    • HW can read memory only from base_address+addr_offset. like, that's the only place it's allowed to look πŸ™ˆ
  • buffer_size β€” accessible buffer size in bytes, starting from addr_offset. it's the size of the vibe-check window, iykyk 🌈
  • data_offset β€” data starts from "base_address + addr_offset + data_offset".
    • RAW buffer: data_offset is 0. Restriction: 4KBytes aligned.
    • decoder bitstream buffer: no restriction (can be any value). she's flexible, we respect it πŸ’œ
  • data_size β€” data size in bytes. simple, clean, iconic ⭐
  • timestamp β€” timestamp of the buffer in nano seconds (ns). it's the Presentation timestamp (PTS) for encoder & decoder.
    • decoder: it is pass through from bitstream to raw buffer. firmware does not need to return as part of input buffer done.
    • for any internal buffers: there is no timestamp. host sets as 0.
ngl, the "host sets as 0" part is important β€” for internal buffers it's literally zero, don't come for her πŸ“
  • flags β€” buffer flags. it is represented as bit masks.
    • host buffer flags are "enum hfi_buffer_host_flags"
    • firmware buffer flags are "enum hfi_buffer_firmware_flags"

two different flag enums, don't mix them up bestie, that's the trap πŸ•³οΈ

  • reserved β€” reserved for future use. it's reserved[5], she's saving seats for the future besties 🎟️✨

πŸ”₯ SEE ALSO πŸ”₯

  • Kernel file ./drivers/media/platform/qcom/iris/iris_hfi_gen2_packet.h β€” go read the source, she ate πŸ’…
  • struct iris_hfi_header(9)
  • struct iris_hfi_packet(9)

like, these are her friends, they come as a set, main character energy all around πŸ‘‘


aaaaand that's the page!! πŸŽ€ live from ./drivers/media/platform/qcom/..., dated October 2026 β€” see you in the future, bestie, mwah πŸ’–πŸ¦‹βœ¨

πŸ“¦ where this page comes from