drivers/media/platform/renesas/vsp1/vsp1_pipe.c
Source file repositories/reference/linux-study-clean/drivers/media/platform/renesas/vsp1/vsp1_pipe.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/platform/renesas/vsp1/vsp1_pipe.c- Extension
.c- Size
- 22726 bytes
- Lines
- 686
- 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/delay.hlinux/list.hlinux/lockdep.hlinux/sched.hlinux/wait.hmedia/media-entity.hmedia/v4l2-subdev.hvsp1.hvsp1_brx.hvsp1_dl.hvsp1_entity.hvsp1_hgo.hvsp1_hgt.hvsp1_pipe.hvsp1_rwpf.hvsp1_uds.h
Detected Declarations
function vsp1_get_format_info_by_indexfunction vsp1_for_each_formatfunction vsp1_adjust_color_spacefunction vsp1_pipeline_resetfunction vsp1_pipeline_initfunction __vsp1_pipeline_dumpfunction list_for_each_entryfunction vsp1_pipeline_runfunction vsp1_pipeline_stoppedfunction vsp1_pipeline_stopfunction scoped_guardfunction list_for_each_entryfunction vsp1_pipeline_readyfunction vsp1_pipeline_frame_endfunction vsp1_pipeline_propagate_alphafunction vsp1_pipeline_propagate_partitionfunction list_for_each_entry_reversefunction vsp1_pipeline_calculate_partition
Annotated Snippet
vsp1_for_each_format(info, vsp1_video_gen2_formats) {
if (info->fourcc == fourcc)
return info;
}
}
if (vsp1_feature(vsp1, VSP1_HAS_HSIT)) {
vsp1_for_each_format(info, vsp1_video_hsit_formats) {
if (info->fourcc == fourcc)
return info;
}
}
return NULL;
}
/**
* vsp1_get_format_info_by_index - Enumerate format information
* @vsp1: the VSP1 device
* @index: the format index
* @code: media bus code to limit enumeration
*
* Return a pointer to the format information structure corresponding to the
* given index, or NULL if the index exceeds the supported formats list. If the
* @code parameter is not zero, only formats compatible with the media bus code
* will be enumerated.
*/
const struct vsp1_format_info *
vsp1_get_format_info_by_index(struct vsp1_device *vsp1, unsigned int index,
u32 code)
{
if (!code) {
if (index < ARRAY_SIZE(vsp1_video_formats))
return &vsp1_video_formats[index];
if (vsp1->info->gen == 2) {
index -= ARRAY_SIZE(vsp1_video_formats);
if (index < ARRAY_SIZE(vsp1_video_gen2_formats))
return &vsp1_video_gen2_formats[index];
}
if (vsp1_feature(vsp1, VSP1_HAS_HSIT)) {
index -= ARRAY_SIZE(vsp1_video_gen2_formats);
if (index < ARRAY_SIZE(vsp1_video_hsit_formats))
return &vsp1_video_hsit_formats[index];
}
return NULL;
}
vsp1_for_each_format(info, vsp1_video_formats) {
if (info->mbus == code) {
if (!index)
return info;
index--;
}
}
if (vsp1->info->gen == 2) {
vsp1_for_each_format(info, vsp1_video_gen2_formats) {
if (info->mbus == code) {
if (!index)
return info;
index--;
}
}
}
if (vsp1_feature(vsp1, VSP1_HAS_HSIT)) {
vsp1_for_each_format(info, vsp1_video_hsit_formats) {
if (info->mbus == code) {
if (!index)
return info;
index--;
}
}
}
return NULL;
}
/**
* vsp1_adjust_color_space - Adjust color space fields in a format
* @code: the media bus code
* @colorspace: the colorspace
* @xfer_func: the transfer function
* @encoding: the encoding
* @quantization: the quantization
*
* This function adjusts all color space fields of a video device of subdev
Annotation
- Immediate include surface: `linux/delay.h`, `linux/list.h`, `linux/lockdep.h`, `linux/sched.h`, `linux/wait.h`, `media/media-entity.h`, `media/v4l2-subdev.h`, `vsp1.h`.
- Detected declarations: `function vsp1_get_format_info_by_index`, `function vsp1_for_each_format`, `function vsp1_adjust_color_space`, `function vsp1_pipeline_reset`, `function vsp1_pipeline_init`, `function __vsp1_pipeline_dump`, `function list_for_each_entry`, `function vsp1_pipeline_run`, `function vsp1_pipeline_stopped`, `function vsp1_pipeline_stop`.
- 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.