drivers/media/platform/qcom/venus/hfi_parser.c
Source file repositories/reference/linux-study-clean/drivers/media/platform/qcom/venus/hfi_parser.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/platform/qcom/venus/hfi_parser.c- Extension
.c- Size
- 9738 bytes
- Lines
- 389
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/bitops.hlinux/kernel.hcore.hhfi_helper.hhfi_parser.h
Detected Declarations
function init_codecsfunction for_each_set_bitfunction for_each_set_bitfunction for_each_codecfunction fill_buf_modefunction parse_alloc_modefunction fill_profile_levelfunction parse_profile_levelfunction fill_capsfunction parse_capsfunction fill_raw_fmtsfunction parse_raw_formatsfunction parse_codecsfunction parse_max_sessionsfunction parse_codecs_maskfunction parser_initfunction parser_finifunction hfi_platform_parserfunction hfi_parser
Annotated Snippet
switch (*words) {
case HFI_PROPERTY_PARAM_CODEC_SUPPORTED:
if (rem_bytes <= sizeof(struct hfi_codec_supported))
return HFI_ERR_SYS_INSUFFICIENT_RESOURCES;
ret = parse_codecs(core, payload);
if (ret < 0)
return HFI_ERR_SYS_INSUFFICIENT_RESOURCES;
init_codecs(core);
break;
case HFI_PROPERTY_PARAM_MAX_SESSIONS_SUPPORTED:
if (rem_bytes <= sizeof(struct hfi_max_sessions_supported))
return HFI_ERR_SYS_INSUFFICIENT_RESOURCES;
ret = parse_max_sessions(core, payload);
break;
case HFI_PROPERTY_PARAM_CODEC_MASK_SUPPORTED:
if (rem_bytes <= sizeof(struct hfi_codec_mask_supported))
return HFI_ERR_SYS_INSUFFICIENT_RESOURCES;
ret = parse_codecs_mask(&codecs, &domain, payload);
break;
case HFI_PROPERTY_PARAM_UNCOMPRESSED_FORMAT_SUPPORTED:
if (rem_bytes <= sizeof(struct hfi_uncompressed_format_supported))
return HFI_ERR_SYS_INSUFFICIENT_RESOURCES;
ret = parse_raw_formats(core, codecs, domain, payload);
break;
case HFI_PROPERTY_PARAM_CAPABILITY_SUPPORTED:
if (rem_bytes <= sizeof(struct hfi_capabilities))
return HFI_ERR_SYS_INSUFFICIENT_RESOURCES;
ret = parse_caps(core, codecs, domain, payload);
break;
case HFI_PROPERTY_PARAM_PROFILE_LEVEL_SUPPORTED:
if (rem_bytes <= sizeof(struct hfi_profile_level_supported))
return HFI_ERR_SYS_INSUFFICIENT_RESOURCES;
ret = parse_profile_level(core, codecs, domain, payload);
break;
case HFI_PROPERTY_PARAM_BUFFER_ALLOC_MODE_SUPPORTED:
if (rem_bytes <= sizeof(struct hfi_buffer_alloc_mode_supported))
return HFI_ERR_SYS_INSUFFICIENT_RESOURCES;
ret = parse_alloc_mode(core, codecs, domain, payload);
break;
default:
ret = sizeof(u32);
break;
}
if (ret < 0)
return HFI_ERR_SYS_INSUFFICIENT_RESOURCES;
words += ret / sizeof(u32);
rem_bytes -= ret;
}
if (!core->max_sessions_supported)
core->max_sessions_supported = MAX_SESSIONS;
parser_fini(inst, codecs, domain);
return HFI_ERR_NONE;
}
Annotation
- Immediate include surface: `linux/bitops.h`, `linux/kernel.h`, `core.h`, `hfi_helper.h`, `hfi_parser.h`.
- Detected declarations: `function init_codecs`, `function for_each_set_bit`, `function for_each_set_bit`, `function for_each_codec`, `function fill_buf_mode`, `function parse_alloc_mode`, `function fill_profile_level`, `function parse_profile_level`, `function fill_caps`, `function parse_caps`.
- Atlas domain: Driver Families / drivers/media.
- Implementation status: source implementation candidate.
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.