drivers/media/platform/qcom/venus/hfi.h
Source file repositories/reference/linux-study-clean/drivers/media/platform/qcom/venus/hfi.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/platform/qcom/venus/hfi.h- Extension
.h- Size
- 5379 bytes
- Lines
- 177
- Domain
- Driver Families
- Bucket
- drivers/media
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/interrupt.hhfi_helper.h
Detected Declarations
struct hfi_buffer_descstruct hfi_frame_datastruct hfi_event_datastruct venus_corestruct venus_inststruct hfi_core_opsstruct hfi_inst_opsstruct hfi_ops
Annotated Snippet
struct hfi_buffer_desc {
u32 buffer_type;
u32 buffer_size;
u32 num_buffers;
u32 device_addr;
u32 extradata_addr;
u32 extradata_size;
u32 response_required;
};
struct hfi_frame_data {
u32 buffer_type;
u32 device_addr;
u32 extradata_addr;
u64 timestamp;
u32 flags;
u32 offset;
u32 alloc_len;
u32 filled_len;
u32 mark_target;
u32 mark_data;
u32 clnt_data;
u32 extradata_size;
};
union hfi_get_property {
struct hfi_profile_level profile_level;
struct hfi_buffer_requirements bufreq[HFI_BUFFER_TYPE_MAX];
};
/* HFI events */
#define EVT_SYS_EVENT_CHANGE 1
#define EVT_SYS_WATCHDOG_TIMEOUT 2
#define EVT_SYS_ERROR 3
#define EVT_SESSION_ERROR 4
/* HFI event callback structure */
struct hfi_event_data {
u32 error;
u32 height;
u32 width;
u32 event_type;
u32 packet_buffer;
u32 extradata_buffer;
u32 tag;
u32 profile;
u32 level;
/* the following properties start appear from v4 onwards */
u32 bit_depth;
u32 pic_struct;
u32 colour_space;
u32 entropy_mode;
u32 buf_count;
struct {
u32 left, top;
u32 width, height;
} input_crop;
};
/* define core states */
#define CORE_UNINIT 0
#define CORE_INIT 1
/* define instance states */
#define INST_UNINIT 2
#define INST_INIT 3
#define INST_LOAD_RESOURCES 4
#define INST_START 5
#define INST_STOP 6
#define INST_RELEASE_RESOURCES 7
struct venus_core;
struct venus_inst;
struct hfi_core_ops {
void (*event_notify)(struct venus_core *core, u32 event);
};
struct hfi_inst_ops {
void (*buf_done)(struct venus_inst *inst, unsigned int buf_type,
u32 tag, u32 bytesused, u32 data_offset, u32 flags,
u32 hfi_flags, u64 timestamp_us);
void (*event_notify)(struct venus_inst *inst, u32 event,
struct hfi_event_data *data);
void (*flush_done)(struct venus_inst *inst);
};
struct hfi_ops {
int (*core_init)(struct venus_core *core);
int (*core_deinit)(struct venus_core *core);
Annotation
- Immediate include surface: `linux/interrupt.h`, `hfi_helper.h`.
- Detected declarations: `struct hfi_buffer_desc`, `struct hfi_frame_data`, `struct hfi_event_data`, `struct venus_core`, `struct venus_inst`, `struct hfi_core_ops`, `struct hfi_inst_ops`, `struct hfi_ops`.
- Atlas domain: Driver Families / drivers/media.
- Implementation status: source implementation candidate.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.