drivers/media/platform/renesas/rcar-vin/rcar-vin.h
Source file repositories/reference/linux-study-clean/drivers/media/platform/renesas/rcar-vin/rcar-vin.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/platform/renesas/rcar-vin/rcar-vin.h- Extension
.h- Size
- 7404 bytes
- Lines
- 282
- 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/kref.hmedia/v4l2-async.hmedia/v4l2-ctrls.hmedia/v4l2-dev.hmedia/v4l2-device.hmedia/v4l2-fwnode.hmedia/videobuf2-v4l2.h
Detected Declarations
struct rvin_devstruct rvin_groupstruct rvin_video_formatstruct rvin_parallel_entitystruct rvin_group_routestruct rvin_infostruct rvin_devstruct rvin_groupenum model_idenum rvin_csi_idenum rvin_isp_id
Annotated Snippet
struct rvin_video_format {
u32 fourcc;
u8 bpp;
};
/**
* struct rvin_parallel_entity - Parallel video input endpoint descriptor
* @asc: async connection descriptor for async framework
* @subdev: subdevice matched using async framework
* @mbus_type: media bus type
* @bus: media bus parallel configuration
* @source_pad: source pad of remote subdevice
*/
struct rvin_parallel_entity {
struct v4l2_async_connection *asc;
struct v4l2_subdev *subdev;
enum v4l2_mbus_type mbus_type;
struct v4l2_mbus_config_parallel bus;
unsigned int source_pad;
};
/**
* struct rvin_group_route - describes a route from a channel of a
* CSI-2 receiver to a VIN
*
* @master: VIN group master ID.
* @csi: CSI-2 receiver ID.
* @chsel: CHSEL register values that connects VIN group to CSI-2.
*
* .. note::
* Each R-Car CSI-2 receiver has four output channels facing the VIN
* devices, each channel can carry one CSI-2 Virtual Channel (VC).
* There is no correlation between channel number and CSI-2 VC. It's
* up to the CSI-2 receiver driver to configure which VC is output
* on which channel, the VIN devices only care about output channels.
*/
struct rvin_group_route {
unsigned int master;
enum rvin_csi_id csi;
unsigned int chsel;
};
/**
* struct rvin_info - Information about the particular VIN implementation
* @model: VIN model
* @use_isp: the VIN is connected to the ISP and not to the CSI-2
* @nv12: support outputting NV12 pixel format
* @raw10: support outputting RAW10 pixel format
* @max_width: max input width the VIN supports
* @max_height: max input height the VIN supports
* @routes: list of possible routes from the CSI-2 recivers to
* all VINs. The list mush be NULL terminated.
* @scaler: Optional scaler
*/
struct rvin_info {
enum model_id model;
bool use_isp;
bool nv12;
bool raw10;
unsigned int max_width;
unsigned int max_height;
const struct rvin_group_route *routes;
void (*scaler)(struct rvin_dev *vin);
};
/**
* struct rvin_dev - Renesas VIN device structure
* @dev: (OF) device
* @base: device I/O register space remapped to virtual memory
* @info: info about VIN instance
*
* @vdev: V4L2 video device associated with VIN
* @v4l2_dev: V4L2 device
* @ctrl_handler: V4L2 control handler
*
* @parallel: parallel input subdevice descriptor
*
* @group: Gen3 CSI group
* @id: Gen3 group id for this VIN
* @pad: media pad for the video device entity
*
* @lock: protects @queue
* @queue: vb2 buffers queue
* @scratch: cpu address for scratch buffer
* @scratch_phys: physical address of the scratch buffer
*
* @qlock: Protects @buf_hw, @buf_list, @sequence and @running
Annotation
- Immediate include surface: `linux/kref.h`, `media/v4l2-async.h`, `media/v4l2-ctrls.h`, `media/v4l2-dev.h`, `media/v4l2-device.h`, `media/v4l2-fwnode.h`, `media/videobuf2-v4l2.h`.
- Detected declarations: `struct rvin_dev`, `struct rvin_group`, `struct rvin_video_format`, `struct rvin_parallel_entity`, `struct rvin_group_route`, `struct rvin_info`, `struct rvin_dev`, `struct rvin_group`, `enum model_id`, `enum rvin_csi_id`.
- 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.