drivers/media/v4l2-core/v4l2-dv-timings.c
Source file repositories/reference/linux-study-clean/drivers/media/v4l2-core/v4l2-dv-timings.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/v4l2-core/v4l2-dv-timings.c- Extension
.c- Size
- 38841 bytes
- Lines
- 1276
- Domain
- Driver Families
- Bucket
- drivers/media
- Inferred role
- Driver Families: operation-table or driver-model contract
- Status
- pattern 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 an operation table; this is where Linux turns generic core objects into subsystem-specific behavior.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/module.hlinux/types.hlinux/kernel.hlinux/errno.hlinux/rational.hlinux/videodev2.hlinux/v4l2-dv-timings.hmedia/v4l2-dv-timings.hlinux/math64.hlinux/hdmi.hmedia/cec.h
Detected Declarations
function v4l2_valid_dv_timingsfunction v4l2_enum_dv_timings_capfunction v4l2_find_dv_timings_capfunction v4l2_find_dv_timings_cea861_vicfunction v4l2_match_dv_timingsfunction v4l2_print_dv_timingsfunction v4l2_dv_timings_aspect_ratiofunction v4l2_calc_timeperframefunction v4l2_detect_cvtfunction v4l2_detect_gtffunction v4l2_calc_aspect_ratiofunction featuresfunction v4l2_num_edid_blocksfunction v4l2_get_edid_phys_addrfunction v4l2_set_edid_phys_addrfunction v4l2_phys_addr_for_inputfunction v4l2_phys_addr_validatefunction v4l2_debugfs_if_freeexport v4l2_dv_timings_presetsexport v4l2_valid_dv_timingsexport v4l2_enum_dv_timings_capexport v4l2_find_dv_timings_capexport v4l2_find_dv_timings_cea861_vicexport v4l2_match_dv_timingsexport v4l2_print_dv_timingsexport v4l2_dv_timings_aspect_ratioexport v4l2_calc_timeperframeexport v4l2_detect_cvtexport v4l2_detect_gtfexport v4l2_calc_aspect_ratioexport v4l2_hdmi_rx_colorimetryexport v4l2_num_edid_blocksexport v4l2_get_edid_phys_addrexport v4l2_set_edid_phys_addrexport v4l2_phys_addr_for_inputexport v4l2_phys_addr_validateexport v4l2_debugfs_if_allocexport v4l2_debugfs_if_free
Annotated Snippet
static const struct file_operations infoframe_##type##_fops = { \
.owner = THIS_MODULE, \
.open = simple_open, \
.read = infoframe_read_##type, \
}
DEBUGFS_FOPS(avi, V4L2_DEBUGFS_IF_AVI);
DEBUGFS_FOPS(audio, V4L2_DEBUGFS_IF_AUDIO);
DEBUGFS_FOPS(spd, V4L2_DEBUGFS_IF_SPD);
DEBUGFS_FOPS(hdmi, V4L2_DEBUGFS_IF_HDMI);
DEBUGFS_FOPS(drm, V4L2_DEBUGFS_IF_DRM);
struct v4l2_debugfs_if *v4l2_debugfs_if_alloc(struct dentry *root, u32 if_types,
void *priv,
v4l2_debugfs_if_read_t if_read)
{
struct v4l2_debugfs_if *infoframes;
if (IS_ERR_OR_NULL(root) || !if_types || !if_read)
return NULL;
infoframes = kzalloc_obj(*infoframes);
if (!infoframes)
return NULL;
infoframes->if_dir = debugfs_create_dir("infoframes", root);
infoframes->priv = priv;
infoframes->if_read = if_read;
if (if_types & V4L2_DEBUGFS_IF_AVI)
debugfs_create_file("avi", 0400, infoframes->if_dir,
infoframes, &infoframe_avi_fops);
if (if_types & V4L2_DEBUGFS_IF_AUDIO)
debugfs_create_file("audio", 0400, infoframes->if_dir,
infoframes, &infoframe_audio_fops);
if (if_types & V4L2_DEBUGFS_IF_SPD)
debugfs_create_file("spd", 0400, infoframes->if_dir,
infoframes, &infoframe_spd_fops);
if (if_types & V4L2_DEBUGFS_IF_HDMI)
debugfs_create_file("hdmi", 0400, infoframes->if_dir,
infoframes, &infoframe_hdmi_fops);
if (if_types & V4L2_DEBUGFS_IF_DRM)
debugfs_create_file("hdr_drm", 0400, infoframes->if_dir,
infoframes, &infoframe_drm_fops);
return infoframes;
}
EXPORT_SYMBOL_GPL(v4l2_debugfs_if_alloc);
void v4l2_debugfs_if_free(struct v4l2_debugfs_if *infoframes)
{
if (infoframes) {
debugfs_remove_recursive(infoframes->if_dir);
kfree(infoframes);
}
}
EXPORT_SYMBOL_GPL(v4l2_debugfs_if_free);
#endif
Annotation
- Immediate include surface: `linux/module.h`, `linux/types.h`, `linux/kernel.h`, `linux/errno.h`, `linux/rational.h`, `linux/videodev2.h`, `linux/v4l2-dv-timings.h`, `media/v4l2-dv-timings.h`.
- Detected declarations: `function v4l2_valid_dv_timings`, `function v4l2_enum_dv_timings_cap`, `function v4l2_find_dv_timings_cap`, `function v4l2_find_dv_timings_cea861_vic`, `function v4l2_match_dv_timings`, `function v4l2_print_dv_timings`, `function v4l2_dv_timings_aspect_ratio`, `function v4l2_calc_timeperframe`, `function v4l2_detect_cvt`, `function v4l2_detect_gtf`.
- Atlas domain: Driver Families / drivers/media.
- Implementation status: pattern 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.