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.

Dependency Surface

Detected Declarations

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

Implementation Notes