STRUCT IRIS_HFI_BUFFER(9)
π¦ 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 fromaddr_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_offsetis0. Restriction: 4KBytes aligned. - decoder bitstream buffer: no restriction (can be any value). she's flexible, we respect it π
- RAW buffer:
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"
- host buffer flags are
two different flag enums, don't mix them up bestie, that's the trap π³οΈ
reservedβ reserved for future use. it'sreserved[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
- 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