drivers/media/platform/qcom/venus/hfi_msgs.c
Source file repositories/reference/linux-study-clean/drivers/media/platform/qcom/venus/hfi_msgs.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/platform/qcom/venus/hfi_msgs.c- Extension
.c- Size
- 22858 bytes
- Lines
- 863
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/hash.hlinux/list.hlinux/slab.hlinux/soc/qcom/smem.hmedia/videobuf2-v4l2.hcore.hhfi.hhfi_helper.hhfi_msgs.hhfi_parser.h
Detected Declarations
struct hfi_done_handlerfunction Copyrightfunction event_release_buffer_reffunction event_sys_errorfunction event_session_errorfunction hfi_event_notifyfunction hfi_sys_init_donefunction sys_get_prop_image_versionfunction hfi_sys_property_infofunction hfi_sys_rel_resource_donefunction hfi_sys_ping_donefunction hfi_sys_idle_donefunction hfi_sys_pc_prepare_donefunction session_get_prop_profile_levelfunction session_get_prop_buf_reqfunction hfi_session_prop_infofunction hfi_session_init_donefunction hfi_session_load_res_donefunction hfi_session_flush_donefunction hfi_session_etb_donefunction hfi_session_ftb_donefunction hfi_session_start_donefunction hfi_session_stop_donefunction hfi_session_rel_res_donefunction hfi_session_rel_buf_donefunction hfi_session_end_donefunction hfi_session_abort_donefunction hfi_session_get_seq_hdr_donefunction hfi_process_watchdog_timeoutfunction hfi_process_msg_packet
Annotated Snippet
struct hfi_done_handler {
u32 pkt;
u32 pkt_sz;
u32 pkt_sz2;
void (*done)(struct venus_core *, struct venus_inst *, void *);
bool is_sys_pkt;
};
static const struct hfi_done_handler handlers[] = {
{.pkt = HFI_MSG_EVENT_NOTIFY,
.pkt_sz = sizeof(struct hfi_msg_event_notify_pkt),
.done = hfi_event_notify,
},
{.pkt = HFI_MSG_SYS_INIT,
.pkt_sz = sizeof(struct hfi_msg_sys_init_done_pkt),
.done = hfi_sys_init_done,
.is_sys_pkt = true,
},
{.pkt = HFI_MSG_SYS_PROPERTY_INFO,
.pkt_sz = sizeof(struct hfi_msg_sys_property_info_pkt),
.done = hfi_sys_property_info,
.is_sys_pkt = true,
},
{.pkt = HFI_MSG_SYS_RELEASE_RESOURCE,
.pkt_sz = sizeof(struct hfi_msg_sys_release_resource_done_pkt),
.done = hfi_sys_rel_resource_done,
.is_sys_pkt = true,
},
{.pkt = HFI_MSG_SYS_PING_ACK,
.pkt_sz = sizeof(struct hfi_msg_sys_ping_ack_pkt),
.done = hfi_sys_ping_done,
.is_sys_pkt = true,
},
{.pkt = HFI_MSG_SYS_IDLE,
.pkt_sz = sizeof(struct hfi_msg_sys_idle_pkt),
.done = hfi_sys_idle_done,
.is_sys_pkt = true,
},
{.pkt = HFI_MSG_SYS_PC_PREP,
.pkt_sz = sizeof(struct hfi_msg_sys_pc_prep_done_pkt),
.done = hfi_sys_pc_prepare_done,
.is_sys_pkt = true,
},
{.pkt = HFI_MSG_SYS_SESSION_INIT,
.pkt_sz = sizeof(struct hfi_msg_session_init_done_pkt),
.done = hfi_session_init_done,
},
{.pkt = HFI_MSG_SYS_SESSION_END,
.pkt_sz = sizeof(struct hfi_msg_session_end_done_pkt),
.done = hfi_session_end_done,
},
{.pkt = HFI_MSG_SESSION_LOAD_RESOURCES,
.pkt_sz = sizeof(struct hfi_msg_session_load_resources_done_pkt),
.done = hfi_session_load_res_done,
},
{.pkt = HFI_MSG_SESSION_START,
.pkt_sz = sizeof(struct hfi_msg_session_start_done_pkt),
.done = hfi_session_start_done,
},
{.pkt = HFI_MSG_SESSION_STOP,
.pkt_sz = sizeof(struct hfi_msg_session_stop_done_pkt),
.done = hfi_session_stop_done,
},
{.pkt = HFI_MSG_SYS_SESSION_ABORT,
.pkt_sz = sizeof(struct hfi_msg_sys_session_abort_done_pkt),
.done = hfi_session_abort_done,
},
{.pkt = HFI_MSG_SESSION_EMPTY_BUFFER,
.pkt_sz = sizeof(struct hfi_msg_session_empty_buffer_done_pkt),
.done = hfi_session_etb_done,
},
{.pkt = HFI_MSG_SESSION_FILL_BUFFER,
.pkt_sz = sizeof(struct hfi_msg_session_fbd_uncompressed_plane0_pkt),
.pkt_sz2 = sizeof(struct hfi_msg_session_fbd_compressed_pkt),
.done = hfi_session_ftb_done,
},
{.pkt = HFI_MSG_SESSION_FLUSH,
.pkt_sz = sizeof(struct hfi_msg_session_flush_done_pkt),
.done = hfi_session_flush_done,
},
{.pkt = HFI_MSG_SESSION_PROPERTY_INFO,
.pkt_sz = sizeof(struct hfi_msg_session_property_info_pkt),
.done = hfi_session_prop_info,
},
{.pkt = HFI_MSG_SESSION_RELEASE_RESOURCES,
.pkt_sz = sizeof(struct hfi_msg_session_release_resources_done_pkt),
.done = hfi_session_rel_res_done,
},
{.pkt = HFI_MSG_SESSION_GET_SEQUENCE_HEADER,
.pkt_sz = sizeof(struct hfi_msg_session_get_sequence_hdr_done_pkt),
Annotation
- Immediate include surface: `linux/hash.h`, `linux/list.h`, `linux/slab.h`, `linux/soc/qcom/smem.h`, `media/videobuf2-v4l2.h`, `core.h`, `hfi.h`, `hfi_helper.h`.
- Detected declarations: `struct hfi_done_handler`, `function Copyright`, `function event_release_buffer_ref`, `function event_sys_error`, `function event_session_error`, `function hfi_event_notify`, `function hfi_sys_init_done`, `function sys_get_prop_image_version`, `function hfi_sys_property_info`, `function hfi_sys_rel_resource_done`.
- Atlas domain: Driver Families / drivers/media.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.