drivers/media/platform/qcom/camss/camss-vfe.c
Source file repositories/reference/linux-study-clean/drivers/media/platform/qcom/camss/camss-vfe.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/platform/qcom/camss/camss-vfe.c- Extension
.c- Size
- 55672 bytes
- Lines
- 2191
- 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.
- 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/clk.hlinux/completion.hlinux/interrupt.hlinux/iommu.hlinux/mutex.hlinux/of.hlinux/platform_device.hlinux/pm_domain.hlinux/pm_runtime.hlinux/spinlock_types.hlinux/spinlock.hmedia/media-entity.hmedia/v4l2-device.hmedia/v4l2-subdev.hcamss-vfe.hcamss.h
Detected Declarations
function vfe_src_pad_codefunction vfe_hw_versionfunction vfe_buf_donefunction vfe_enable_output_v2function vfe_queue_buffer_v2function vfe_enable_v2function vfe_get_output_v2function vfe_resetfunction vfe_init_outputsfunction vfe_reset_output_mapsfunction vfe_reserve_wmfunction vfe_release_wmfunction vfe_buf_add_pendingfunction vfe_buf_flush_pendingfunction list_for_each_entry_safefunction vfe_put_outputfunction vfe_disable_outputfunction vfe_disablefunction vfe_isr_comp_donefunction vfe_isr_reset_ackfunction vfe_pm_domain_offfunction vfe_pm_domain_onfunction vfe_match_clock_namesfunction vfe_check_clock_levelsfunction vfe_set_clock_ratesfunction vfe_check_clock_ratesfunction vfe_getfunction vfe_putfunction vfe_flush_buffersfunction vfe_set_powerfunction vfe_set_streamfunction __vfe_get_formatfunction __vfe_get_composefunction __vfe_get_cropfunction vfe_try_formatfunction vfe_try_composefunction vfe_try_cropfunction vfe_enum_mbus_codefunction vfe_enum_frame_sizefunction vfe_get_formatfunction vfe_set_formatfunction vfe_get_selectionfunction vfe_set_selectionfunction vfe_init_formatsfunction msm_vfe_subdev_initfunction msm_vfe_genpd_cleanupfunction vfe_link_setupfunction vfe_bpl_align_rdi
Annotated Snippet
switch (sink_code) {
case MEDIA_BUS_FMT_YUYV8_1X16:
{
u32 src_code[] = {
MEDIA_BUS_FMT_YUYV8_1X16,
MEDIA_BUS_FMT_YUYV8_1_5X8,
};
return camss_format_find_code(src_code, ARRAY_SIZE(src_code),
index, src_req_code);
}
case MEDIA_BUS_FMT_YVYU8_1X16:
{
u32 src_code[] = {
MEDIA_BUS_FMT_YVYU8_1X16,
MEDIA_BUS_FMT_YVYU8_1_5X8,
};
return camss_format_find_code(src_code, ARRAY_SIZE(src_code),
index, src_req_code);
}
case MEDIA_BUS_FMT_UYVY8_1X16:
{
u32 src_code[] = {
MEDIA_BUS_FMT_UYVY8_1X16,
MEDIA_BUS_FMT_UYVY8_1_5X8,
};
return camss_format_find_code(src_code, ARRAY_SIZE(src_code),
index, src_req_code);
}
case MEDIA_BUS_FMT_VYUY8_1X16:
{
u32 src_code[] = {
MEDIA_BUS_FMT_VYUY8_1X16,
MEDIA_BUS_FMT_VYUY8_1_5X8,
};
return camss_format_find_code(src_code, ARRAY_SIZE(src_code),
index, src_req_code);
}
default:
if (index > 0)
return 0;
return sink_code;
}
break;
case CAMSS_660:
case CAMSS_2290:
case CAMSS_6150:
case CAMSS_6350:
case CAMSS_7280:
case CAMSS_8x96:
case CAMSS_8250:
case CAMSS_8280XP:
case CAMSS_8300:
case CAMSS_845:
case CAMSS_8550:
case CAMSS_8650:
case CAMSS_8775P:
case CAMSS_X1E80100:
switch (sink_code) {
case MEDIA_BUS_FMT_YUYV8_1X16:
{
u32 src_code[] = {
MEDIA_BUS_FMT_YUYV8_1X16,
MEDIA_BUS_FMT_YVYU8_1X16,
MEDIA_BUS_FMT_UYVY8_1X16,
MEDIA_BUS_FMT_VYUY8_1X16,
MEDIA_BUS_FMT_YUYV8_1_5X8,
};
return camss_format_find_code(src_code, ARRAY_SIZE(src_code),
index, src_req_code);
}
case MEDIA_BUS_FMT_YVYU8_1X16:
{
u32 src_code[] = {
MEDIA_BUS_FMT_YVYU8_1X16,
MEDIA_BUS_FMT_YUYV8_1X16,
MEDIA_BUS_FMT_UYVY8_1X16,
MEDIA_BUS_FMT_VYUY8_1X16,
MEDIA_BUS_FMT_YVYU8_1_5X8,
};
return camss_format_find_code(src_code, ARRAY_SIZE(src_code),
index, src_req_code);
}
case MEDIA_BUS_FMT_UYVY8_1X16:
Annotation
- Immediate include surface: `linux/clk.h`, `linux/completion.h`, `linux/interrupt.h`, `linux/iommu.h`, `linux/mutex.h`, `linux/of.h`, `linux/platform_device.h`, `linux/pm_domain.h`.
- Detected declarations: `function vfe_src_pad_code`, `function vfe_hw_version`, `function vfe_buf_done`, `function vfe_enable_output_v2`, `function vfe_queue_buffer_v2`, `function vfe_enable_v2`, `function vfe_get_output_v2`, `function vfe_reset`, `function vfe_init_outputs`, `function vfe_reset_output_maps`.
- 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.
- 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.